Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Noyrit2016-04-15 08:33:57 +0000
committerptessier2017-05-08 14:54:39 +0000
commitbb97915e420a90f4f017b6da84c577f06360744c (patch)
tree2ea4d6cbb6932cb60e016e60ca4853d9d494e932
parent66d0a630c88cc9177a142b09060a7ffa59249936 (diff)
downloadorg.eclipse.papyrus-bb97915e420a90f4f017b6da84c577f06360744c.tar.gz
org.eclipse.papyrus-bb97915e420a90f4f017b6da84c577f06360744c.tar.xz
org.eclipse.papyrus-bb97915e420a90f4f017b6da84c577f06360744c.zip
Bug 489116 - Migrate Sequence Diagram's elementtypes to UML service
types - lifeline management ok - management by element type-->ok - graphical management (creation, move, drop)-->ok - message -management by element type-->ok -graphical management in progress - asyncr message creation (creation deletion) - syncr message creation ( creation deletion) - creation message creation (creation deletion) - delete message (creation deletion) - lost message ( creation deletion) - found message ( creation deletion) - action execution specification ( creation, move deletion) - behavior execution specification (creationn,move deletion) - when adding a message move other - possibility to select several messages --> prevent from reorder --> click on alt during the move to let the reorder - manage combined fragment Change-Id: I95f741292bb78705137af882c1cf60686a29de6f Bug 489116 - Migrate Sequence Diagram's elementtypes to UML service types update interaction figure and editpart Change-Id: Ibf718c859b05c6aad1343a62224d1fc4291a36f3 fix manifest during merge Change-Id: I755cbd26cc5ca9806ce1a1329554cafccbce6da3
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/updater/DiagramUpdater.xtend21
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultGraphicalNodeEditPolicy.java10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/XYLayoutWithConstrainedResizedEditPolicy.java6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/NotationHelper.java26
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/selection/SelectSeveralLinksEditPartTracker.java424
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InteractionRectangleFigure.java101
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/theme/umlBase.css20
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromRefreshCommand.java4
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromViewDescriptorCommand.java4
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/DiagramContentProvider.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/build.properties5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CustomSequencePaletteFactory.java602
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/LifelineNodePlate.java80
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramEditorFactory.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/ChangeEdgeTargetCommand.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateCoordinateCommand.java89
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateElementAndNodeCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateGrillingStructureCommand.java75
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomActionExecutionSpecificationCreateCommand.java70
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomBehaviorExecutionSpecificationCreateCommand.java69
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragment2CreateCommand.java72
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragmentCreateCommand.java91
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCommentAnnotatedElementReorientCommand.java52
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConsiderIgnoreFragmentCreateCommand.java112
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintConstrainedElementReorientCommand.java52
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintCreateCommand.java80
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContextLinkCreateCommand.java97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContinuationCreateCommand.java100
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDestructionOccurrenceSpecificationCreateCommand.java83
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintCreateCommand.java134
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintInMessageCreateCommand.java54
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationObservationCreateCommand.java136
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomGeneralOrderingCreateCommand.java110
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionCreateCommand.java74
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionOperandCreateCommand.java121
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionUseCreateCommand.java85
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomLifelineCreateCommand.java148
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage2CreateCommand.java132
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage2ReorientCommand.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage3CreateCommand.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage3ReorientCommand.java105
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage4CreateCommand.java99
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage4ReorientCommand.java96
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage5CreateCommand.java166
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage5ReorientCommand.java96
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage6CreateCommand.java81
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage6ReorientCommand.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage7CreateCommand.java81
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage7ReorientCommand.java77
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessageCreateCommand.java116
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessageReorientCommand.java113
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomStateInvariantCreateCommand.java68
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeConstraintCreateCommand.java114
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/DropDestructionOccurenceSpecification.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java437
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractMessageEditPart.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AnnotatedLinkEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BorderItemLabelEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedCompartmentEditPart.java225
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedFragmentEditPart.java88
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CInteractionEditPart.java182
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CLifeLineEditPart.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomActionExecutionSpecificationEditPart.java43
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragment2EditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragmentCombinedFragmentCompartmentEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCommentAnnotatedElementEditPart.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCommentEditPart.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConsiderIgnoreFragmentEditPart.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConstraintConstrainedElementEditPart.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConstraintEditPart.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomContinuationEditPart.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDestructionOccurrenceSpecificationEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintInMessageEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationObservationEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomGeneralOrderingEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionInteractionCompartmentEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionOperandEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionUseEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineNameEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageAsyncEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageCreateEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageDeleteEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageFoundEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageLostEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageReplyEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageSyncEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomStateInvariantEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomTimeConstraintEditPart.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomTimeObservationEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationEndEditPart.java88
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationRectangleFigure.java66
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GateEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandGuardEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEndEditPart.java137
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDCustomBehaviorExecutionSpecificationEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomBehaviorExecutionSpecificationEditPart.java)25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDCustomCombinedFragmentEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragmentEditPart.java)13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDLifelineEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java)29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDPackageEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomPackageEditPart.java)6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OldCustomInteractionEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionEditPart.java)20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/AnnotatedLinkEndEditPolicy.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCreationEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentHeadImpactLayoutEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemComponentEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CreationOnMessageEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomCombinedFragment2ResizeEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java53
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DeleteTimeElementWithoutEventPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ElementCreationWithMessageEditPolicy.java49
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationComponentEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationEndGraphicalNodeEditPolicy.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GatesHolderGraphicalNodeEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/HighlightEditPolicy.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCompartmentXYLayoutEditPolicy.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionGraphicalNodeEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionHeadImpactLayoutEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandDragDropEditPolicy.java43
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifeLineAffixedNodesCreationEditPolicy.java89
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineAppliedStereotypeNodeLabelDisplayEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java16
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineHeadImpactLayoutEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineSelectionEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDDestructionEventComponentEditPolicy.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionEventComponentEditPolicy.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifeLineLayoutEditPolicy.java123
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifelineCreationEditPolicy.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineCreationEditPolicy.java)19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifelineXYLayoutEditPolicy.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineXYLayoutEditPolicy.java)35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDMessageConnectionEditPolicy.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageConnectionEditPolicy.java)2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java710
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ObservationLinkPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/SequenceGraphicalNodeEditPolicy.java710
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomActionExecutionSpecificationItemSemanticEditPolicy.java257
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomBehaviorExecutionSpecificationItemSemanticEditPolicy.java257
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragment2ItemSemanticEditPolicy.java223
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java96
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentItemSemanticEditPolicy.java210
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCommentAnnotatedElementItemSemanticEditPolicy.java52
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCommentItemSemanticEditPolicy.java210
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConsiderIgnoreFragmentItemSemanticEditPolicy.java209
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConstraintConstrainedElementItemSemanticEditPolicy.java52
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConstraintItemSemanticEditPolicy.java217
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomContinuationItemSemanticEditPolicy.java210
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDestructionOccurrenceSpecificationItemSemanticEditPolicy.java235
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationConstraintInMessageItemSemanticEditPolicy.java210
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationConstraintItemSemanticEditPolicy.java210
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationObservationItemSemanticEditPolicy.java210
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomGeneralOrderingItemSemanticEditPolicy.java200
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionContextLinkSemanticEditPolicy.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java70
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java219
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandContextLinkSemanticEditPolicy.java92
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java311
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionUseItemSemanticEditPolicy.java210
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java339
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageASyncItemSemanticEditPolicy.java233
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageCreateItemSemanticEditPolicy.java234
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageDeleteItemSemanticEditPolicy.java230
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageFoundItemSemanticEditPolicy.java230
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageLostItemSemanticEditPolicy.java230
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageReplyItemSemanticEditPolicy.java230
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageSyncItemSemanticEditPolicy.java230
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomStateInvariantItemSemanticEditPolicy.java210
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomTimeConstraintItemSemanticEditPolicy.java210
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomTimeObservationItemSemanticEditPolicy.java210
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/GateItemSemanticEditPolicy.java160
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DestructionEventFigure.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/ExecutionSpecificationNodePlate.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/ILifelineInternalFigure.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CombinedFragmentEditHelper.java)43
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionOperandFigure.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionUseRectangleFigure.java28
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifeLineLayoutManager.java210
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifelineFigure.java283
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageAsync.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageCreate.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageDelete.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageFigure.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageFound.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageLost.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageReply.java22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageSync.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/SquareFigure.java74
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/StereotypeInteractionFigure.java270
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/TimeMarkElementFigure.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/CenterLocator.java192
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/migration/SequenceDiagramLunaToMarsReconciler.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomCombinedFragmentPreferencePage.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomConsiderIgnoreFragmentPreferencePage.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomDestructionOccurrenceSpecificationPreferencePage.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomDiagramPreferenceInitializer.java22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomInteractionOperandPreferencePage.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionEventPreferencePage.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPartProvider.java219
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPolicyProvider.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomNamespaceEditPolicyProvider.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomValidationProvider.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomViewProvider.java68
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/PostEditPolicyProvider.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/BoundForEditPart.java56
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectCombinedFragmentToGrillingEditPolicy.java207
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectEdgeToGrillingEditPolicy.java313
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectExecutionNodeToGrillingEditPolicy.java284
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectLifeLineToGrillingEditPolicy.java258
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectNodeToGridEditPolicy.java188
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectNodeToGrillingEditPolicy.java245
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectToGridEditPolicy.java88
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ContentDiagramListener.java43
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/DisplayEvent.java231
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingBasedResizableShapeEditPolicy.java69
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingBasedXYLayoutEditPolicy.java224
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingEditpart.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingManagementEditPolicy.java615
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/IEventFig.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageEditHelper.java)42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/IGrillingEditpolicy.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/InteractionGraphicalNodeEditPolicy.java153
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifeLineGraphicalNodeEditPolicy.java229
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifeLineXYLayoutEditPolicy.java278
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/NoGrillElementFound.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConstraintEditHelper.java)42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/SimpleSnapHelper.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/BehaviorDisplayHelper.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentDeleteHelper.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentMoveHelper.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/EventHelper.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/GateModelElementFactory.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/HighlightUtil.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperandModelElementFactory.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineCoveredByUpdater.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineEditPartUtil.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineHeadUtil.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageCreateHelper.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageDeleteHelper.java65
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/MessageAnchorRepairer.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationMoveHelper.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperandBoundsComputeHelper.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SelectMessagesEditPartTracker.java234
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceDeleteHelper.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceRequestConstant.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.di2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.notation382
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.uml130
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.di2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.notation154
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.uml19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen472
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram-uml.elementtypesconfigurations3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations97
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml928
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/Activator.java66
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java141
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java141
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java146
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementCreateCommand.java107
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementReorientCommand.java163
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java141
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java146
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementCreateCommand.java107
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementReorientCommand.java163
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java141
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContextLinkCreateCommand.java94
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContextLinkReorientCommand.java149
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java143
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java130
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java141
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java141
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java141
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingCreateCommand.java157
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingReorientCommand.java160
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java141
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java142
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java145
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2CreateCommand.java163
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2ReorientCommand.java174
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3CreateCommand.java163
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3ReorientCommand.java174
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4CreateCommand.java163
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4ReorientCommand.java174
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5CreateCommand.java163
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5ReorientCommand.java174
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6CreateCommand.java163
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6ReorientCommand.java176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7CreateCommand.java163
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7ReorientCommand.java176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageCreateCommand.java164
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageReorientCommand.java170
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java143
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java141
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java141
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/UMLReorientConnectionViewCommand.java82
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ActionExecutionSpecificationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/BehaviorExecutionSpecificationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConsiderIgnoreFragmentEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ContinuationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DestructionEventEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintInMessageEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationObservationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/GeneralOrderingEditHelper.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionOperandEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionUseEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/LifelineEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageOccurrenceSpecificationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/PackageEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/StateInvariantEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeConstraintEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeObservationEditHelper.java20
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java12
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java44
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java23
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java23
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentCombinedFragmentCompartmentEditPart.java69
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentEditPart.java28
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentAnnotatedElementEditPart.java18
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentBodyEditPart.java16
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentEditPart.java14
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConsiderIgnoreFragmentEditPart.java14
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Constraint2EditPart.java14
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintConstrainedElementEditPart.java14
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintContextAppliedStereotypeEditPart.java11
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintEditPart.java14
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintNameEditPart.java18
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContextLinkEditPart.java13
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationEditPart.java14
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationNameEditPart.java16
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java18
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java12
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java16
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java12
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java18
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java15
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java12
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java12
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java18
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java15
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingAppliedStereotypeEditPart.java12
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingEditPart.java13
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionEditPart.java57
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionInteractionCompartmentEditPart.java32
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionNameEditPart.java15
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandEditPart.java26
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseEditPart.java20
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseName2EditPart.java15
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseNameEditPart.java15
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java63
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineNameEditPart.java16
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncAppliedStereotypeEditPart.java13
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncEditPart.java9
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateAppliedStereotypeEditPart.java13
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateEditPart.java6
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteAppliedStereotypeEditPart.java13
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteEditPart.java6
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java13
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundEditPart.java6
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostAppliedStereotypeEditPart.java12
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostEditPart.java6
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyAppliedStereotypeEditPart.java13
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyEditPart.java6
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncAppliedStereotypeEditPart.java13
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncEditPart.java6
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/PackageEditPart.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/SequenceDiagramEditPart.java63
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantEditPart.java14
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantLabelEditPart.java14
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantNameEditPart.java15
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java12
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java14
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java12
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java12
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java14
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java12
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ActionExecutionSpecificationItemSemanticEditPolicy.java221
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/BehaviorExecutionSpecificationItemSemanticEditPolicy.java221
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragment2ItemSemanticEditPolicy.java221
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java53
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemSemanticEditPolicy.java218
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentItemSemanticEditPolicy.java227
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConsiderIgnoreFragmentItemSemanticEditPolicy.java218
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintItemSemanticEditPolicy.java238
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContextLinkItemSemanticEditPolicy.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContinuationItemSemanticEditPolicy.java227
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicy.java216
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintInMessageItemSemanticEditPolicy.java238
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintItemSemanticEditPolicy.java238
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationObservationItemSemanticEditPolicy.java227
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GeneralOrderingItemSemanticEditPolicy.java204
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java71
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java253
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java261
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionUseItemSemanticEditPolicy.java227
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java272
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageAsyncItemSemanticEditPolicy.java220
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageCreateItemSemanticEditPolicy.java218
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageDeleteItemSemanticEditPolicy.java218
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageFoundItemSemanticEditPolicy.java218
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageLostItemSemanticEditPolicy.java218
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageReplyItemSemanticEditPolicy.java218
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageSyncItemSemanticEditPolicy.java218
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OpenDiagramEditPolicy.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java88
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/StateInvariantItemSemanticEditPolicy.java227
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeConstraintItemSemanticEditPolicy.java238
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeObservationItemSemanticEditPolicy.java227
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java27
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextNonResizableEditPolicy.java12
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextSelectionEditPolicy.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLAbstractExpression.java16
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLOCLFactory.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLAbstractNavigatorItem.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorContentProvider.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorItem.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorLabelProvider.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorActionProvider.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java68
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorGroup.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorItem.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLinkHelper.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorSorter.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/parsers/AbstractParser.java15
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/parsers/MessageFormatParser.java0
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/DeleteElementAction.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/DiagramEditorContextMenuProvider.java11
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/LoadResourceAction.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java10
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/ModelElementSelectionPage.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizard.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizardPage.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramActionBarContributor.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java33
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java103
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDocumentProvider.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLInitDiagramFileAction.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLLinkDescriptor.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLMatchingStrategy.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNewDiagramFileWizard.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNodeDescriptor.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLUriEditorInputTester.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/ValidateAction.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ActionExecutionSpecificationPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/BehaviorExecutionSpecificationPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/CombinedFragmentPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/CommentPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConsiderIgnoreFragmentPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConstraintPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ContinuationPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionOccurrenceSpecificationPreferencePage.java49
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramAppearancePreferencePage.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramConnectionsPreferencePage.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramGeneralPreferencePage.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPreferenceInitializer.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPrintingPreferencePage.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramRulersAndGridPreferencePage.java28
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintInMessagePreferencePage.java49
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationObservationPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/GeneralOrderingPreferencePage.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionOperandPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionPreferencePage.java115
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionUsePreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/LifelinePreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessageOccurrenceSpecificationPreferencePage.java39
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessagePreferencePage.java47
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/StateInvariantPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeConstraintPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeObservationPreferencePage.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLEditPartProvider.java9
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java84
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLIconProvider.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLMarkerNavigationProvider.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationDecoratorProvider.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationProvider.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLVisualTypeProvider.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/parts/CustomInteractionEditPartTN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/figures/CustomInteractionRectangleFigure.java30
-rw-r--r--[-rwxr-xr-x]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/parts/InteractionEditPartTN.java55
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.di2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.notation564
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.uml131
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/model/tt.css11
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations4
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src-gen/org/eclipse/papyrus/uml/service/types/element/UMLElementTypes.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/CombinedFragmentDestroyCommand.java29
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/MoveOperandFragmentsCommand.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/SelectAndDeleteCommand.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/SetMessageSort.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/BehaviorExecutionSpecificationEditHelper.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CommentEditHelper.java)19
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/CombinedFragmentEditHelper.java59
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ConsiderIgnoreFragmentEditHelper.java11
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ExecutionSpecificationEditHelper.java43
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/InteractionEditHelper.java38
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/LifelineEditHelper.java21
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/MessageEditHelper.java36
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ObservationEditHelper.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/TimeConstraintEditHelper.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/ExecutionSpecificationHelperAdvice.java79
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/GeneralOrderingHelperAdvice.java55
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/MessageHelperAdvice.java115
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/OccurrenceSpecificationHelperAdvice.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/request/MoveOperandFragmentEditRequest.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/ElementUtil.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/MessageUtils.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/SequenceRequestConstant.java2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/LifelineXYLayoutEditPolicyTest.java16
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestCombinedFragmentName_382951.java4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestDecompositionCombinedFragment_364813.java4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestDecompositionMove_364812.java4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestLifelineLabelCustomize_383722.java4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/AbstractNodeTest.java2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestElementIcon_396799.java2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestExecutionSpecificationPosition_395462.java10
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/CreateSequenceDiagramCommand.java4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestChildNode.java13
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestSequenceDiagramChildNode.java8
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestSequenceDiagramLink.java7
528 files changed, 12787 insertions, 28808 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/updater/DiagramUpdater.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/updater/DiagramUpdater.xtend
index 8aa08982d0c..9dc3a1c7e10 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/updater/DiagramUpdater.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/updater/DiagramUpdater.xtend
@@ -33,6 +33,8 @@ import xpt.Common_qvto
import xpt.GenModelUtils_qvto
import xpt.diagram.updater.UpdaterLinkType
import xpt.diagram.updater.Utils_qvto
+import java.util.Set
+import org.eclipse.emf.codegen.ecore.genmodel.GenFeature
// we removed all static modifiers and all private methods becames protected to allow to override method.
//see bug421212: [Diagram] Papyrus should provide actions for Show/Hide related links in all diagrams
@@ -201,10 +203,10 @@ import xpt.diagram.updater.Utils_qvto
«ELSE»
«generatedMemberComment»
public «listOfNodeDescriptors» «getSemanticChildrenMethodName(it)»(org.eclipse.gmf.runtime.notation.View view) {
- «IF getSemanticChildrenChildFeatures(it).notEmpty || it.getPhantomNodes().notEmpty»
+ «IF getPossibleSemanticChildrenChildFeatures(it).notEmpty || it.getPhantomNodes().notEmpty»
«defineModelElement(it)»
«newLinkedListOfNodeDescriptors(it.diagramUpdater, 'result')»();
- «/* childMetaFeature can be null here! */FOR childMetaFeature : getSemanticChildrenChildFeatures(it)»
+ «/* childMetaFeature can be null here! */FOR childMetaFeature : getPossibleSemanticChildrenChildFeatures(it)»
«IF null == childMetaFeature»
{ /*FIXME no containment/child feature found in the genmodel, toolsmith need to specify Class here manually*/ childElement =
/*FIXME no containment/child feature found in the genmodel, toolsmith need to specify correct one here manually*/;
@@ -241,6 +243,21 @@ import xpt.diagram.updater.Utils_qvto
}
«ENDIF»
'''
+
+ def Set<GenFeature> getPossibleSemanticChildrenChildFeatures(GenContainerBase container) {
+ var result = <GenFeature>newHashSet();
+ val containerMetaclass = container.metaClass;
+
+ if (containerMetaclass != null) {
+ for (feature : getSemanticChildrenChildFeatures(container)) {
+ if(containerMetaclass.ecoreClass.EAllStructuralFeatures.contains(feature.ecoreFeature)){
+ result.add(feature);
+ }
+ }
+ }
+
+ return result;
+ }
override defineLinkSource(TypeLinkModelFacet it, boolean inLoop) '''
«IF sourceMetaFeature.listType»
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultGraphicalNodeEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultGraphicalNodeEditPolicy.java
index a8c43cb80a3..c1a134de908 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultGraphicalNodeEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/DefaultGraphicalNodeEditPolicy.java
@@ -18,6 +18,7 @@ import java.util.Map;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.GraphicalEditPart;
@@ -74,7 +75,7 @@ public class DefaultGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
View targetView = (View) request.getTargetEditPart().getModel();
createElementRequest.setParameter(RequestParameterConstants.EDGE_CREATE_REQUEST_TARGET_VIEW, targetView);
- createElementRequest.setParameter(RequestParameterConstants.EDGE_TARGET_POINT, request.getLocation());
+ createElementRequest.setParameter(RequestParameterConstants.EDGE_TARGET_POINT, request.getLocation().getCopy());
// see bug 430702: [Diagram] Moving source of a link moves the target too, we need to store in the parameters :
// - the source point
@@ -136,6 +137,8 @@ public class DefaultGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
return null;
}
CreateConnectionViewRequest req = (CreateConnectionViewRequest) request;
+
+
CompositeCommand cc = new CompositeCommand(DiagramUIMessages.Commands_CreateCommand_Connection_Label);
Diagram diagramView = ((View) getHost().getModel()).getDiagram();
@@ -148,7 +151,7 @@ public class DefaultGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
// see bug 430702: [Diagram] Moving source of a link moves the target too, we need to store the source point to fix this bug.
@SuppressWarnings("unchecked")
Map<Object, Object> parameters = req.getExtendedData();
- parameters.put(RequestParameterConstants.EDGE_SOURCE_POINT, request.getLocation());
+ parameters.put(RequestParameterConstants.EDGE_SOURCE_POINT, request.getLocation().getCopy());
SetConnectionEndsCommand sceCommand = new SetConnectionEndsCommand(editingDomain, StringStatics.BLANK);
sceCommand.setEdgeAdaptor(getViewAdapter());
@@ -178,6 +181,7 @@ public class DefaultGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
@Override
protected Command getReconnectSourceCommand(final ReconnectRequest request) {
final Command reconnectCmd = super.getReconnectSourceCommand(request);
+
if (reconnectCmd != null && reconnectCmd.canExecute()) {
final CompoundCommand cc = new CompoundCommand();
cc.add(reconnectCmd);
@@ -209,7 +213,7 @@ public class DefaultGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
}
-
+
/**
*
* @return
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/XYLayoutWithConstrainedResizedEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/XYLayoutWithConstrainedResizedEditPolicy.java
index ea0dcb65f4d..dc7adaca490 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/XYLayoutWithConstrainedResizedEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/XYLayoutWithConstrainedResizedEditPolicy.java
@@ -19,7 +19,11 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.RectangleFigure;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.PrecisionPoint;
import org.eclipse.draw2d.geometry.PrecisionRectangle;
@@ -52,6 +56,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.commands.FixEdgeAnchorsDeferredC
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.FixAnchorHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.ServiceUtilsForEditPart;
+import org.omg.CORBA.Bounds;
/**
*
@@ -143,6 +148,7 @@ public class XYLayoutWithConstrainedResizedEditPolicy extends XYLayoutEditPolicy
}
return chainGuideAttachmentCommands(request, new ICommandProxy(cc.reduce()));
}
+
/**
* Returns the <code>Command</code> to resize a group of children.
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/NotationHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/NotationHelper.java
index 5e1edc6205e..3846265feb5 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/NotationHelper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/NotationHelper.java
@@ -15,7 +15,11 @@ package org.eclipse.papyrus.infra.gmfdiag.common.helper;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
@@ -91,4 +95,26 @@ public class NotationHelper {
// Relax the constraints for elements displayed on themselves (e.g. Frame in Composite Structure Diagram)
return parentSemanticElement != semanticElement.eContainer() && parentSemanticElement != semanticElement;
}
+
+ /**
+ * get the absolute position form the notation
+ * @param node the current node
+ * @return
+ */
+ public static PrecisionRectangle getAbsoluteBounds(Node node){
+ if(node.getLayoutConstraint() instanceof Bounds){
+ PrecisionRectangle bounds= new PrecisionRectangle( ((Bounds)node.getLayoutConstraint()).getX(),((Bounds)node.getLayoutConstraint()).getY(),((Bounds)node.getLayoutConstraint()).getWidth(), ((Bounds)node.getLayoutConstraint()).getHeight());
+ EObject currentView = (EObject) node.eContainer();
+ while (currentView!=null){
+
+ if (currentView instanceof Node){
+ Point ptCurrenview= new Point( ((Bounds)((Node)currentView).getLayoutConstraint()).getX(),((Bounds)((Node)currentView).getLayoutConstraint()).getY());
+ bounds.translate(ptCurrenview);
+ }
+ currentView= currentView.eContainer();
+ }
+ return bounds;
+ }
+ else return null;
+ }
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/selection/SelectSeveralLinksEditPartTracker.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/selection/SelectSeveralLinksEditPartTracker.java
new file mode 100644
index 00000000000..c076b1c0524
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/selection/SelectSeveralLinksEditPartTracker.java
@@ -0,0 +1,424 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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) - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.common.selection;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.SnapToHelper;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.requests.BendpointRequest;
+import org.eclipse.gef.requests.LocationRequest;
+import org.eclipse.gef.tools.SelectEditPartTracker;
+import org.eclipse.gmf.runtime.draw2d.ui.geometry.PointListUtilities;
+import org.eclipse.gmf.runtime.gef.ui.internal.l10n.Cursors;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @since 3.0
+ * this class is used to move several links at the same time.
+ */
+public class SelectSeveralLinksEditPartTracker extends SelectEditPartTracker {
+
+
+
+ /**
+ * Key modifier for ignoring snap while dragging. It's CTRL on Mac, and ALT on all
+ * other platforms.
+ */
+ private final int MODIFIER_NO_SNAPPING;
+ private Request sourceRequest;
+ private int index = -1;
+ private String type;
+ private boolean bSourceFeedback = false;
+
+ private PrecisionRectangle sourceRectangle;
+ private Point originalLocation = null;
+ protected HashMap<EditPart, Point> locationsForEditParts= new HashMap<EditPart, Point>();
+
+ int[] relativePosition=null;
+
+
+ /**
+ * Method SelectConnectionEditPartTracker.
+ * @param owner ConnectionNodeEditPart that creates and owns the tracker object
+ */
+ public SelectSeveralLinksEditPartTracker(ConnectionEditPart owner) {
+ super(owner);
+
+ if (SWT.getPlatform().equals("carbon"))//$NON-NLS-1$
+ MODIFIER_NO_SNAPPING = SWT.CTRL;
+ else
+ MODIFIER_NO_SNAPPING = SWT.ALT;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.gef.tools.AbstractTool#handleButtonDown(int)
+ */
+ protected boolean handleButtonDown(int button) {
+ if (!super.handleButtonDown(button))
+ return false;
+
+ Point p = getLocation();
+ getConnection().translateToRelative(p);
+
+ PointList points = getConnection().getPoints();
+ Dimension size = new Dimension(7, 7);
+ getConnection().translateToRelative(size);
+ for (int i=1; i<points.size()-1; i++) {
+ Point ptCenter = points.getPoint(i);
+ Rectangle rect = new Rectangle( ptCenter.x - size.width / 2, ptCenter.y - size.height / 2, size.width, size.height);
+
+ if (rect.contains(p)) {
+ setType(RequestConstants.REQ_MOVE_BENDPOINT);
+ setIndex(i);
+ }
+ }
+
+ if (getIndex() == -1) {
+ setIndex(PointListUtilities.findNearestLineSegIndexOfPoint(getConnection().getPoints(), new Point(p.x, p.y)));
+
+ setIndex(getIndex() - 1);
+ setType(RequestConstants.REQ_CREATE_BENDPOINT);
+ }
+
+ //compute the relative position be fore the beginning of the move
+ List editparts = getOperationSet();
+ relativePosition=new int[editparts.size()];
+ if(editparts.size()>1){
+ for (int i=0; i<editparts.size()-1;i++){
+ Object currentEditPart = editparts.get(i);
+ Object nextEditPart = editparts.get(i+1);
+ if(currentEditPart instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart && nextEditPart instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart){
+ Connection currentConnection=((org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart)currentEditPart).getConnectionFigure();
+ Connection nextConnection=((org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart)nextEditPart).getConnectionFigure();
+ Point currentConnectionPosition = currentConnection.getPoints().getFirstPoint().getCopy();
+ Point nextConnectionPosition = nextConnection.getPoints().getFirstPoint().getCopy();
+ relativePosition[i]=nextConnectionPosition.y-currentConnectionPosition.y;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Determines if the the connection should be dragged or not.
+ *
+ * @return <code>boolean</code> <code>true</code> if dragging can occur,
+ * <code>false</code> otherwise.
+ */
+ protected boolean shouldAllowDrag() {
+ return (getIndex() != -1);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.gef.tools.AbstractTool#handleButtonUp(int)
+ */
+ protected boolean handleButtonUp(int button) {
+
+ boolean bExecuteDrag = isInState(STATE_DRAG_IN_PROGRESS) && shouldAllowDrag();
+
+ boolean bRet = super.handleButtonUp(button);
+
+ if (bExecuteDrag) {
+ eraseSourceFeedback();
+ setCurrentCommand(getCommand());
+ executeCurrentCommand();
+ }
+
+ return bRet;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.gef.tools.AbstractTool#handleDragInProgress()
+ */
+ protected boolean handleDragInProgress() {
+ if (isInState(STATE_DRAG_IN_PROGRESS) && shouldAllowDrag()) {
+ updateSourceRequest();
+ showSourceFeedback();
+ setCurrentCommand(getCommand());
+ }
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.gef.tools.AbstractTool#handleDragStarted()
+ */
+ protected boolean handleDragStarted() {
+ originalLocation = null;
+ sourceRectangle = null;
+ return stateTransition(STATE_DRAG, STATE_DRAG_IN_PROGRESS);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.gef.tools.AbstractTool#calculateCursor()
+ */
+ protected Cursor calculateCursor() {
+ if (getType() == RequestConstants.REQ_MOVE_BENDPOINT) {
+ return Cursors.CURSOR_SEG_MOVE;
+ }
+
+ return getConnection().getCursor();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.gef.Tool#deactivate()
+ */
+ public void deactivate() {
+ if (!isInState(STATE_TERMINAL))
+ eraseSourceFeedback();
+ sourceRequest = null;
+ super.deactivate();
+ }
+
+ /**
+ * @return boolean true if feedback is being displayed, false otherwise.
+ */
+ private boolean isShowingFeedback() {
+ return bSourceFeedback;
+ }
+
+ /**
+ * Method setShowingFeedback.
+ * @param bSet boolean to set the feedback flag on or off.
+ */
+ private void setShowingFeedback(boolean bSet) {
+ bSourceFeedback = bSet;
+ }
+
+ /**
+ * @see org.eclipse.gef.tools.AbstractTool#createOperationSet()
+ */
+ protected List createOperationSet() {
+ List list = new ArrayList();
+ list.add(getConnectionEditPart());
+ return list;
+ }
+
+ /**
+ * Method showSourceFeedback.
+ * Show the source drag feedback for the drag occurring
+ * within the viewer.
+ */
+ private void showSourceFeedback() {
+ List editParts = getOperationSet();
+ for (int i = 0; i < editParts.size(); i++) {
+ EditPart editPart = (EditPart) editParts.get(i);
+ LocationRequest locationRequest= (LocationRequest)getSourceRequest();
+ if( locationsForEditParts.get(editPart)!=null){
+ Point location= locationsForEditParts.get(editPart);
+ locationRequest.setLocation(location);
+ editPart.showSourceFeedback(locationRequest);
+ }
+ //editPart.showSourceFeedback(getSourceRequest());
+ }
+ setShowingFeedback(true);
+ }
+
+ /**
+ * Method eraseSourceFeedback.
+ * Show the source drag feedback for the drag occurring
+ * within the viewer.
+ */
+ private void eraseSourceFeedback() {
+ if (!isShowingFeedback())
+ return;
+ setShowingFeedback(false);
+ List editParts = getOperationSet();
+
+ for (int i = 0; i < editParts.size(); i++) {
+ EditPart editPart = (EditPart) editParts.get(i);
+ LocationRequest locationRequest= (LocationRequest)getSourceRequest();
+ if( locationsForEditParts.get(editPart)!=null){
+ Point location= locationsForEditParts.get(editPart);
+ locationRequest.setLocation(location);
+ editPart.eraseSourceFeedback(locationRequest);
+ }
+
+ }
+ }
+
+ /**
+ * Method getSourceRequest.
+ * @return Request
+ */
+ private Request getSourceRequest() {
+ if (sourceRequest == null)
+ sourceRequest = createSourceRequest();
+ return sourceRequest;
+ }
+
+ /**
+ * Determines the type of request that will be created for the drag
+ * operation.
+ * @return Object
+ */
+ protected Object getType() {
+ return type;
+ }
+
+ /**
+ * Sets the type of request that will be created for the drag operation.
+ *
+ * @param type the <code>String</code> that represents the type of request.
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * Creates the source request that is activated when the drag operation
+ * occurs.
+ *
+ * @return a <code>Request</code> that is the newly created source request
+ */
+ protected Request createSourceRequest() {
+ BendpointRequest request = new BendpointRequest();
+ request.setType(getType());
+ request.setIndex(getIndex());
+ request.setSource((ConnectionEditPart)getSourceEditPart());
+ return request;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.gef.tools.AbstractTool#getCommand()
+ */
+ protected Command getCommand() {
+ List editparts = getOperationSet();
+ EditPart part;
+
+ CompoundCommand command = new CompoundCommand();
+ command.setDebugLabel("change bounds");//$NON-NLS-1$
+ for (int i = 0; i < editparts.size(); i++) {
+ part = (EditPart) editparts.get(i);
+ LocationRequest locationRequest= (LocationRequest)getSourceRequest();
+ if( locationsForEditParts.get(part)!=null){
+ Point location= locationsForEditParts.get(part);
+ locationRequest.setLocation(location);
+ command.add(part.getCommand(locationRequest));
+ }
+ }
+ return command.unwrap();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.gef.tools.AbstractTool#getCommandName()
+ */
+ protected String getCommandName() {
+ return getType().toString();
+ }
+
+ /**
+ * @return the <code>Connection</code> that is referenced by the connection edit part.
+ */
+ private Connection getConnection() {
+ return (Connection) getConnectionEditPart().getFigure();
+ }
+
+ /**
+ * Method getConnectionEditPart.
+ * @return ConnectionEditPart
+ */
+ private ConnectionEditPart getConnectionEditPart() {
+ return (ConnectionEditPart)getSourceEditPart();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.gef.tools.AbstractTool#getDebugName()
+ */
+ protected String getDebugName() {
+ return "Bendpoint Handle Tracker " + getCommandName(); //$NON-NLS-1$
+ }
+
+ /**
+ * Gets the current line segment index that the user clicked on to
+ * activate the drag tracker.
+ *
+ * @return int
+ */
+ protected int getIndex() {
+ return index;
+ }
+
+ /**
+ * Method setIndex.
+ * Sets the current line segment index based on the location the user
+ * clicked on the connection.
+ * @param i int representing the line segment index in the connection.
+ */
+ public void setIndex(int i) {
+ index = i;
+ }
+
+ /**
+ * @see org.eclipse.gef.tools.SimpleDragTracker#updateSourceRequest()
+ */
+ protected void updateSourceRequest() {
+ List editparts = getOperationSet();
+ Dimension delta = getDragMoveDelta();
+ Point mouseLocation = getStartLocation().getCopy();
+ mouseLocation.translate(delta.width, delta.height);
+ for (int index=0; index<editparts.size();index++){
+ Object currentEditPart = editparts.get(index);
+ if(currentEditPart instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart ){
+ if( index>0){
+ mouseLocation.translate(new Dimension (0,relativePosition[index-1]));
+ }
+ locationsForEditParts.put((EditPart)currentEditPart, mouseLocation.getCopy());
+
+ }
+ }
+ }
+ /**
+ * @see org.eclipse.gef.tools.AbstractTool#getOperationSet()
+ *
+ * @return
+ */
+ @Override
+ protected List getOperationSet() {
+ if(getCurrentViewer().getSelectedEditParts().contains(getSourceEditPart())){
+ return getCurrentViewer().getSelectedEditParts();}
+ ArrayList result= new ArrayList<>();
+ result.add(getSourceEditPart());
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InteractionRectangleFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InteractionRectangleFigure.java
index 14f7aa292c6..6e721c9be5a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InteractionRectangleFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InteractionRectangleFigure.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
+ * Copyright (c) 2016 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -8,100 +8,55 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
+ * Patrick Tessier (CEA LIST) - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.figure.node;
-import org.eclipse.draw2d.BorderLayout;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.OrderedLayout;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.ToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.InteractionFigure;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.LeftToolbarLayout;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
public class InteractionRectangleFigure extends RoundedCompartmentFigure {
- protected InteractionFigure interactionLabelContainer;
- protected RectangleFigure interactionContentPane;
+ /** The Internal Structure Compartment */
+ private final static String INTERACTION_COMPARTMENT = "interactionCompartment";
- protected PapyrusWrappingLabel interactionLabel;
+ /** The List of Compartment */
+ private final static List<String> COMPARTMENT = new ArrayList<String>() {
- private boolean myUseLocalCoordinates = false;
+ private static final long serialVersionUID = 1L;
+ {
+ add(INTERACTION_COMPARTMENT);
+ }
+ };
/**
- * @param marginBorder
+ * Constructor.
*
*/
public InteractionRectangleFigure() {
- setLayoutManager(new BorderLayout());
- createContents();
+ this(null);
}
-
/**
- * @generated
- */
-
- protected void createContents() {
- add(createHeader(), BorderLayout.TOP);
- add(createContentPane(), BorderLayout.CENTER);
- }
-
- protected RectangleFigure createContentPane() {
- interactionContentPane = new RectangleFigure();
- // Margin allow to add message easily
- interactionContentPane.setBorder(new MarginBorder(5, 5, 5, 5));
- interactionContentPane.setFill(false);
- interactionContentPane.setOutline(true);
-
- return interactionContentPane;
- }
-
- protected RectangleFigure createHeader() {
- interactionLabel = new PapyrusWrappingLabel();
-
- interactionLabelContainer = new InteractionFigure();
- interactionLabelContainer.setBorder(new MarginBorder(3, 3, 3, 3));
- interactionLabelContainer.setLayoutManager(new LeftToolbarLayout());
-
- interactionLabelContainer.add(interactionLabel);
-
- RectangleFigure container = new RectangleFigure();
- container.setOutline(false);
- container.setFill(false);
- container.setLayoutManager(new ToolbarLayout(false));
- container.add(interactionLabelContainer, OrderedLayout.ALIGN_CENTER);
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean useLocalCoordinates() {
- return myUseLocalCoordinates;
- }
-
- /**
- * @generated
+ * Create a new Classifier figure with the given tag
+ *
+ * @param tagLabel
+ * a String that will be displayed at the top of the figure
*/
- protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
- myUseLocalCoordinates = useLocalCoordinates;
+ public InteractionRectangleFigure(String tagLabel) {
+ super(COMPARTMENT, tagLabel);
}
/**
- * @generated
+ * Get the attribute's compartment figure
+ *
+ * @return
*/
- public WrappingLabel getHeaderLabel() {
- return interactionLabel;
- }
-
- public RectangleFigure getCompartmentFigure() {
- return interactionContentPane;
+ public IFigure getCompartmentFigure() {
+ return getCompartment(INTERACTION_COMPARTMENT);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/theme/umlBase.css b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/theme/umlBase.css
index 139be73d70a..d51187124c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/theme/umlBase.css
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/theme/umlBase.css
@@ -503,3 +503,23 @@ InteractionOverviewDiagram Activity
SequenceDiagram InteractionOperand {
borderStyle: dash;
}
+
+SequenceDiagram Interaction {
+ textAlignment:"left";
+ displayHeader:true;
+}
+SequenceDiagram Interaction > Compartment{
+ displayBorder:false;
+}
+
+SequenceDiagram Lifeline {
+ displayBorder:false;
+}
+
+SequenceDiagram CombinedFragment {
+ textAlignment:"left";
+ displayHeader:true;
+}
+SequenceDiagram CombinedFragment > Compartment{
+ displayBorder:false;
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromRefreshCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromRefreshCommand.java
index 6087e3f6653..d90a79d836d 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromRefreshCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromRefreshCommand.java
@@ -39,7 +39,7 @@ import org.eclipse.papyrus.uml.diagram.interactionoverview.utils.CallBehaviorUti
import org.eclipse.papyrus.uml.diagram.interactionoverview.utils.CreateDiagramImage;
import org.eclipse.papyrus.uml.diagram.interactionoverview.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.interactionoverview.utils.URIUtils;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.timing.edit.parts.TimingDiagramEditPart;
import org.eclipse.swt.graphics.Image;
@@ -122,7 +122,7 @@ public class CreateSnapshotForInteractionFromRefreshCommand extends AbstractTran
}
protected PreferencesHint getReferenceHint(final String type) {
- if (PackageEditPart.MODEL_ID.equals(type)) {
+ if (SequenceDiagramEditPart.MODEL_ID.equals(type)) {
return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
} else if (TimingDiagramEditPart.MODEL_ID.equals(type)) {
return org.eclipse.papyrus.uml.diagram.timing.part.UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromViewDescriptorCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromViewDescriptorCommand.java
index 173e0667993..52b3896b963 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromViewDescriptorCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/CreateSnapshotForInteractionFromViewDescriptorCommand.java
@@ -46,7 +46,7 @@ import org.eclipse.papyrus.uml.diagram.interactionoverview.provider.DiagramConte
import org.eclipse.papyrus.uml.diagram.interactionoverview.utils.CallBehaviorUtil;
import org.eclipse.papyrus.uml.diagram.interactionoverview.utils.CreateDiagramImage;
import org.eclipse.papyrus.uml.diagram.interactionoverview.utils.URIUtils;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.timing.edit.parts.TimingDiagramEditPart;
import org.eclipse.swt.graphics.Image;
@@ -141,7 +141,7 @@ public class CreateSnapshotForInteractionFromViewDescriptorCommand extends Abstr
}
protected PreferencesHint getReferenceHint(final String type) {
- if (PackageEditPart.MODEL_ID.equals(type)) {
+ if (SequenceDiagramEditPart.MODEL_ID.equals(type)) {
return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
} else if (TimingDiagramEditPart.MODEL_ID.equals(type)) {
return org.eclipse.papyrus.uml.diagram.timing.part.UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/DiagramContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/DiagramContentProvider.java
index 16e5730b921..a1c34ace821 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/DiagramContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/provider/DiagramContentProvider.java
@@ -24,7 +24,7 @@ import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ModelEditPart;
import org.eclipse.papyrus.uml.diagram.interactionoverview.Activator;
import org.eclipse.papyrus.uml.diagram.interactionoverview.edit.part.InteractionOverviewDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.timing.edit.parts.TimingDiagramEditPart;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.Interaction;
@@ -78,7 +78,7 @@ public class DiagramContentProvider extends MoDiscoContentProvider implements IH
private boolean isValidDiagram(final Diagram diagram) {
// seqDiagram or comDiagram
- if (diagram.getType().equals(PackageEditPart.MODEL_ID) || diagram.getType().equals(ModelEditPart.MODEL_ID)) {
+ if (diagram.getType().equals(SequenceDiagramEditPart.MODEL_ID) || diagram.getType().equals(ModelEditPart.MODEL_ID)) {
if (diagram.getElement().equals(interaction)) {
return true;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/build.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/build.properties
index 03ee3c23f0a..287e4d0aa05 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/build.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/build.properties
@@ -8,10 +8,7 @@ bin.includes = META-INF/,\
plugin.properties,\
plugin.xml,\
about.html,\
- custom-messages.properties,\
- model/sequencediagram-uml.elementtypesconfigurations,\
- model/sequencediagram.elementtypesconfigurations,\
- model/PapyrusUMLSequenceDiagram.paletteconfiguration
+ custom-messages.properties,
output..=bin/
jars.compile.order=.
src.includes = about.html
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramCommand.java
index c5d50abb0ad..0c285f3d620 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramCommand.java
@@ -16,7 +16,7 @@ package org.eclipse.papyrus.uml.diagram.sequence;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
import org.eclipse.papyrus.uml.diagram.common.commands.CreateBehavioredClassifierDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.uml2.uml.UMLPackage;
@@ -31,7 +31,7 @@ public class CreateSequenceDiagramCommand extends CreateBehavioredClassifierDiag
*/
@Override
protected String getDiagramNotationID() {
- return PackageEditPart.MODEL_ID;
+ return SequenceDiagramEditPart.MODEL_ID;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CustomSequencePaletteFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CustomSequencePaletteFactory.java
new file mode 100644
index 00000000000..610b6f4b0f5
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CustomSequencePaletteFactory.java
@@ -0,0 +1,602 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Soyatec - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.sequence;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.Cursors;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.requests.CreateConnectionRequest;
+import org.eclipse.gef.requests.CreationFactory;
+import org.eclipse.gef.tools.CreationTool;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.ConnectionViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GateEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AnnotatedLinkEndEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AnnotatedLinkStartEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.HighlightEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
+import org.eclipse.papyrus.uml.diagram.sequence.util.TooltipHook;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * @author Jin Liu (jin.liu@soyatec.com)
+ */
+public class CustomSequencePaletteFactory extends PaletteFactory.Adapter {
+
+ private static final String CREATECOMBINEDFRAGMENTTOOL = "createCombinedFragmentTool";
+
+ private static final String CREATECONSIDERIGNOREFRAGMENTTOOL = "createConsiderIgnoreFragmentTool";
+
+ private static final String CREATEDURATIONCONSTRAINTTOOL = "createDurationConstraintTool";
+
+ private static final String CREATEDURATIONOBSERVATIONTOOL = "createDurationObservationTool";
+
+ private static final String CREATETIMEOBSERVATIONTOOL = "createTimeObservationTool";
+
+ private static final String CREATEDESTRUCTIONEVENTTOOL = "createDestructionEventTool";
+
+ private static final String CREATECOMMENTTOOL = "createCommentTool";
+
+ private static final String CREATECONSTRAINTTOOL = "createConstraintTool";
+
+ private static final String CREATEMESSAGESYNCTOOL = "createMessageSyncTool";
+
+ private static final String CREATEMESSAGEASYNCTOOL = "createMessageAsyncTool";
+
+ private static final String CREATEMESSAGEREPLYTOOL = "createMessageReplyTool";
+
+ private static final String CREATEMESSAGECREATETOOL = "createMessageCreateTool";
+
+ private static final String CREATEMESSAGEDELETETOOL = "createMessageDeleteTool";
+
+ private static final String CREATEMESSAGELOSTTOOL = "createMessageLostTool";
+
+ private static final String CREATEMESSAGEFOUNDTOOL = "createMessageFoundTool";
+
+ private static final String CREATEGENERALORDERINGTOOL = "createGeneralOrderingTool";
+
+ private static final String CREATEANNOTATEDLINKTOOL = "createAnnotatedLinkTool";
+
+ private static final String CREATEGATETOOL = "createGateTool";
+
+ public CustomSequencePaletteFactory() {
+ }
+
+ @Override
+ public Tool createTool(String toolId) {
+ if (toolId.equals(CREATECOMBINEDFRAGMENTTOOL)) {
+ return createCombinedFragmentCreationTool();
+ }
+ // add
+ if (toolId.equals(CREATECONSIDERIGNOREFRAGMENTTOOL)) {
+ return createConsiderIgnoreFragmentCreationTool();
+ }
+ if (toolId.equals(CREATECOMMENTTOOL)) {
+ return createCommentCreationTool();
+ }
+ if (toolId.equals(CREATECONSTRAINTTOOL)) {
+ return createConstraintCreationTool();
+ }
+ if (toolId.equals(CREATEDURATIONOBSERVATIONTOOL)) {
+ return createDurationObservationCreationTool();
+ }
+ if (toolId.equals(CREATETIMEOBSERVATIONTOOL)) {
+ return createTimeObservationCreationTool();
+ }
+ if (toolId.equals(CREATEDURATIONCONSTRAINTTOOL)) {
+ return createDurationConstraintCreationTool();
+ }
+ if (toolId.equals(CREATEDESTRUCTIONEVENTTOOL)) {
+ return createDestructionEventCreationTool();
+ }
+ if (toolId.equals(CREATEMESSAGESYNCTOOL)) {
+ return createMessageSyncCreationTool();
+ }
+ if (toolId.equals(CREATEMESSAGEASYNCTOOL)) {
+ return createMessageAsyncCreationTool();
+ }
+ if (toolId.equals(CREATEMESSAGEREPLYTOOL)) {
+ return createMessageReplyCreationTool();
+ }
+ if (toolId.equals(CREATEMESSAGECREATETOOL)) {
+ return createMessageCreateCreationTool();
+ }
+ if (toolId.equals(CREATEMESSAGEDELETETOOL)) {
+ return createMessageDeleteCreationTool();
+ }
+ if (toolId.equals(CREATEMESSAGELOSTTOOL)) {
+ return createMessageLostCreationTool();
+ }
+ if (toolId.equals(CREATEMESSAGEFOUNDTOOL)) {
+ return createMessageFoundCreationTool();
+ }
+ if (toolId.equals(CREATEGENERALORDERINGTOOL)) {
+ return createGeneralOrderingCreationTool();
+ }
+ if (toolId.equals(CREATEANNOTATEDLINKTOOL)) {
+ return createAnnotatedLinkCreationTool();
+ }
+ if (toolId.equals(CREATEGATETOOL)) {
+ return createGateTool();
+ }
+ // default return: null
+ return null;
+ }
+
+ /**
+ * @return
+ */
+ private Tool createGateTool() {
+ return new CreationTool(new CreationFactory() {
+
+ @Override
+ public Object getObjectType() {
+ return GateEditPart.GATE_TYPE;
+ }
+
+ @Override
+ public Object getNewObject() {
+ return GateEditPart.GATE_TYPE;
+ }
+ });
+ }
+
+ @Override
+ public Object getTemplate(String templateId) {
+ // default return: null
+ return null;
+ }
+
+ private Tool createCombinedFragmentCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ // types.add(UMLElementTypes.ConsiderIgnoreFragment_Shape);
+ types.add(UMLElementTypes.CombinedFragment_Shape);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ private Tool createConsiderIgnoreFragmentCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.ConsiderIgnoreFragment_Shape);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ private Tool createCommentCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Comment_Shape);
+ // Tool tool = new AspectUnspecifiedTypeCreationTool(types){
+ // protected Command getCommand() {
+ // if (!antiScroll){
+ // if(getTargetEditPart() instanceof LifelineEditPart){
+ // InteractionInteractionCompartmentEditPart parent = ((LifelineEditPart) getTargetEditPart()).getParentInteractionCompartmentEditPart();
+ // if(parent != null)
+ // return parent.getCommand( getTargetRequest() );
+ // }
+ // return super.getCommand();
+ // }
+ // return null;
+ // }
+ // };
+ InteractionChildCreationTool tool = new InteractionChildCreationTool(types);
+ return tool;
+ }
+
+ private Tool createConstraintCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Constraint_Shape);
+ // Tool tool = new AspectUnspecifiedTypeCreationTool(types){
+ // protected Command getCommand() {
+ // if (!antiScroll){
+ // if(getTargetEditPart() instanceof LifelineEditPart){
+ // InteractionInteractionCompartmentEditPart parent = ((LifelineEditPart) getTargetEditPart()).getParentInteractionCompartmentEditPart();
+ // if(parent != null)
+ // return parent.getCommand( getTargetRequest() );
+ // }
+ // return super.getCommand();
+ // }
+ // return null;
+ // }
+ // };
+ InteractionChildCreationTool tool = new InteractionChildCreationTool(types);
+ return tool;
+ }
+
+ private Tool createDurationObservationCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.DurationObservation_Shape);
+ // use DurationCreationTool
+ // Tool tool = new DurationCreationTool(types);
+ // AspectUnspecifiedTypeCreationTool tool = new AspectUnspecifiedTypeCreationTool(types);
+ InteractionChildCreationTool tool = new InteractionChildCreationTool(types);
+ // tool.setDefaultCursor(SharedCursors.HAND);
+ // tool.setDisabledCursor(SharedCursors.NO);
+ return tool;
+ }
+
+ private Tool createTimeObservationCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.TimeObservation_Shape);
+ // AspectUnspecifiedTypeCreationTool tool = new AspectUnspecifiedTypeCreationTool(types){
+ // protected Command getCommand() {
+ // if (!antiScroll){
+ // if(getTargetEditPart() instanceof LifelineEditPart){
+ // InteractionInteractionCompartmentEditPart parent = ((LifelineEditPart) getTargetEditPart()).getParentInteractionCompartmentEditPart();
+ // if(parent != null)
+ // return parent.getCommand( getTargetRequest() );
+ // }
+ // return super.getCommand();
+ // }
+ // return null;
+ // }
+ // };
+ InteractionChildCreationTool tool = new InteractionChildCreationTool(types);
+ // tool.setDefaultCursor(SharedCursors.HAND);
+ // tool.setDisabledCursor(SharedCursors.NO);
+ return tool;
+ }
+
+ private Tool createDurationConstraintCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.DurationConstraint_Shape);
+ // types.add(UMLElementTypes.DurationConstraint_Shape_CN);
+ // use DurationCreationTool
+ // Tool tool = new DurationCreationTool(types);
+ // Disable old DurationConstraint creation.
+ InteractionChildCreationTool tool = new InteractionChildCreationTool(types);
+ return tool;
+ }
+
+ private Tool createDestructionEventCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.DestructionOccurrenceSpecification_Shape);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ private Tool createMessageSyncCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Message_SynchEdge);
+ Tool tool = new MessageConnectionTool(types);
+ return tool;
+ }
+
+ private Tool createMessageAsyncCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Message_AsynchEdge);
+ Tool tool = new MessageConnectionTool(types);
+ return tool;
+ }
+
+ private Tool createMessageReplyCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Message_ReplyEdge);
+ Tool tool = new MessageConnectionTool(types);
+ return tool;
+ }
+
+ private Tool createMessageCreateCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Message_CreateEdge);
+ Tool tool = new MessageConnectionTool(types);
+ return tool;
+ }
+
+ private Tool createMessageDeleteCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Message_DeleteEdge);
+ Tool tool = new MessageConnectionTool(types);
+ return tool;
+ }
+
+ private Tool createMessageLostCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Message_LostEdge);
+ Tool tool = new MessageConnectionTool(types);
+ return tool;
+ }
+
+ private Tool createMessageFoundCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Message_FoundEdge);
+ Tool tool = new MessageConnectionTool(types);
+ return tool;
+ }
+
+ private Tool createGeneralOrderingCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.GeneralOrdering_Edge);
+ Tool tool = new AspectUnspecifiedTypeConnectionToolEx(types);
+ return tool;
+ }
+
+ private Tool createAnnotatedLinkCreationTool() {
+ AspectUnspecifiedTypeConnectionToolEx tool = new AspectUnspecifiedTypeConnectionToolEx(null) {
+
+ @Override
+ protected CreateConnectionRequest createTargetRequest() {
+ IHintedType type = (IHintedType) UMLElementTypes.Comment_AnnotatedElementEdge;
+ return new CreateConnectionViewRequest(new ConnectionViewDescriptor(type, type.getSemanticHint(), getPreferencesHint()));
+ }
+
+ @Override
+ protected String getCommandName() {
+ if (isInState(STATE_CONNECTION_STARTED | STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
+ return AnnotatedLinkEndEditPolicy.REQ_ANNOTATED_LINK_END;
+ } else {
+ return AnnotatedLinkStartEditPolicy.REQ_ANNOTATED_LINK_START;
+ }
+ }
+
+ @Override
+ protected boolean handleCreateConnection() {
+ boolean handled = super.handleCreateConnection();
+ // Make sure to erase source feedback whatever the connection created or not.
+ setAvoidDeactivation(false);
+ eraseSourceFeedback();
+ deactivate();
+ return handled;
+ }
+ };
+ tool.setUnloadWhenFinished(true);
+ return tool;
+ }
+
+ public static class AspectUnspecifiedTypeConnectionToolEx extends AspectUnspecifiedTypeConnectionTool {
+
+ private EditPart source;
+
+ private TooltipHook tooltipHook = null;
+
+ public AspectUnspecifiedTypeConnectionToolEx(List<IElementType> elementTypes) {
+ super(elementTypes);
+ setDisabledCursor(Cursors.NO);
+ }
+
+ @Override
+ public void setViewer(EditPartViewer viewer) {
+ super.setViewer(viewer);
+ if (tooltipHook == null || !tooltipHook.isHooked(viewer)) {
+ if (tooltipHook != null) {
+ tooltipHook.dispose();
+ }
+ tooltipHook = new TooltipHook(viewer);
+ }
+ }
+
+ @Override
+ public void deactivate() {
+ super.deactivate();
+ if (tooltipHook != null) {
+ tooltipHook.dispose();
+ tooltipHook = null;
+ }
+ }
+
+ @Override
+ protected void setConnectionSource(EditPart source) {
+ this.source = source;
+ super.setConnectionSource(source);
+ }
+
+ public void clearConnectionFeedback() {
+ if (!isShowingSourceFeedback()) {
+ return;
+ }
+ if (source != null) {
+ Request req = getSourceRequest();
+ req.setType(REQ_CONNECTION_END);
+ source.eraseSourceFeedback(req);
+ }
+ }
+ }
+
+ /**
+ * Try to create child in Interaction directly.
+ *
+ * @author Jin Liu (jin.liu@soyatec.com)
+ */
+ public static class InteractionChildCreationTool extends AspectUnspecifiedTypeCreationTool {
+
+ /**
+ * Constructor.
+ *
+ * @param elementTypes
+ */
+ public InteractionChildCreationTool(List<IElementType> elementTypes) {
+ super(elementTypes);
+ }
+
+ @Override
+ protected boolean updateTargetUnderMouse() {
+ if (antiScroll) {
+ return super.updateTargetUnderMouse();
+ }
+ if (!isTargetLocked()) {
+ EditPart editPart = null;
+ if (getCurrentViewer() != null) {
+ editPart = getCurrentViewer().findObjectAtExcluding(getLocation(), getExclusionSet(), getTargetingConditional());
+ }
+ if (editPart != null) {
+ editPart = getInteractionEditPart(editPart);
+ }
+ boolean changed = getTargetEditPart() != editPart;
+ setTargetEditPart(editPart);
+ return changed;
+ } else {
+ return false;
+ }
+ }
+
+ private EditPart getInteractionEditPart(EditPart editPart) {
+ if (editPart == null) {
+ return null;
+ }
+ if (editPart instanceof InteractionInteractionCompartmentEditPart) {
+ return editPart;
+ }
+ return getInteractionEditPart(editPart.getParent());
+ }
+ }
+
+ public static class MessageConnectionTool extends AspectUnspecifiedTypeConnectionToolEx {
+
+ /**
+ * Constructor.
+ *
+ * @param elementTypes
+ */
+ public MessageConnectionTool(List<IElementType> elementTypes) {
+ super(elementTypes);
+ }
+
+ /**
+ * Updates the target editpart and returns <code>true</code> if the target
+ * changes. The target is updated by using the target conditional and the
+ * target request. If the target has been locked, this method does nothing
+ * and returns <code>false</code>.
+ *
+ * @return <code>true</code> if the target was changed
+ */
+ protected boolean updateTargetUnderMouse() {
+ if (!isTargetLocked()) {
+ EditPart editPart = null;
+ if (getCurrentViewer() != null)
+ editPart = getCurrentViewer().findObjectAtExcluding(
+ getLocation(), getExclusionSet(),
+ getTargetingConditional());
+ System.out.println(this.getClass().getName()+ " "+editPart);
+ if( editPart instanceof InteractionInteractionCompartmentEditPart){
+ editPart = getCurrentViewer().findObjectAtExcluding(
+ getLocation(), getExclusionSet(),
+ getTargetingConditional());
+ editPart= editPart.getParent();
+ }
+ if (editPart != null)
+ editPart = editPart.getTargetEditPart(getTargetRequest());
+ boolean changed = getTargetEditPart() != editPart;
+ setTargetEditPart(editPart);
+ return changed;
+ } else
+ return false;
+ }
+ /**
+ * Queries the target editpart for a command.
+ *
+ * @see org.eclipse.gef.tools.AbstractTool#getCommand()
+ */
+ protected Command getCommand() {
+ if (getTargetEditPart() == null)
+ return null;
+ return getTargetEditPart().getCommand(getTargetRequest());
+ }
+ /**
+ * Returns the current x, y position of the mouse cursor.
+ * Sets the Y coordinate to the one of the start location
+ * for messages created with SHIFT being pressed.
+ *
+ * @return the mouse location
+ */
+ @Override
+ protected Point getLocation() {
+ Point mouseLocation = getCurrentInput().getMouseLocation();
+ // Horizontal connection if Shift is pressed
+ if (getCurrentInput().isShiftKeyDown()) {
+ return new Point(mouseLocation.x, getStartLocation().y);
+ } else {
+ return mouseLocation;
+ }
+ }
+
+ @Override
+ protected void selectAddedObject(EditPartViewer viewer, Collection objects) {
+ final List editparts = new ArrayList();
+ final EditPart[] primaryEP = new EditPart[1];
+ for (Iterator i = objects.iterator(); i.hasNext();) {
+ Object object = i.next();
+ if (object instanceof IAdaptable) {
+ Object editPart = viewer.getEditPartRegistry().get(((IAdaptable) object).getAdapter(View.class));
+ if (editPart instanceof IPrimaryEditPart) {
+ editparts.add(editPart);
+ }
+ // Priority is to put a shape into direct edit mode.
+ if (editPart instanceof ShapeEditPart) {
+ primaryEP[0] = (ShapeEditPart) editPart;
+ }
+ }
+ }
+ if (!editparts.isEmpty()) {
+ viewer.setSelection(new StructuredSelection(editparts));
+ // automatically put the first shape into edit-mode
+ Display.getCurrent().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ if (primaryEP[0] == null) {
+ primaryEP[0] = (EditPart) editparts.get(0);
+ }
+ //
+ // add active test since test scripts are failing on this
+ // basically, the editpart has been deleted when this
+ // code is being executed. (see RATLC00527114)
+ if (primaryEP[0].isActive()) {
+ Request request = new Request(org.eclipse.gef.RequestConstants.REQ_DIRECT_EDIT);
+ // Mark this request as the first direct edit after creation.
+ request.getExtendedData().put(SequenceRequestConstant.DIRECT_EDIT_AFTER_CREATION, true);
+ primaryEP[0].performRequest(request);
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationTool#deactivate()
+ *
+ */
+ @Override
+ public void deactivate() {
+ EditPart targetEditPart = getTargetEditPart();
+ if (targetEditPart != null) {
+ EditPolicy editPolicy = targetEditPart.getEditPolicy(HighlightEditPolicy.HIGHLIGHT_ROLE);
+ if (editPolicy != null) {
+ editPolicy.eraseSourceFeedback(getTargetRequest());
+ }
+ }
+ super.deactivate();
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/LifelineNodePlate.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/LifelineNodePlate.java
new file mode 100644
index 00000000000..e1602585402
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/LifelineNodePlate.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.LinkLFSVGNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
+
+/**
+ * This figure is used in order to allow a link to follow the shape of the lifeLine
+ * see getPolygonPoints()
+ *
+ */
+public class LifelineNodePlate extends LinkLFSVGNodePlateFigure {
+
+ /**
+ * Constructor.
+ *
+ * @param hostEP
+ * @param width
+ * @param height
+ * @param lifelineEditPart TODO
+ */
+ public LifelineNodePlate(org.eclipse.gef.GraphicalEditPart hostEP, int width, int height) {
+ super(hostEP, width, height);
+ withLinkLFEnabled();
+ followSVGPapyrusPath=true;
+
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#getPolygonPoints()
+ */
+ @Override
+ public PointList getPolygonPoints() {
+ return ((NodeFigure)this.getChildren().get(0)).getPolygonPoints();
+ }
+
+ protected ConnectionAnchor createAnchor(PrecisionPoint p) {
+ p.setPreciseX(0.5);// a changer
+ return super.createAnchor(p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ConnectionAnchor createConnectionAnchor(Point p) {
+ if (p == null) {
+ return getConnectionAnchor(szAnchor);
+ } else {
+ Point temp = p.getCopy();
+ translateToRelative(temp);
+ PrecisionPoint pt = BaseSlidableAnchor.getAnchorRelativeLocation(temp, getBounds());
+ pt.setPreciseX(0.5);// a changer
+
+
+ return createAnchor(pt);
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramEditorFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramEditorFactory.java
index 312407be3ed..db2efe63924 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramEditorFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramEditorFactory.java
@@ -14,7 +14,7 @@
package org.eclipse.papyrus.uml.diagram.sequence;
import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
/**
* The editor factory to launch the sequence diagram.
@@ -25,6 +25,6 @@ public class SequenceDiagramEditorFactory extends GmfEditorFactory {
* Instantiates a new sequence diagram editor factory.
*/
public SequenceDiagramEditorFactory() {
- super(UmlSequenceDiagramForMultiEditor.class, PackageEditPart.MODEL_ID);
+ super(UmlSequenceDiagramForMultiEditor.class, SequenceDiagramEditPart.MODEL_ID);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/ChangeEdgeTargetCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/ChangeEdgeTargetCommand.java
index c419f439c80..95a21170648 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/ChangeEdgeTargetCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/ChangeEdgeTargetCommand.java
@@ -149,7 +149,7 @@ public class ChangeEdgeTargetCommand extends AbstractTransactionalCommand {
}
if (edgeElement instanceof Message && MessageSort.DELETE_MESSAGE_LITERAL == ((Message) edgeElement).getMessageSort() && targetElement instanceof DestructionOccurrenceSpecification) {
// Set Message target to newly created DOS, destroy old MessageOccurrenceSpecification
- LifelineMessageDeleteHelper.setMessageEndDos((Message)edgeElement, (DestructionOccurrenceSpecification)targetElement);
+ //LifelineMessageDeleteHelper.setMessageEndDos((Message)edgeElement, (DestructionOccurrenceSpecification)targetElement);
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateCoordinateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateCoordinateCommand.java
new file mode 100644
index 00000000000..b5cc765d90a
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateCoordinateCommand.java
@@ -0,0 +1,89 @@
+package org.eclipse.papyrus.uml.diagram.sequence.command;
+
+import java.util.ArrayList;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.BasicCompartment;
+import org.eclipse.gmf.runtime.notation.Compartment;
+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.StringValueStyle;
+import org.eclipse.gmf.runtime.notation.TitleStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayConstant;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayUtil;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.GrillingEditpart;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.GrillingManagementEditPolicy;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+
+/**
+ * the goal of this command is to create a basic compartment in the notation that represent a compartment of stereotypes
+ *
+ */
+public class CreateCoordinateCommand extends RecordingCommand {
+
+
+ private BasicCompartment compartment;
+
+ private String name;
+
+ private int position;
+ private EObject semantic;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * @param node
+ * The EditPart view of the Compartment
+ */
+ public CreateCoordinateCommand(TransactionalEditingDomain domain, BasicCompartment compartment, String name, Element semantic, int position) {
+ super(domain, "create Grilling Structure");
+ this.compartment = compartment;
+ this.name= name;
+ this.position=position;
+ this.semantic=semantic;
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void doExecute() {
+
+ //create One line
+ Node coordinate= NotationFactory.eINSTANCE.createDecorationNode();
+ Location linelocation=NotationFactory.eINSTANCE.createLocation();
+
+ coordinate.setType(name);
+ if (name.startsWith(GrillingManagementEditPolicy.COLUMN)){
+ linelocation.setX(position);
+ }
+ if (name.startsWith(GrillingManagementEditPolicy.ROW)){
+ linelocation.setY(position);
+ }
+ coordinate.setLayoutConstraint(linelocation);
+ if( semantic!=null){
+ //create EAnnotation
+ EAnnotation eAnnotation =EcoreFactory.eINSTANCE.createEAnnotation();
+ eAnnotation.setSource(GrillingManagementEditPolicy.GRILL_CONNECTION);
+ eAnnotation.getReferences().add(semantic);
+ coordinate.getEAnnotations().add(eAnnotation);
+ ViewUtil.insertChildView(compartment, coordinate, ViewUtil.APPEND, true);
+ }
+
+ }
+
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateElementAndNodeCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateElementAndNodeCommand.java
index afaec4fd584..ba4e223d070 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateElementAndNodeCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateElementAndNodeCommand.java
@@ -97,6 +97,15 @@ public class CreateElementAndNodeCommand extends AbstractTransactionalCommand {
}
return affectedFiles;
}
+ /**
+ * @see org.eclipse.core.commands.operations.AbstractOperation#canExecute()
+ *
+ * @return
+ */
+ @Override
+ public boolean canExecute() {
+ return super.canExecute();
+ }
/**
* put a parameter which will be add to the parameters of the element creation request.
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateGrillingStructureCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateGrillingStructureCommand.java
new file mode 100644
index 00000000000..e04620aa159
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateGrillingStructureCommand.java
@@ -0,0 +1,75 @@
+package org.eclipse.papyrus.uml.diagram.sequence.command;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.BasicCompartment;
+import org.eclipse.gmf.runtime.notation.Compartment;
+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.StringValueStyle;
+import org.eclipse.gmf.runtime.notation.TitleStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayConstant;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayUtil;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.GrillingEditpart;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.GrillingManagementEditPolicy;
+import org.eclipse.uml2.uml.Stereotype;
+
+/**
+ * the goal of this command is to create a basic compartment in the notation that represent a compartment of stereotypes
+ *
+ */
+public class CreateGrillingStructureCommand extends RecordingCommand {
+
+
+ /**
+ *
+ */
+ private static final int Y_SPACE = 30;
+
+ private static final int X_SPACE = 30;
+
+ protected View node;
+
+ protected Node parent;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * @param node
+ * The EditPart view of the Compartment
+ */
+ public CreateGrillingStructureCommand(TransactionalEditingDomain domain, View node) {
+ super(domain, "create Grilling Structure");
+ this.node = node;
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void doExecute() {
+
+ // Create the Graphical Compartment
+ BasicCompartment compartment = NotationFactory.eINSTANCE.createBasicCompartment();
+ // Complete the creation
+ compartment.setType(GrillingEditpart.VISUAL_ID);
+ ViewUtil.insertChildView(node, compartment, ViewUtil.APPEND, true);
+ //create One line
+ Node line= NotationFactory.eINSTANCE.createDecorationNode();
+ Location linelocation=NotationFactory.eINSTANCE.createLocation();
+ linelocation.setY(Y_SPACE);
+ line.setType(GrillingManagementEditPolicy.COLUMN+"0");
+ line.setLayoutConstraint(linelocation);
+ ViewUtil.insertChildView(compartment, line, ViewUtil.APPEND, true);
+
+
+
+ }
+
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomActionExecutionSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomActionExecutionSpecificationCreateCommand.java
deleted file mode 100644
index d79cb54eb86..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomActionExecutionSpecificationCreateCommand.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.sequence.edit.commands.ActionExecutionSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.ActionExecutionSpecification;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomActionExecutionSpecificationCreateCommand extends ActionExecutionSpecificationCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomActionExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomActionExecutionSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * To add the lifeline to the attribute covered of the AES
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // Get the model container
- Object modelContainer = ((CreateElementRequest) getRequest()).getParameters().get(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER);
- // Create the action execution specification
- ActionExecutionSpecification aes = (ActionExecutionSpecification) CommandHelper.doCreateExecutionSpecification(UMLFactory.eINSTANCE.createActionExecutionSpecification(), (Lifeline) getElementToEdit(), modelContainer);
- // TODO : add the corresponding action
- doConfigure(aes, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(aes);
- return CommandResult.newOKCommandResult(aes);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomBehaviorExecutionSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomBehaviorExecutionSpecificationCreateCommand.java
deleted file mode 100644
index 550c91e9cbf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomBehaviorExecutionSpecificationCreateCommand.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.sequence.edit.commands.BehaviorExecutionSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomBehaviorExecutionSpecificationCreateCommand extends BehaviorExecutionSpecificationCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomBehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomBehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * To add the lifeline to the attribute covered of the AES
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // Get the model container
- Object modelContainer = ((CreateElementRequest) getRequest()).getParameters().get(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER);
- // Configure the BehaviorExecutionSpecification
- BehaviorExecutionSpecification bes = (BehaviorExecutionSpecification) CommandHelper.doCreateExecutionSpecification(UMLFactory.eINSTANCE.createBehaviorExecutionSpecification(), (Lifeline) getElementToEdit(), modelContainer);
- doConfigure(bes, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(bes);
- return CommandResult.newOKCommandResult(bes);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragment2CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragment2CreateCommand.java
deleted file mode 100644
index 1bbdcaa4c78..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragment2CreateCommand.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.sequence.edit.commands.CombinedFragment2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Lifeline;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomCombinedFragment2CreateCommand extends CombinedFragment2CreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomCombinedFragment2CreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomCombinedFragment2CreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * Create a CoRegion :
- * - creates two operands
- * - set the Interaction Operator to parallel
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // Get the model container
- Object modelContainer = ((CreateElementRequest) getRequest()).getParameters().get(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER);
- CombinedFragment combinedFragment = CommandHelper.doCreateCoRegion(modelContainer, (Lifeline) getElementToEdit());
- if (combinedFragment != null) {
- doConfigure(combinedFragment, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(combinedFragment);
- return CommandResult.newOKCommandResult(combinedFragment);
- }
- return CommandResult.newErrorCommandResult("");
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragmentCreateCommand.java
deleted file mode 100644
index 225777ff8bd..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragmentCreateCommand.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.Set;
-
-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.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CombinedFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomCombinedFragmentCreateCommand extends CombinedFragmentCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomCombinedFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomCombinedFragmentCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- return getElementToEdit() instanceof Interaction || getElementToEdit() instanceof InteractionOperand;
- }
-
- /**
- * Handle creation on InteractionOperand
- *
- * @Override
- */
- @Override
- @SuppressWarnings("unchecked")
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CombinedFragment newElement = UMLFactory.eINSTANCE.createCombinedFragment();
- // START GENERATED NOT CODE
- EObject elementToEdit = getElementToEdit();
- if (elementToEdit instanceof InteractionOperand) {
- ((InteractionOperand) elementToEdit).getFragments().add(newElement);
- } else if (elementToEdit instanceof Interaction) {
- ((Interaction) elementToEdit).getFragments().add(newElement);
- }
- ElementInitializers.getInstance().init_CombinedFragment_Shape(newElement);
- Set<InteractionFragment> coveredInteractionFragments = (Set<InteractionFragment>) getRequest().getParameters().get(SequenceRequestConstant.COVERED_INTERACTIONFRAGMENTS);
- CustomInteractionOperandCreateCommand.createInteractionOperand(newElement, coveredInteractionFragments);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCommentAnnotatedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCommentAnnotatedElementReorientCommand.java
deleted file mode 100644
index 856974d23dc..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCommentAnnotatedElementReorientCommand.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEndHelper;
-import org.eclipse.uml2.uml.MessageEnd;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomCommentAnnotatedElementReorientCommand extends CommentAnnotatedElementReorientCommand {
-
- /**
- * Constructor.
- *
- * @param request
- */
- public CustomCommentAnnotatedElementReorientCommand(ReorientReferenceRelationshipRequest request) {
- super(request);
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientTarget() throws ExecutionException {
- getOldSource().getAnnotatedElements().remove(getOldTarget());
- getOldSource().getAnnotatedElements().add(getNewTarget());
- if (getOldTarget() instanceof MessageEnd) {
- MessageEndHelper.removeConnectionSourceFromMessageEnd((MessageEnd) getOldTarget(), getOldSource());
- }
- if (getNewTarget() instanceof MessageEnd) {
- MessageEndHelper.addConnectionSourceToMessageEnd((MessageEnd) getNewTarget(), getOldSource());
- }
- return CommandResult.newOKCommandResult(getOldSource());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConsiderIgnoreFragmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConsiderIgnoreFragmentCreateCommand.java
deleted file mode 100644
index e00b2b468f7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConsiderIgnoreFragmentCreateCommand.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.Set;
-
-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.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConsiderIgnoreFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.ConsiderIgnoreFragment;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.InteractionOperatorKind;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomConsiderIgnoreFragmentCreateCommand extends ConsiderIgnoreFragmentCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- return getElementToEdit() instanceof Interaction || getElementToEdit() instanceof InteractionOperand;
- }
-
- /**
- * Handle creation on InteractionOperand
- *
- * @Override
- */
- @Override
- @SuppressWarnings("unchecked")
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- ConsiderIgnoreFragment newElement = UMLFactory.eINSTANCE.createConsiderIgnoreFragment();
- ElementInitializers.getInstance().init_ConsiderIgnoreFragment_Shape(newElement);
- // START GENERATED NOT CODE
- EObject elementToEdit = getElementToEdit();
- InteractionFragment owner = null;
- if (elementToEdit instanceof InteractionOperand) {
- InteractionOperand io = (InteractionOperand) elementToEdit;
- owner = io;
- io.getFragments().add(newElement);
- } else {
- Interaction i = (Interaction) elementToEdit;
- owner = i;
- i.getFragments().add(newElement);
- }
- newElement.setInteractionOperator(InteractionOperatorKind.CONSIDER_LITERAL);
- // Create an interaction operand with the ConsiderIgnoreFragment (multiplicy 1...*)
- InteractionOperand createInteractionOperand = UMLFactory.eINSTANCE.createInteractionOperand();
- newElement.getOperands().add(createInteractionOperand);
- Set<InteractionFragment> coveredInteractionFragments = (Set<InteractionFragment>) getRequest().getParameters().get(SequenceRequestConstant.COVERED_INTERACTIONFRAGMENTS);
- if (coveredInteractionFragments != null) {
- // set the enclosing operand to the newly created one if the current enclosing interaction is the enclosing interaction
- // of the new operand.
- // => the interaction fragment that are inside an other container (like an enclosed CF) are not modified
- for (InteractionFragment ift : coveredInteractionFragments) {
- if (owner.equals(ift.getEnclosingOperand()) || owner.equals(ift.getEnclosingInteraction())) {
- ift.setEnclosingInteraction(null);
- ift.setEnclosingOperand(createInteractionOperand);
- }
- }
- }
- // END GENERATED NOT CODE
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintConstrainedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintConstrainedElementReorientCommand.java
deleted file mode 100644
index 20b627b77d2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintConstrainedElementReorientCommand.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEndHelper;
-import org.eclipse.uml2.uml.MessageEnd;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomConstraintConstrainedElementReorientCommand extends ConstraintConstrainedElementReorientCommand {
-
- /**
- * Constructor.
- *
- * @param request
- */
- public CustomConstraintConstrainedElementReorientCommand(ReorientReferenceRelationshipRequest request) {
- super(request);
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientTarget() throws ExecutionException {
- getOldSource().getConstrainedElements().remove(getOldTarget());
- getOldSource().getConstrainedElements().add(getNewTarget());
- if (getOldTarget() instanceof MessageEnd) {
- MessageEndHelper.removeConnectionSourceFromMessageEnd((MessageEnd) getOldTarget(), getOldSource());
- }
- if (getNewTarget() instanceof MessageEnd) {
- MessageEndHelper.addConnectionSourceToMessageEnd((MessageEnd) getNewTarget(), getOldSource());
- }
- return CommandResult.newOKCommandResult(getOldSource());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintCreateCommand.java
deleted file mode 100644
index 03066cf4a64..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintCreateCommand.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.emf.ecore.EObject;
-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.uml.diagram.sequence.edit.commands.ConstraintCreateCommand;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Namespace;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomConstraintCreateCommand extends ConstraintCreateCommand {
-
- private EObject eObject;
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- this.eObject = eObject;
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- if (container != null) {
- return getNamespace(container);
- }
- return getNamespace(eObject);
- }
-
- /**
- * @Override
- */
- @Override
- public boolean canExecute() {
- return getElementToEdit() instanceof Namespace;
- }
-
- protected Namespace getNamespace(EObject element) {
- if (element instanceof Namespace) {
- return (Namespace) element;
- }
- if (element instanceof Lifeline) {
- return ((Lifeline) element).getInteraction();
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContextLinkCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContextLinkCreateCommand.java
deleted file mode 100644
index ffccac19251..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContextLinkCreateCommand.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boutheina Bannour (CEA LIST) boutheina.bannour@cea.fr - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-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.sequence.edit.commands.ContextLinkCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
-import org.eclipse.uml2.common.util.CacheAdapter;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Namespace;
-
-/**
- * use to construct the instance specification link between two instance
- *
- */
-public class CustomContextLinkCreateCommand extends ContextLinkCreateCommand {
-
- public CustomContextLinkCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- private View findView(EObject element) {
- if (element == null) {
- return null;
- }
- Collection<Setting> settings = CacheAdapter.getInstance().getNonNavigableInverseReferences(element);
- for (Setting ref : settings) {
- if (NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
- View view = (View) ref.getEObject();
- if (view != null) {
- return view;
- }
- }
- }
- return null;
- }
-
- @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 Namespace) {
- return false;
- }
- if (getSource() == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- if (getSource() != null) {
- if (getSource().getContext() != null && target != null) {
- if (getSource() instanceof Constraint) {
- View viewConstraint = findView(getSource());
- List sourceConnections = ViewUtil.getSourceConnections(viewConstraint); // get all outgoing connections from constraint view
- for (Object connector : sourceConnections) {
- if (!(connector instanceof Edge)) {
- continue;
- }
- Edge edge = (Edge) connector;
- EObject targetElem = edge.getTarget().getElement();
- if (targetElem instanceof Namespace) {
- if (("" + ContextLinkEditPart.VISUAL_ID).equals(edge.getType()))
- {
- return false; // case of the connector representing a context link
- }
- }
- }
- }
- }
- }
- if (getTarget() != null && (getTarget().getOwnedRules().contains(getTarget()))) {
- return false;
- }
- return true;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContinuationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContinuationCreateCommand.java
deleted file mode 100644
index aa14ac6e055..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContinuationCreateCommand.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.sequence.edit.commands.ContinuationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Continuation;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.InteractionOperatorKind;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomContinuationCreateCommand extends ContinuationCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomContinuationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomContinuationCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * @Override
- */
- @Override
- public boolean canExecute() {
- if (getElementToEdit() instanceof InteractionOperand) {
- InteractionOperand interactionOperand = (InteractionOperand) getElementToEdit();
- CombinedFragment combinedFragment = getEnclosingCombinedFragment(interactionOperand);
- if (combinedFragment != null) {
- if (combinedFragment.getInteractionOperator() == InteractionOperatorKind.ALT_LITERAL) {
- return true;
- }
- }
- }
- return false;
- }
-
- private CombinedFragment getEnclosingCombinedFragment(InteractionFragment interactionFragment) {
- if (interactionFragment.eContainer() instanceof CombinedFragment) {
- return (CombinedFragment) interactionFragment.eContainer();
- } else if (interactionFragment.eContainer() instanceof InteractionFragment) {
- return getEnclosingCombinedFragment((InteractionFragment) interactionFragment.eContainer());
- }
- return null;
- }
-
- /**
- * Generated not to handle the constraint on covered lifelines.
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Continuation newElement = UMLFactory.eINSTANCE.createContinuation();
- InteractionOperand owner = (InteractionOperand) getElementToEdit();
- owner.getFragments().add(newElement);
- // Continuations are always global in the enclosing InteractionFragment
- // (e.g., it always covers all Lifelines covered by the enclosing InteractionFragment)
- newElement.getCovereds().addAll(owner.getCovereds());
- ElementInitializers.getInstance().init_Continuation_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDestructionOccurrenceSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDestructionOccurrenceSpecificationCreateCommand.java
deleted file mode 100644
index cf253656484..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDestructionOccurrenceSpecificationCreateCommand.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.sequence.edit.commands.DestructionOccurrenceSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Lifeline;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomDestructionOccurrenceSpecificationCreateCommand extends DestructionOccurrenceSpecificationCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomDestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomDestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * A DestructionEvent on a lifeline can only be created if it doesn't exist yet a destructionEvent on that lifeline.
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- // Get the lifeline
- Lifeline lifeline = (Lifeline) getElementToEdit();
- for (InteractionFragment ift : lifeline.getCoveredBys()) {
- if (ift instanceof DestructionOccurrenceSpecification) {
- // For each occurenceSpecification which covered the lifeline, check the associated event.
- return false;
- }
- }
- return true;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // Get the model container
- Object modelContainer = ((CreateElementRequest) getRequest()).getParameters().get(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER);
- DestructionOccurrenceSpecification destructionSpecification = CommandHelper.doCreateDestructionOccurrenceSpecification((Lifeline) getElementToEdit(), modelContainer);
- ElementInitializers.getInstance().init_DestructionOccurrenceSpecification_Shape(destructionSpecification);
- doConfigure(destructionSpecification, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(destructionSpecification);
- return CommandResult.newOKCommandResult(destructionSpecification);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintCreateCommand.java
deleted file mode 100644
index 732f3795e3e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintCreateCommand.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-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.sequence.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomDurationConstraintCreateCommand extends DurationConstraintCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomDurationConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomDurationConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * @Override enable only if there is occurrence specifications
- */
- @Override
- public boolean canExecute() {
- /*
- * // check first occurrence specification
- * if(!getRequest().getParameters().containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION)) {
- * return true; // duration creation is in progress; source is not defined yet
- * }
- * Object paramOccurrence1 = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
- * List<OccurrenceSpecification> occ1List = SequenceUtil.getAsOccSpecList(paramOccurrence1);
- * if(occ1List.isEmpty()) {
- * return false;
- * }
- * // check second occurrence specification
- * if(!getRequest().getParameters().containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2)) {
- * return true; // duration creation is in progress; target is not defined yet
- * }
- * Object paramOccurrence2 = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2);
- * List<OccurrenceSpecification> occ2List = SequenceUtil.getAsOccSpecList(paramOccurrence2);
- * if(occ2List.isEmpty()) {
- * return false;
- * }
- * // disable duration constraint on a same event
- * if(!Collections.disjoint(occ1List, occ2List)) {
- * return false;
- * }
- * // enable duration constraint only on a same lifeline or on message
- * OccurrenceSpecification[] pair = SequenceUtil.getPairOfCorrespondingOccSpec(occ1List, occ2List);
- * if(pair != null && pair.length > 1) {
- * boolean enabled = DurationConstraintHelper.coversSameLifeline(pair[0], pair[1]);
- * // handle creation on message
- * enabled |= DurationConstraintHelper.endsOfSameMessage(pair[0], pair[1]);
- * return enabled;
- * }
- * return false;
- */
- return true;
- }
-
- /**
- * @Override get the Lifeline parent as owner, assign the occurrence specifications
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
- // get the Lifeline parent as owner
- Namespace owner = getNamespace(getElementToEdit());
- owner.getOwnedRules().add(newElement);
- ElementInitializers.getInstance().init_DurationConstraint_Shape(newElement);
- // assign the occurrence specification
- Object paramOccurrence1 = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
- List<OccurrenceSpecification> occ1List = SequenceUtil.getAsOccSpecList(paramOccurrence1);
- Object paramOccurrence2 = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2);
- List<OccurrenceSpecification> occ2List = SequenceUtil.getAsOccSpecList(paramOccurrence2);
- OccurrenceSpecification[] pair = SequenceUtil.getPairOfCorrespondingOccSpec(occ1List, occ2List);
- if (pair != null && pair.length > 1) {
- newElement.getConstrainedElements().add(pair[0]);
- newElement.getConstrainedElements().add(pair[1]);
- }
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- protected Namespace getNamespace(EObject element) {
- if (element instanceof Namespace) {
- return (Namespace) element;
- }
- if (element instanceof CombinedFragment) {
- return ((CombinedFragment) element).getNamespace();
- }
- return getNamespace(element.eContainer());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintInMessageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintInMessageCreateCommand.java
deleted file mode 100644
index aa9e0788d60..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintInMessageCreateCommand.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintInMessageCreateCommand;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomDurationConstraintInMessageCreateCommand extends DurationConstraintInMessageCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomDurationConstraintInMessageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomDurationConstraintInMessageCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * @Override disable, use {@link DurationConstraintCreateCommand} instead
- */
- @Override
- public boolean canExecute() {
- // disable, use {@link DurationConstraintCreateCommand} instead
- return false;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationObservationCreateCommand.java
deleted file mode 100644
index f00ce8c761f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationObservationCreateCommand.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-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.sequence.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomDurationObservationCreateCommand extends DurationObservationCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomDurationObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomDurationObservationCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * @Override enable only if there is occurrence specifications
- */
- @Override
- public boolean canExecute() {
- // Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364826
- return true;
- // // check first occurrence specification
- // if(!getRequest().getParameters().containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION)) {
- // return true; // duration creation is in progress; source is not defined yet
- // }
- // Object paramOccurrence1 = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
- // List<OccurrenceSpecification> occ1List = SequenceUtil.getAsOccSpecList(paramOccurrence1);
- // if(occ1List.isEmpty()) {
- // return false;
- // }
- // // check second occurrence specification
- // if(!getRequest().getParameters().containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2)) {
- // // duration creation is in progress; target is not defined yet
- // // enable duration observation only on a message
- // for(OccurrenceSpecification occurrence : occ1List) {
- // if(occurrence instanceof MessageOccurrenceSpecification) {
- // Message mess = ((MessageOccurrenceSpecification)occurrence).getMessage();
- // if(mess != null) {
- // return true;
- // }
- // }
- // }
- // return false;
- // }
- // Object paramOccurrence2 = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2);
- // List<OccurrenceSpecification> occ2List = SequenceUtil.getAsOccSpecList(paramOccurrence2);
- // if(occ2List.isEmpty()) {
- // return false;
- // }
- // // disable duration observation on a same event
- // if(!Collections.disjoint(occ1List, occ2List)) {
- // return false;
- // }
- // // enable duration observation only on a message
- // OccurrenceSpecification[] pair = SequenceUtil.getPairOfCorrespondingOccSpec(occ1List, occ2List);
- // if(pair != null && pair.length > 1) {
- // return DurationObservationHelper.endsOfSameMessage(pair[0], pair[1]);
- // }
- // return false;
- }
-
- /**
- * @Override get the parent package as owner, assign the occurrence specifications
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- DurationObservation newElement = UMLFactory.eINSTANCE.createDurationObservation();
- // get the parent package as owner
- EObject container = getElementToEdit();
- while (container != null && !(container instanceof Package)) {
- container = container.eContainer();
- }
- if (container == null) {
- return CommandResult.newCancelledCommandResult();
- }
- Package owner = (Package) container;
- owner.getPackagedElements().add(newElement);
- ElementInitializers.getInstance().init_DurationObservation_Shape(newElement);
- // assign the occurrence specification
- Object paramOcc1 = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
- List<OccurrenceSpecification> occ1List = SequenceUtil.getAsOccSpecList(paramOcc1);
- Object paramOcc2 = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2);
- List<OccurrenceSpecification> occ2List = SequenceUtil.getAsOccSpecList(paramOcc2);
- OccurrenceSpecification[] pair = SequenceUtil.getPairOfCorrespondingOccSpec(occ1List, occ2List);
- if (pair != null && pair.length > 1) {
- newElement.getEvents().add(pair[0]);
- newElement.getEvents().add(pair[1]);
- }
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomGeneralOrderingCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomGeneralOrderingCreateCommand.java
deleted file mode 100644
index 67635064584..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomGeneralOrderingCreateCommand.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomGeneralOrderingCreateCommand extends GeneralOrderingCreateCommand {
-
- protected final EObject source;
-
- protected final EObject target;
-
- protected InteractionFragment container;
-
- /**
- * Non generated, completely redefined to find correct ends and correct container
- *
- * @Override find source and target events and container
- */
- public CustomGeneralOrderingCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- // check source occurrence specification
- List<OccurrenceSpecification> possibleSourceOcc = null;
- if (getRequest().getParameters().containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION)) {
- Object paramOccurrence1 = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
- List<OccurrenceSpecification> occ1List = SequenceUtil.getAsOccSpecList(paramOccurrence1);
- possibleSourceOcc = occ1List;
- }
- // check target occurrence specification
- List<OccurrenceSpecification> possibleTargetOcc = null;
- if (getRequest().getParameters().containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2)) {
- Object paramOccurrence2 = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2);
- List<OccurrenceSpecification> occ2List = SequenceUtil.getAsOccSpecList(paramOccurrence2);
- possibleTargetOcc = occ2List;
- }
- // disable duration constraint on a same event
- if (possibleSourceOcc != null && !possibleSourceOcc.isEmpty()) {
- this.source = possibleSourceOcc.get(0);
- } else {
- this.source = null;
- }
- if (possibleTargetOcc != null && !possibleTargetOcc.isEmpty() && Collections.disjoint(possibleSourceOcc, possibleTargetOcc)) {
- this.target = possibleTargetOcc.get(0);
- } else {
- // set invalid target to disable it (or null to enable in case second end is not defined)
- this.target = target;
- }
- container = deduceContainer(source, target);
- }
-
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof OccurrenceSpecification) {
- return false;
- }
- if (target != null && false == target instanceof OccurrenceSpecification) {
- 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().canCreateGeneralOrdering_Edge(getContainer(), getSource(), getTarget());
- }
-
- @Override
- protected OccurrenceSpecification getSource() {
- return (OccurrenceSpecification) source;
- }
-
- @Override
- protected OccurrenceSpecification getTarget() {
- return (OccurrenceSpecification) target;
- }
-
- @Override
- public InteractionFragment getContainer() {
- return container;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionCreateCommand.java
deleted file mode 100644
index 555eb3cba91..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionCreateCommand.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.sequence.edit.commands.InteractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.BehavioredClassifier;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomInteractionCreateCommand extends InteractionCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomInteractionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomInteractionCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * @Override-NOT
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
- EObject elementToEdit = getElementToEdit();
- if (elementToEdit instanceof Package) {
- if (((Package) elementToEdit).getPackagedElements() != null) {
- ((Package) elementToEdit).getPackagedElements().add(newElement);
- }
- // the interaction will be created in a behavioredClassifier
- } else if (elementToEdit instanceof BehavioredClassifier) {
- ((BehavioredClassifier) elementToEdit).setClassifierBehavior(newElement);
- }
- ElementInitializers.getInstance().init_Interaction_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionOperandCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionOperandCreateCommand.java
deleted file mode 100644
index e779402b8ce..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionOperandCreateCommand.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.Set;
-
-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.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionOperandCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.InteractionConstraint;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.LiteralInteger;
-import org.eclipse.uml2.uml.LiteralString;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomInteractionOperandCreateCommand extends InteractionOperandCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomInteractionOperandCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomInteractionOperandCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * Generated not for add combined fragment's covered lifelines on interaction operand
- *
- * @Override
- */
- @Override
- @SuppressWarnings({ "unchecked" })
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CombinedFragment owner = (CombinedFragment) getElementToEdit();
- Set<InteractionFragment> coveredInteractionFragments = (Set<InteractionFragment>) getRequest().getParameters().get(SequenceRequestConstant.COVERED_INTERACTIONFRAGMENTS);
- InteractionOperand newElement = createInteractionOperand(owner, coveredInteractionFragments);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- @SuppressWarnings({ "rawtypes" })
- public static InteractionOperand createInteractionOperand(CombinedFragment cf, Set<InteractionFragment> coveredInteractionFragments) {
- InteractionOperand newIO = UMLFactory.eINSTANCE.createInteractionOperand();
- cf.getOperands().add(newIO);
- // we don't use ElementInitializers.init_NamedElement here because the standard algo using namespace is not suitable
- String base = newIO.eClass().getName();
- String name = ElementInitializers.getNextNumberedName(cf.getOperands(), base);
- newIO.setName(name);
- // Add all combined fragment's covered lifelines on interaction operand
- for (InteractionOperand operand : cf.getOperands()) {
- operand.getCovereds().addAll(cf.getCovereds());
- }
- // create guard
- InteractionConstraint guard = UMLFactory.eINSTANCE.createInteractionConstraint();
- newIO.setGuard(guard);
- LiteralString literalString = UMLFactory.eINSTANCE.createLiteralString();
- literalString.setValue("undefined");
- guard.setSpecification(literalString);
- LiteralInteger min = UMLFactory.eINSTANCE.createLiteralInteger();
- min.setValue(0);
- guard.setMinint(min);
- LiteralInteger max = UMLFactory.eINSTANCE.createLiteralInteger();
- max.setValue(1);
- guard.setMaxint(max);
- if (coveredInteractionFragments != null) {
- InteractionFragment cfOwner = null;
- if (cf.getEnclosingOperand() != null) {
- cfOwner = cf.getEnclosingOperand();
- } else if (cf.getEnclosingInteraction() != null) {
- cfOwner = cf.getEnclosingInteraction();
- }
- if (cfOwner != null) {
- // set the enclosing operand to the newly created one if the current enclosing interaction is the enclosing interaction
- // of the new operand.
- // => the interaction fragment that are inside an other container (like an enclosed CF) are not modified
- for (InteractionFragment ift : coveredInteractionFragments) {
- if (cfOwner.equals(ift.getEnclosingOperand()) || cfOwner.equals(ift.getEnclosingInteraction())) {
- ift.setEnclosingInteraction(null);
- ift.setEnclosingOperand(newIO);
- }
- }
- }
- }
- return newIO;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionUseCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionUseCreateCommand.java
deleted file mode 100644
index 9c4120904bd..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionUseCreateCommand.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.sequence.edit.commands.InteractionUseCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.InteractionUse;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomInteractionUseCreateCommand extends InteractionUseCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomInteractionUseCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomInteractionUseCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- return getElementToEdit() instanceof Interaction || getElementToEdit() instanceof InteractionOperand;
- }
-
- /**
- * Handle creation on InteractionOperand
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- InteractionUse newElement = UMLFactory.eINSTANCE.createInteractionUse();
- EObject elementToEdit = getElementToEdit();
- if (elementToEdit instanceof InteractionOperand) {
- InteractionOperand owner = (InteractionOperand) elementToEdit;
- owner.getFragments().add(newElement);
- } else {
- Interaction owner = (Interaction) elementToEdit;
- owner.getFragments().add(newElement);
- }
- ElementInitializers.getInstance().init_InteractionUse_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomLifelineCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomLifelineCreateCommand.java
deleted file mode 100644
index 55e64e655bf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomLifelineCreateCommand.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.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.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.LifelineCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.PartDecomposition;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomLifelineCreateCommand extends LifelineCreateCommand {
-
- /**
- * The list of the available properties
- */
- private List<Property> availableProperties;
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomLifelineCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomLifelineCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * Add generated NOT to constrain the creation of a lifeline
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- return !(getElementToEdit() instanceof InteractionOperand);
- }
-
- /**
- * Generated not for add lifelines on lifeline
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- EObject object = getElementToEdit();
- Interaction interactionOwner = null;
- Property property = null;
- Lifeline newElement = UMLFactory.eINSTANCE.createLifeline();
- if (object instanceof Lifeline) {
- Lifeline parentLifeline = (Lifeline) object;
- property = CommandHelper.getProperties(availableProperties);
- if (property == null) {
- return CommandResult.newCancelledCommandResult();
- }
- newElement.setRepresents(property);
- interactionOwner = parentLifeline.getInteraction();
- // create or retrieve a PartDecomposition
- PartDecomposition partDecomposition = parentLifeline.getDecomposedAs();
- if (partDecomposition == null) {
- List<InteractionFragment> ifts = interactionOwner.getFragments();
- partDecomposition = UMLFactory.eINSTANCE.createPartDecomposition();
- partDecomposition.setName(ElementInitializers.getNextNumberedName(ifts, partDecomposition.eClass().getName()));
- ifts.add(partDecomposition);
- parentLifeline.setDecomposedAs(partDecomposition);
- }
- partDecomposition.getCovereds().add(newElement);
- } else {
- interactionOwner = (Interaction) getElementToEdit();
- }
- interactionOwner.getLifelines().add(newElement);
- ElementInitializers.getInstance().init_Lifeline_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @Override
- */
- @Override
- protected void doConfigure(Lifeline 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());
- // fix bug 364696(https://bugs.eclipse.org/bugs/show_bug.cgi?id=364696)
- Object object = getRequest().getParameters().get(SequenceRequestConstant.CONNECTABLE_ELEMENT);
- if (object instanceof ConnectableElement) {
- newElement.setRepresents((ConnectableElement) object);
- }
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * Set available property
- *
- * @param availableProperties
- * The available properties
- */
- public void setAvailableProperties(List<Property> availableProperties) {
- this.availableProperties = availableProperties;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage2CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage2CreateCommand.java
deleted file mode 100644
index 74d88eac7b3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage2CreateCommand.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.Map;
-
-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.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OccurrenceSpecificationHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage2CreateCommand extends Message2CreateCommand {
-
- /**
- * Message for create link error
- */
- private static final String CREATE_LINK_ERROR_MSG = "Invalid arguments in create link command"; //$NON-NLS-1$
-
- /**
- * Message for no container error
- */
- private static final String NO_CONTAINER_ERROR_MSG = "There is now valid container for events"; //$NON-NLS-1$
-
- /**
- * Constructor.
- *
- * @param request
- * @param source
- * @param target
- */
- public CustomMessage2CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- if (getSource() != null && getTarget() != null) {
- if (!CommandHelper.hasValidContainer(getRequest())) {
- return false;
- }
- }
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_AsynchEdge(getContainer(), getSource(), getTarget())) {
- return false;
- }
- return MessageConnectionHelper.canExist(MessageSort.ASYNCH_CALL_LITERAL, getSource(), getTarget());
- }
-
- /**
- * added code to create the gate , message occurence and event when a Async message is created.
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException(CREATE_LINK_ERROR_MSG);
- }
- Map<Object, Object> parameters = getRequest().getParameters();
- Message message = CommandHelper.doCreateMessage(container, null, getSource(), getTarget(), parameters);
- // Fixed bug about creating message, if created failed, return error result.
- if (message == null || message.getSendEvent() == null || message.getReceiveEvent() == null) {
- return CommandResult.newErrorCommandResult("Failed to create message");
- }
- if (message != null) {
- // Do reset message end to target ExecutionSpecification. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=402975
- if (getTarget() instanceof ExecutionOccurrenceSpecification) {
- ExecutionSpecification execution = ((ExecutionOccurrenceSpecification) getTarget()).getExecution();
- if (execution != null) {
- OccurrenceSpecificationHelper.resetExecutionStart(execution, message.getReceiveEvent());
- }
- }
- if (getSource() instanceof ExecutionOccurrenceSpecification) {
- ExecutionSpecification execution = ((ExecutionOccurrenceSpecification) getSource()).getExecution();
- if (execution != null) {
- OccurrenceSpecificationHelper.resetExecutionStart(execution, message.getSendEvent());
- }
- }
- doConfigure(message, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(message);
- return CommandResult.newOKCommandResult(message);
- }
- return CommandResult.newErrorCommandResult(NO_CONTAINER_ERROR_MSG);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage2ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage2ReorientCommand.java
deleted file mode 100644
index 838325725bd..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage2ReorientCommand.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.ReconnectMessageHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage2ReorientCommand extends Message2ReorientCommand {
-
- /**
- * Constructor.
- *
- * @param request
- */
- public CustomMessage2ReorientCommand(ReorientRelationshipRequest request) {
- super(request);
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientSource() {
- if (!(getOldSource() instanceof Element && getNewSource() instanceof Element)) {
- return false;
- }
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_AsynchEdge(container, getLink(), getNewSource(), getOldTarget())) {
- return false;
- }
- return MessageConnectionHelper.canReorientSource(getLink(), getNewSource());
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientTarget() {
- if (!(getOldTarget() instanceof Element && getNewTarget() instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_AsynchEdge(container, getLink(), source, getNewTarget())) {
- return false;
- }
- return MessageConnectionHelper.canReorientTarget(getLink(), getNewTarget());
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientSource() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getSendEvent(), getOldSource(), getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientTarget() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getReceiveEvent(), getOldTarget(), getNewTarget());
- ReconnectMessageHelper.updateMessage(getLink());
- return CommandResult.newOKCommandResult(getLink());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage3CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage3CreateCommand.java
deleted file mode 100644
index 59a26a02dff..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage3CreateCommand.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OccurrenceSpecificationHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage3CreateCommand extends Message3CreateCommand {
-
- /**
- * Constructor.
- *
- * @param request
- * @param source
- * @param target
- */
- public CustomMessage3CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- if (getSource() != null && getTarget() != null) {
- if (!CommandHelper.hasValidContainer(getRequest())) {
- return false;
- }
- }
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_ReplyEdge(getContainer(), getSource(), getTarget())) {
- return false;
- }
- return MessageConnectionHelper.canExist(MessageSort.REPLY_LITERAL, getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
- InteractionFragment sourceContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.SOURCE_MODEL_CONTAINER);
- InteractionFragment targetContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.TARGET_MODEL_CONTAINER);
- Message message = CommandHelper.doCreateMessage(container, MessageSort.REPLY_LITERAL, getSource(), getTarget(), sourceContainer, targetContainer);
- if (message != null) {
- // Reset the finish of target ExecutionSpecification to message end. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=402975F
- if (getSource() instanceof ExecutionSpecification) {
- OccurrenceSpecificationHelper.resetExecutionFinish((ExecutionSpecification) getSource(), message.getSendEvent());
- }
- doConfigure(message, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(message);
- return CommandResult.newOKCommandResult(message);
- }
- return CommandResult.newErrorCommandResult("There is now valid container for events"); //$NON-NLS-1$
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage3ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage3ReorientCommand.java
deleted file mode 100644
index 7e05a71016d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage3ReorientCommand.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OccurrenceSpecificationHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.ReconnectMessageHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage3ReorientCommand extends Message3ReorientCommand {
-
- /**
- * Constructor.
- *
- * @param request
- */
- public CustomMessage3ReorientCommand(ReorientRelationshipRequest request) {
- super(request);
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientSource() {
- if (!(getOldSource() instanceof Element && getNewSource() instanceof Element)) {
- return false;
- }
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_ReplyEdge(container, getLink(), getNewSource(), getOldTarget())) {
- return false;
- }
- return MessageConnectionHelper.canReorientSource(getLink(), getNewSource());
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientTarget() {
- if (!(getOldTarget() instanceof Element && getNewTarget() instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_ReplyEdge(container, getLink(), source, getNewTarget())) {
- return false;
- }
- return MessageConnectionHelper.canReorientTarget(getLink(), getNewTarget());
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientSource() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getSendEvent(), getOldSource(), getNewSource());
- // Update Execution Ends after reconncted, https://bugs.eclipse.org/bugs/show_bug.cgi?id=402975
- if (getOldSource() instanceof ExecutionSpecification) {
- OccurrenceSpecificationHelper.resetExecutionFinish((ExecutionSpecification) getNewSource(), UMLFactory.eINSTANCE.createExecutionOccurrenceSpecification());
- }
- if (getNewSource() instanceof ExecutionSpecification) {
- OccurrenceSpecificationHelper.resetExecutionFinish((ExecutionSpecification) getNewSource(), getLink().getSendEvent());
- }
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientTarget() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getReceiveEvent(), getOldTarget(), getNewTarget());
- ReconnectMessageHelper.updateMessage(getLink());
- return CommandResult.newOKCommandResult(getLink());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage4CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage4CreateCommand.java
deleted file mode 100644
index 18d09116831..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage4CreateCommand.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage4CreateCommand extends Message4CreateCommand {
-
- /**
- * Constructor.
- *
- * @param request
- * @param source
- * @param target
- */
- public CustomMessage4CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- // #445271: we don't care about CommandHelper.hasValidContainer()
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_CreateEdge(getContainer(), getSource(), getTarget())) {
- return false;
- }
- return MessageConnectionHelper.canExist(MessageSort.CREATE_MESSAGE_LITERAL, getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
- InteractionFragment sourceContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.SOURCE_MODEL_CONTAINER);
- InteractionFragment targetContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.TARGET_MODEL_CONTAINER);
- Message message = CommandHelper.doCreateMessage(container, MessageSort.CREATE_MESSAGE_LITERAL, getSource(), getTarget(), sourceContainer, targetContainer);
- if (message != null) {
- doConfigure(message, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(message);
- return CommandResult.newOKCommandResult(message);
- }
- return CommandResult.newErrorCommandResult("There is now valid container for events"); //$NON-NLS-1$
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage4ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage4ReorientCommand.java
deleted file mode 100644
index d36beae2411..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage4ReorientCommand.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.ReconnectMessageHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage4ReorientCommand extends Message4ReorientCommand {
-
- /**
- * Constructor.
- *
- * @param request
- */
- public CustomMessage4ReorientCommand(ReorientRelationshipRequest request) {
- super(request);
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientSource() {
- if (!(getOldSource() instanceof Element && getNewSource() instanceof Element)) {
- return false;
- }
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Element target = MessageConnectionHelper.getMessageTarget(getLink());
- Interaction container = (Interaction) getLink().eContainer();
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_CreateEdge(container, getLink(), getNewSource(), target)) {
- return false;
- }
- return MessageConnectionHelper.canReorientSource(getLink(), getNewSource());
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientTarget() {
- if (!(getOldTarget() instanceof Element && getNewTarget() instanceof Element)) {
- return false;
- }
- Element source = MessageConnectionHelper.getMessageSource(getLink());
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_CreateEdge(container, getLink(), source, getNewTarget())) {
- return false;
- }
- return MessageConnectionHelper.canReorientTarget(getLink(), getNewTarget());
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientSource() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getSendEvent(), getOldSource(), getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientTarget() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getReceiveEvent(), getOldTarget(), getNewTarget());
- ReconnectMessageHelper.updateMessage(getLink());
- return CommandResult.newOKCommandResult(getLink());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage5CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage5CreateCommand.java
deleted file mode 100644
index a730a0c9085..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage5CreateCommand.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.Collection;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-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.papyrus.uml.diagram.common.commands.EObjectInheritanceCopyCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageDeleteHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.common.util.UML2Util;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.MessageSort;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage5CreateCommand extends Message5CreateCommand {
-
- /**
- * Constructor.
- *
- * @param request
- * @param source
- * @param target
- */
- public CustomMessage5CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- if (getSource() != null && getTarget() != null) {
- if (!CommandHelper.hasValidContainer(getRequest())) {
- return false;
- }
- }
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_DeleteEdge(getContainer(), getSource(), getTarget())) {
- return false;
- }
- return MessageConnectionHelper.canExist(MessageSort.DELETE_MESSAGE_LITERAL, getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
- InteractionFragment sourceContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.SOURCE_MODEL_CONTAINER);
- InteractionFragment targetContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.TARGET_MODEL_CONTAINER);
- Lifeline lifeline = null;
- // the Receive Message End
- MessageOccurrenceSpecification receiveMessageEnd = null;
- if (getTarget() instanceof DestructionOccurrenceSpecification) {
- receiveMessageEnd = getReceiveMessageEnd();
- if (receiveMessageEnd != null) {
- lifeline = receiveMessageEnd.getCovereds().get(0);
- } else {
- lifeline = ((DestructionOccurrenceSpecification) getTarget()).getCovereds().get(0);
- }
- } else {
- lifeline = (Lifeline) getTarget();
- }
- // Create the message
- Message message = CommandHelper.doCreateMessage(container, MessageSort.DELETE_MESSAGE_LITERAL, getSource(), lifeline, sourceContainer, targetContainer, null, receiveMessageEnd);
- if (message != null) {
- doConfigure(message, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(message);
- if (getTarget() instanceof DestructionOccurrenceSpecification) {
- LifelineMessageDeleteHelper.setMessageEndDos(message, (DestructionOccurrenceSpecification)getTarget());
- }
- return CommandResult.newOKCommandResult(message);
- }
- return CommandResult.newErrorCommandResult("There is now valid container for events"); //$NON-NLS-1$
- }
-
- /**
- * Get a messageOccurrenceSpecification associated with the existing DestructionEvent :
- * -> Retrieve the associated occurrenceSpecification
- * -> Transform it into a mos
- *
- * @return the mos
- * @throws ExecutionException
- */
- private MessageOccurrenceSpecification getReceiveMessageEnd() throws ExecutionException {
- MessageOccurrenceSpecification mosResult = null;
- OccurrenceSpecification os = null;
- // Get the occurrence specification associated with the destructionEvent
- Collection<Setting> settings = UML2Util.getInverseReferences(getTarget());
- for (Setting setting : settings) {
- if (setting.getEObject() instanceof OccurrenceSpecification) {
- os = (OccurrenceSpecification) setting.getEObject();
- }
- }
- if (os != null) {
- // Transform the occurrenceSpecification into a mos (conserving its properties).
- EObjectInheritanceCopyCommand cmd = new EObjectInheritanceCopyCommand(os, UMLPackage.eINSTANCE.getMessageOccurrenceSpecification(), getEditingDomain());
- if (cmd.canExecute()) {
- IStatus status = cmd.execute(null, null);
- if (status.isOK()) {
- // Destroy the old os
- os.destroy();
- // Get the result MessageOccurrenceSpecification
- mosResult = (MessageOccurrenceSpecification) cmd.getResultEobject();
- }
- }
- }
- return mosResult;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage5ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage5ReorientCommand.java
deleted file mode 100644
index 9e82302c28f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage5ReorientCommand.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.ReconnectMessageHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage5ReorientCommand extends Message5ReorientCommand {
-
- /**
- * Constructor.
- *
- * @param request
- */
- public CustomMessage5ReorientCommand(ReorientRelationshipRequest request) {
- super(request);
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientSource() {
- if (!(getOldSource() instanceof Element && getNewSource() instanceof Element)) {
- return false;
- }
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Element target = MessageConnectionHelper.getMessageTarget(getLink());
- Interaction container = (Interaction) getLink().eContainer();
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_DeleteEdge(container, getLink(), getNewSource(), target)) {
- return false;
- }
- return MessageConnectionHelper.canReorientSource(getLink(), getNewSource());
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientTarget() {
- if (!(getOldTarget() instanceof Element && getNewTarget() instanceof Element)) {
- return false;
- }
- Element source = MessageConnectionHelper.getMessageSource(getLink());
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_DeleteEdge(container, getLink(), source, getNewTarget())) {
- return false;
- }
- return MessageConnectionHelper.canReorientTarget(getLink(), getNewTarget());
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientSource() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getSendEvent(), getOldSource(), getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientTarget() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getReceiveEvent(), getOldTarget(), getNewTarget());
- ReconnectMessageHelper.updateMessage(getLink());
- return CommandResult.newOKCommandResult(getLink());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage6CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage6CreateCommand.java
deleted file mode 100644
index 16810656d28..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage6CreateCommand.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage6CreateCommand extends Message6CreateCommand {
-
- /**
- * Constructor.
- *
- * @param request
- * @param source
- * @param target
- */
- public CustomMessage6CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- // #445271: we don't care about CommandHelper.hasValidContainer()
- if (!super.canExecute()) {
- return false;
- }
- return MessageConnectionHelper.canExist(MessageSort.ASYNCH_SIGNAL_LITERAL, getSource(), null);
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
- InteractionFragment sourceContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.SOURCE_MODEL_CONTAINER);
- InteractionFragment targetContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.TARGET_MODEL_CONTAINER);
- Message message = CommandHelper.doCreateMessage(container, MessageSort.ASYNCH_SIGNAL_LITERAL, getSource(), null, sourceContainer, targetContainer);
- if (message != null) {
- doConfigure(message, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(message);
- return CommandResult.newOKCommandResult(message);
- }
- return CommandResult.newErrorCommandResult("There is now valid container for events"); //$NON-NLS-1$
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage6ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage6ReorientCommand.java
deleted file mode 100644
index 0d5386b79e1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage6ReorientCommand.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage6ReorientCommand extends Message6ReorientCommand {
-
- /**
- * Constructor.
- *
- * @param request
- */
- public CustomMessage6ReorientCommand(ReorientRelationshipRequest request) {
- super(request);
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientSource() {
- if (!(getOldSource() instanceof Element && getNewSource() instanceof Element)) {
- return false;
- }
- if (getLink().getOwnedElements().size() != 1) {
- return false;
- }
- Element target = getLink().getOwnedElements().get(0);
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_LostEdge(container, getLink(), getNewSource(), target)) {
- return false;
- }
- return MessageConnectionHelper.canReorientSource(getLink(), getNewSource());
- }
-
- @Override
- protected boolean canReorientTarget() {
- return false;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage7CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage7CreateCommand.java
deleted file mode 100644
index 88e70cb33cd..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage7CreateCommand.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage7CreateCommand extends Message7CreateCommand {
-
- /**
- * Constructor.
- *
- * @param request
- * @param source
- * @param target
- */
- public CustomMessage7CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- // #445271: we don't care about CommandHelper.hasValidContainer()
- if (!super.canExecute()) {
- return false;
- }
- return MessageConnectionHelper.canExist(MessageSort.ASYNCH_SIGNAL_LITERAL, null, getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
- InteractionFragment sourceContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.SOURCE_MODEL_CONTAINER);
- InteractionFragment targetContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.TARGET_MODEL_CONTAINER);
- Message message = CommandHelper.doCreateMessage(container, MessageSort.ASYNCH_SIGNAL_LITERAL, null, getTarget(), sourceContainer, targetContainer);
- if (message != null) {
- doConfigure(message, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(message);
- return CommandResult.newOKCommandResult(message);
- }
- return CommandResult.newErrorCommandResult("There is now valid container for events"); //$NON-NLS-1$
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage7ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage7ReorientCommand.java
deleted file mode 100644
index 6833633e5c8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessage7ReorientCommand.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessage7ReorientCommand extends Message7ReorientCommand {
-
- /**
- * Constructor.
- *
- * @param request
- */
- public CustomMessage7ReorientCommand(ReorientRelationshipRequest request) {
- super(request);
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientSource() {
- // if(!(getOldSource() instanceof Element && getNewSource() instanceof Element)) {
- // return false;
- // }
- // if(getLink().getOwnedElements().size() != 1) {
- // return false;
- // }
- // Element target = getLink().getOwnedElements().get(0);
- // if(!(getLink().eContainer() instanceof Interaction)) {
- // return false;
- // }
- // Interaction container = (Interaction)getLink().eContainer();
- // return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_FoundEdge(container, getLink(), getNewSource(), target);
- return false;
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientTarget() {
- if (!(getOldTarget() instanceof Element && getNewTarget() instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- // Fixed bug about message reconnection.
- if (!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_FoundEdge(container, getLink(), source, getNewTarget())) {
- return false;
- }
- // FIXME: Please complete reorientTarget() firstly.
- return false;
- // return MessageConnectionHelper.canReorientTarget(getLink(), getNewTarget());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessageCreateCommand.java
deleted file mode 100644
index c7051c0c6f6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessageCreateCommand.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OccurrenceSpecificationHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessageCreateCommand extends MessageCreateCommand {
-
- /**
- * Constructor.
- *
- * @param request
- * @param source
- * @param target
- */
- public CustomMessageCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @Override
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- if (getSource() != null && getTarget() != null) {
- if (!CommandHelper.hasValidContainer(getRequest())) {
- return false;
- }
- }
- return MessageConnectionHelper.canExist(MessageSort.SYNCH_CALL_LITERAL, (Element) source, (Element) target);
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
- InteractionFragment sourceContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.SOURCE_MODEL_CONTAINER);
- InteractionFragment targetContainer = (InteractionFragment) getRequest().getParameters().get(SequenceRequestConstant.TARGET_MODEL_CONTAINER);
- Element source = getSource();
- if (source instanceof ExecutionOccurrenceSpecification) {
- source = ((ExecutionOccurrenceSpecification) source).getExecution();
- }
- Message message = CommandHelper.doCreateMessage(container, MessageSort.SYNCH_CALL_LITERAL, source, getTarget(), sourceContainer, targetContainer);
- if (message != null) {
- // Do reset message end to target ExecutionSpecification. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=402975
- if (getTarget() instanceof ExecutionSpecification) {
- OccurrenceSpecificationHelper.resetExecutionStart((ExecutionSpecification) getTarget(), message.getReceiveEvent());
- }
- if (getSource() instanceof ExecutionOccurrenceSpecification) {
- ExecutionSpecification execution = ((ExecutionOccurrenceSpecification) getSource()).getExecution();
- if (execution != null) {
- OccurrenceSpecificationHelper.resetExecutionStart(execution, message.getSendEvent());
- }
- }
- doConfigure(message, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(message);
- return CommandResult.newOKCommandResult(message);
- }
- return CommandResult.newErrorCommandResult("There is now valid container for events"); //$NON-NLS-1$
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessageReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessageReorientCommand.java
deleted file mode 100644
index dcb67c0f6ba..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomMessageReorientCommand.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.util.MessageConnectionHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OccurrenceSpecificationHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.ReconnectMessageHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.MessageSort;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessageReorientCommand extends MessageReorientCommand {
-
- /**
- * Constructor.
- *
- * @param request
- */
- public CustomMessageReorientCommand(ReorientRelationshipRequest request) {
- super(request);
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientSource() {
- if (!(getOldSource() instanceof Element && getNewSource() instanceof Element)) {
- return false;
- }
- Element target = getLink().getReceiveEvent();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- boolean canExistMessage = MessageConnectionHelper.canExist(getLink(), MessageSort.SYNCH_CALL_LITERAL, getNewSource(), target);
- if (!canExistMessage) {
- return false;
- }
- return MessageConnectionHelper.canReorientSource(getLink(), getNewSource());
- }
-
- /**
- * @Override
- */
- @Override
- protected boolean canReorientTarget() {
- if (!(getOldTarget() instanceof Element && getNewTarget() instanceof Element)) {
- return false;
- }
- Element source = getLink().getSendEvent();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- if (!MessageConnectionHelper.canExist(getLink(), MessageSort.SYNCH_CALL_LITERAL, source, getNewTarget())) {
- return false;
- }
- return MessageConnectionHelper.canReorientTarget(getLink(), getNewTarget());
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientSource() throws ExecutionException {
- MessageEnd sendEvent = getLink().getSendEvent();
- ReconnectMessageHelper.updateMessageEnd(sendEvent, getOldSource(), getNewSource());
- // Update Execution Ends after message reconnecte, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=402975
- if (getOldSource() instanceof ExecutionSpecification && sendEvent == (((ExecutionSpecification) getOldSource()).getStart())) {
- OccurrenceSpecificationHelper.resetExecutionStart((ExecutionSpecification) getOldSource(), UMLFactory.eINSTANCE.createExecutionOccurrenceSpecification());
- }
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @Override
- */
- @Override
- protected CommandResult reorientTarget() throws ExecutionException {
- MessageEnd receiveEvent = getLink().getReceiveEvent();
- ReconnectMessageHelper.updateMessageEnd(receiveEvent, getOldTarget(), getNewTarget());
- ReconnectMessageHelper.updateMessage(getLink());
- // Update Execution Ends after message reconnecte, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=402975
- if (getOldTarget() instanceof ExecutionSpecification && receiveEvent == (((ExecutionSpecification) getOldTarget()).getStart())) {
- OccurrenceSpecificationHelper.resetExecutionStart((ExecutionSpecification) getOldTarget(), UMLFactory.eINSTANCE.createExecutionOccurrenceSpecification());
- }
- if (getNewTarget() instanceof ExecutionSpecification && receiveEvent instanceof MessageOccurrenceSpecification) {
- OccurrenceSpecificationHelper.resetExecutionStart((ExecutionSpecification) getNewTarget(), receiveEvent);
- }
- return CommandResult.newOKCommandResult(getLink());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomStateInvariantCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomStateInvariantCreateCommand.java
deleted file mode 100644
index 28fd228bd04..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomStateInvariantCreateCommand.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.sequence.edit.commands.StateInvariantCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.StateInvariant;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomStateInvariantCreateCommand extends StateInvariantCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomStateInvariantCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomStateInvariantCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * The StateInvariant is created on the lifeline and not on its container
- *
- * @Override
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // Get the model container
- Object modelContainer = ((CreateElementRequest) getRequest()).getParameters().get(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER);
- // Create the stateInvariant
- StateInvariant stateInvariant = CommandHelper.doCreateStateInvariant((Lifeline) getElementToEdit(), modelContainer);
- doConfigure(stateInvariant, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(stateInvariant);
- return CommandResult.newOKCommandResult(stateInvariant);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeConstraintCreateCommand.java
deleted file mode 100644
index c36fdae6270..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeConstraintCreateCommand.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-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.sequence.edit.commands.TimeConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.MessageSort;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomTimeConstraintCreateCommand extends TimeConstraintCreateCommand {
-
- /**
- * Constructor.
- *
- * @param req
- * @param eObject
- */
- public CustomTimeConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req, eObject, diagram);
- }
-
- /**
- * Constructor.
- *
- * @param req
- */
- public CustomTimeConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req, diagram);
- }
-
- /**
- * @Override enable only if there is an occurrence specification
- */
- @Override
- public boolean canExecute() {
- Object paramOccurrence = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
- List<OccurrenceSpecification> occList = SequenceUtil.getAsOccSpecList(paramOccurrence);
- if (!occList.isEmpty()) {
- for (OccurrenceSpecification occurrence : occList) {
- if (occurrence instanceof MessageOccurrenceSpecification) {
- Message mess = ((MessageOccurrenceSpecification) occurrence).getMessage();
- if (mess != null && occurrence.equals(mess.getReceiveEvent()) && MessageSort.SYNCH_CALL_LITERAL.equals(mess.getMessageSort())) {
- // filter receive event, we prefer the corresponding start event at the same location
- continue;
- }
- }
- return true;
- }
- }
- return false;
- }
-
- /**
- * @Override get the Lifeline parent as owner, assign the occurrence specification
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
- // get the Lifeline parent as owner
- Namespace owner = (Namespace) getElementToEdit().eContainer();
- owner.getOwnedRules().add(newElement);
- ElementInitializers.getInstance().init_TimeConstraint_Shape(newElement);
- // assign the occurrence specification
- Object paramOccurrence = getRequest().getParameter(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
- List<OccurrenceSpecification> occList = SequenceUtil.getAsOccSpecList(paramOccurrence);
- if (!occList.isEmpty()) {
- for (OccurrenceSpecification occurrence : occList) {
- if (occurrence instanceof MessageOccurrenceSpecification) {
- Message mess = ((MessageOccurrenceSpecification) occurrence).getMessage();
- if (mess != null && occurrence.equals(mess.getReceiveEvent()) && MessageSort.SYNCH_CALL_LITERAL.equals(mess.getMessageSort())) {
- // filter receive event, we prefer the corresponding start event at the same location
- continue;
- }
- }
- // otherwise, first occ is just fine
- newElement.getConstrainedElements().add(occurrence);
- break;
- }
- }
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/DropDestructionOccurenceSpecification.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/DropDestructionOccurenceSpecification.java
new file mode 100644
index 00000000000..e292c3fea3f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/DropDestructionOccurenceSpecification.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.command;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest.ConnectionViewAndElementDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.DestructionEventFigure;
+import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageEnd;
+
+/**
+ *this class is used to drop the representation of the DestructionOccurrenceSpecification from the request in charge to create the message delete
+ *
+ */
+public class DropDestructionOccurenceSpecification extends RecordingCommand {
+
+ private CreateConnectionViewAndElementRequest request;
+ private EditPart graphicalContainer;
+ private Point absolutePosition;
+
+
+ /**
+ * @param domain
+ * @param request the request that has in charge to create the deleteMessage
+ * @param graphicalContainer for example the lifeline that will contain the representation of the event
+ */
+ public DropDestructionOccurenceSpecification(TransactionalEditingDomain domain, CreateConnectionViewAndElementRequest request, EditPart graphicalContainer, Point absolutePosition) {
+ super(domain);
+ this.request=request;
+ this.graphicalContainer= graphicalContainer;
+ this.absolutePosition=absolutePosition;
+ }
+
+ /**
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ *
+ */
+ @Override
+ protected void doExecute() {
+ //1. look for the message
+ Message deleteMessage=getDeleteMessage();
+ if( deleteMessage==null){
+ return;
+ }
+ //2. look for the Destruction occurrence
+ DestructionOccurrenceSpecification destructionOccurrenceSpecification=getDestructionOccurrence(deleteMessage);
+ if( destructionOccurrenceSpecification==null){
+ return;
+ }
+ //3. drop the Destruction Occurrence
+ dropDestructionOccurrence(destructionOccurrenceSpecification);
+
+ }
+
+ /**
+ * @param destructionOccurrenceSpecification
+ */
+ private void dropDestructionOccurrence(DestructionOccurrenceSpecification destructionOccurrenceSpecification) {
+ DropObjectsRequest dropDestructionOccurrenceRequest= new DropObjectsRequest();
+ Point point=request.getLocation().getCopy();
+ IFigure parentFigure=((GraphicalEditPart)graphicalContainer).getFigure();
+ parentFigure.translateToRelative(absolutePosition);
+ DestructionEventFigure destructionEventFigure= new DestructionEventFigure();
+ point.y=point.y-destructionEventFigure.getDefaultSize().height/2;
+ dropDestructionOccurrenceRequest.setLocation(point);
+ ArrayList<EObject> destructionOccurrenceListToDrop=new ArrayList<EObject>();
+ destructionOccurrenceListToDrop.add(destructionOccurrenceSpecification);
+ dropDestructionOccurrenceRequest.setObjects(destructionOccurrenceListToDrop);
+
+ //give teh psotion form the layer its is not relative
+ Command command=graphicalContainer.getCommand(dropDestructionOccurrenceRequest);
+ command.execute();
+ }
+
+ /**
+ * get the DestructionOccurenceSpecification from a given message
+ * @param deleteMessage the message to look for must be never null
+ * @return DestructionOccurenceSpecification or null
+ */
+ private DestructionOccurrenceSpecification getDestructionOccurrence(Message deleteMessage) {
+ DestructionOccurrenceSpecification destructionOccurrenceSpecification=null;
+ MessageEnd messageEnd =deleteMessage.getReceiveEvent();
+ if(messageEnd instanceof DestructionOccurrenceSpecification){
+ destructionOccurrenceSpecification=(DestructionOccurrenceSpecification)messageEnd;
+ }
+ return destructionOccurrenceSpecification;
+ }
+
+ /**
+ * @return the delete message from the given request, can return null
+ */
+ private Message getDeleteMessage() {
+ Message deleteMessage=null;
+ ConnectionViewAndElementDescriptor connectionViewAndElementDescriptor=request.getConnectionViewAndElementDescriptor();
+ if( connectionViewAndElementDescriptor!=null){
+ CreateElementRequestAdapter createElementRequestAdapter=connectionViewAndElementDescriptor.getCreateElementRequestAdapter();
+ deleteMessage=(Message)createElementRequestAdapter.getAdapter(Message.class);
+ }
+ return deleteMessage;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java
index 1db2a3008f9..7175a1e520c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java
@@ -10,7 +10,6 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Locator;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.RelativeLocator;
-import org.eclipse.draw2d.TreeSearch;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.PrecisionPoint;
@@ -32,6 +31,7 @@ import org.eclipse.gef.requests.ReconnectRequest;
import org.eclipse.gmf.runtime.common.core.util.Log;
import org.eclipse.gmf.runtime.common.core.util.Trace;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIDebugOptions;
import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIPlugin;
@@ -52,15 +52,18 @@ import org.eclipse.gmf.runtime.notation.IdentityAnchor;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.gmf.runtime.notation.datatype.GradientData;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.LinkLFSVGNodePlateFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AppliedStereotypeCommentCreationEditPolicyEx;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDLifelineXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.ExecutionSpecificationNodePlate;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.ILifelineInternalFigure;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.ConnectExecutionNodeToGrillingEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.util.HighlightUtil;
import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineEditPartUtil;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
@@ -77,7 +80,9 @@ import org.eclipse.uml2.uml.UMLPackage;
public abstract class AbstractExecutionSpecificationEditPart extends RoundedCompartmentEditPart {
public static final String EXECUTION_FIX_ANCHOR_POSITION = "Execution Fix Anchor Position";
-
+ public static int DEFAUT_HEIGHT=100;
+ public static int DEFAUT_WIDTH=20;
+
private List<ExecutionSpecificationEndEditPart> executionSpecificationEndParts;
public AbstractExecutionSpecificationEditPart(View view) {
@@ -121,141 +126,7 @@ public abstract class AbstractExecutionSpecificationEditPart extends RoundedComp
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableShapeEditPolicy() {
-
- @Override
- protected Command getResizeCommand(ChangeBoundsRequest request) {
- CompoundCommand command = new CompoundCommand();
- command.add(super.getResizeCommand(request));
- EditPart host = getHost();
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(host);
- // Calculate children levels
- List<ShapeNodeEditPart> movedChildrenParts = LifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts((ShapeNodeEditPart) host);
- List<ShapeNodeEditPart> testChildrenParts = new ArrayList<ShapeNodeEditPart>(movedChildrenParts);
- HashMap<ShapeNodeEditPart, Integer> childrenLevels = new HashMap<ShapeNodeEditPart, Integer>();
- Integer currentLevel = 0;
- while (!testChildrenParts.isEmpty()) {
- currentLevel++;
- List<ShapeNodeEditPart> testChildrenPartsNew = new ArrayList<ShapeNodeEditPart>(testChildrenParts);
- HashMap<ShapeNodeEditPart, Integer> childrenLevelsNew = new HashMap<ShapeNodeEditPart, Integer>(childrenLevels);
- for (ShapeNodeEditPart child : testChildrenParts) {
- IFigure figure = child.getFigure();
- Rectangle childRect = figure.getBounds().getCopy();
- if (figure instanceof HandleBounds) {
- childRect = ((HandleBounds) figure).getBounds().getCopy();
- }
- movedChildrenParts.remove(child);
- ShapeNodeEditPart parentTest = LifelineXYLayoutEditPolicy.getParent(lifelinePart, childRect, movedChildrenParts);
- movedChildrenParts.add(child);
- if (childrenLevels.containsKey(parentTest) || parentTest == null) {
- testChildrenPartsNew.remove(child);
- childrenLevelsNew.put(child, currentLevel);
- }
- }
- childrenLevels = childrenLevelsNew;
- testChildrenParts = testChildrenPartsNew;
- }
- // Fetch basic coords
- Rectangle rectRequest = getInitialFeedbackBounds().getCopy();
- getHostFigure().translateToAbsolute(rectRequest);
- rectRequest.translate(0, request.getMoveDelta().y);
- rectRequest.resize(0, request.getSizeDelta().height);
- for (ShapeNodeEditPart child : movedChildrenParts) {
- IFigure figure = child.getFigure();
- Rectangle originalRect = figure.getBounds().getCopy();
- if (figure instanceof HandleBounds) {
- originalRect = ((HandleBounds) figure).getBounds().getCopy();
- }
- Integer level = childrenLevels.get(child);
- Rectangle r = rectRequest.getCopy();
- r.translate(0, level * LifelineXYLayoutEditPolicy.SPACING_HEIGHT);
- r.resize(0, -2 * level * LifelineXYLayoutEditPolicy.SPACING_HEIGHT);
- Rectangle translatedRect = originalRect.getCopy();
- figure.translateToAbsolute(translatedRect);
- if (translatedRect.y < r.y || translatedRect.bottom() > r.bottom()) {
- int moveAmount = 0;
- int resizeAmount = 0;
- if (translatedRect.y < r.y) {
- moveAmount = r.y - translatedRect.y;
- resizeAmount = moveAmount;
- } else { // translatedRect.bottom() > r.bottom()
- resizeAmount = translatedRect.bottom() - r.bottom();
- }
- if (translatedRect.height() - resizeAmount < figure.getMinimumSize().height()) {
- return UnexecutableCommand.INSTANCE;
- }
- // Resize child ES
- ChangeBoundsRequest esRequest = new ChangeBoundsRequest(org.eclipse.gef.RequestConstants.REQ_MOVE);
- esRequest.setEditParts(child);
- esRequest.setResizeDirection(PositionConstants.SOUTH);
- esRequest.setMoveDelta(new Point(0, moveAmount));
- esRequest.setSizeDelta(new Dimension(0, -resizeAmount));
- Command moveESCommand = LifelineXYLayoutEditPolicy.getResizeOrMoveChildrenCommand((LifelineEditPart) lifelinePart, esRequest, false, false, true);
- if (moveESCommand != null && !moveESCommand.canExecute()) {
- // forbid creation of the message if the es can't be moved correctly
- return UnexecutableCommand.INSTANCE;
- } else if (moveESCommand != null) {
- command.add(moveESCommand);
- }
- }
- }
- return command.unwrap();
- }
-
- @Override
- protected void showChangeBoundsFeedback(ChangeBoundsRequest request) {
- request.getMoveDelta().x = 0; // reset offset
- IFigure feedback = getDragSourceFeedbackFigure();
- PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
- getHostFigure().translateToAbsolute(rect);
- IFigure f = getHostFigure();
- Dimension min = f.getMinimumSize().getCopy();
- Dimension max = f.getMaximumSize().getCopy();
- IMapMode mmode = MapModeUtil.getMapMode(f);
- min.height = mmode.LPtoDP(min.height);
- min.width = mmode.LPtoDP(min.width);
- max.height = mmode.LPtoDP(max.height);
- max.width = mmode.LPtoDP(max.width);
- Rectangle originalBounds = rect.getCopy();
- rect.translate(request.getMoveDelta());
- rect.resize(request.getSizeDelta());
- if (min.width > rect.width) {
- rect.width = min.width;
- } else if (max.width < rect.width) {
- rect.width = max.width;
- }
- if (min.height > rect.height) {
- rect.height = min.height;
- } else if (max.height < rect.height) {
- rect.height = max.height;
- }
- if (rect.height == min.height && request.getSizeDelta().height < 0 && request.getMoveDelta().y > 0) { // shrink at north
- Point loc = rect.getLocation();
- loc.y = originalBounds.getBottom().y - min.height;
- rect.setLocation(loc);
- request.getSizeDelta().height = min.height - originalBounds.height;
- request.getMoveDelta().y = loc.y - originalBounds.y;
- }
- if (request.getSizeDelta().height == 0) { // moving
- EditPart parentBar = moveExecutionSpecificationFeedback(request, AbstractExecutionSpecificationEditPart.this, rect);
- if (parentBar == null) {
- parentBar = getParent();
- }
- // Highlight the parentBar when perform moving.
- HighlightUtil.unhighlight();
- HighlightUtil.highlight(parentBar);
- }
- feedback.translateToRelative(rect);
- feedback.setBounds(rect);
- }
-
- @Override
- protected void eraseChangeBoundsFeedback(ChangeBoundsRequest request) {
- super.eraseChangeBoundsFeedback(request);
- HighlightUtil.unhighlight();
- }
- });
- // install a editpolicy to display stereotypes
+ installEditPolicy(ConnectExecutionNodeToGrillingEditPolicy.CONNECT_TO_GRILLING_MANAGEMENT, new ConnectExecutionNodeToGrillingEditPolicy());
installEditPolicy(AppliedStereotypeCommentEditPolicy.APPLIED_STEREOTYPE_COMMENT, new AppliedStereotypeCommentCreationEditPolicyEx());
}
@@ -307,164 +178,123 @@ public abstract class AbstractExecutionSpecificationEditPart extends RoundedComp
return true;
}
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- Object feature = event.getFeature();
- if ((getModel() != null) && (getModel() == event.getNotifier())) {
- if (NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- } else if (NotationPackage.eINSTANCE.getLineTypeStyle_LineType().equals(feature)) {
- refreshLineType();
- }
- } else if (NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature)
- || NotationPackage.eINSTANCE.getSize_Width().equals(feature)) {
- getParent().refresh();
- } else if (UMLPackage.eINSTANCE.getExecutionSpecification_Finish().equals(feature) || UMLPackage.eINSTANCE.getExecutionSpecification_Start().equals(feature)) {
- if (executionSpecificationEndParts != null) {
- for (ExecutionSpecificationEndEditPart child : executionSpecificationEndParts) {
- removeChild(child);
- child.removeFromResource();
- }
- executionSpecificationEndParts = null;
- }
- refreshChildren();
- }
- refreshShadow();
- }
-
- public class ExecutionSpecificationRectangleFigure extends RoundedCompartmentFigure {
- public ExecutionSpecificationRectangleFigure() {
- this.setPreferredSize(new Dimension(getMapMode().DPtoLP(16), getMapMode().DPtoLP(60)));
- this.setMinimumSize(new Dimension(getMapMode().DPtoLP(16), getMapMode().DPtoLP(20)));
- }
-
- @Override
- public IFigure findMouseEventTargetAt(int x, int y) {
- // check children first instead of self
- IFigure f = findMouseEventTargetInDescendantsAt(x, y);
- if (f != null) {
- return f;
- }
- if (!containsPoint(x, y)) {
- return null;
- }
- if (isMouseEventTarget()) {
- return this;
- }
- return null;
- }
-
- @Override
- public IFigure findFigureAt(int x, int y, TreeSearch search) {
- if (search.prune(this)) {
- return null;
- }
- IFigure child = findDescendantAtExcluding(x, y, search);
- if (child != null) {
- return child;
- }
- if (!containsPoint(x, y)) {
- return null;
- }
- if (search.accept(this)) {
- return this;
- }
- return null;
- }
- }
+// @Override
+// protected void handleNotificationEvent(Notification event) {
+// super.handleNotificationEvent(event);
+// Object feature = event.getFeature();
+// if ((getModel() != null) && (getModel() == event.getNotifier())) {
+// if (NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
+// refreshLineWidth();
+// } else if (NotationPackage.eINSTANCE.getLineTypeStyle_LineType().equals(feature)) {
+// refreshLineType();
+// }
+// } else if (NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature)
+// || NotationPackage.eINSTANCE.getSize_Width().equals(feature)) {
+// getParent().refresh();
+// } else if (UMLPackage.eINSTANCE.getExecutionSpecification_Finish().equals(feature) || UMLPackage.eINSTANCE.getExecutionSpecification_Start().equals(feature)) {
+// if (executionSpecificationEndParts != null) {
+// for (ExecutionSpecificationEndEditPart child : executionSpecificationEndParts) {
+// removeChild(child);
+// child.removeFromResource();
+// }
+// executionSpecificationEndParts = null;
+// }
+// refreshChildren();
+// }
+// refreshShadow();
+// }
@Override
public abstract ExecutionSpecificationRectangleFigure getPrimaryShape();
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=385604
- protected ShapeNodeEditPart moveExecutionSpecificationFeedback(ChangeBoundsRequest request, AbstractExecutionSpecificationEditPart movedPart, PrecisionRectangle rect) {
- CustomLifelineEditPart lifelineEP = (CustomLifelineEditPart) movedPart.getParent();
- Rectangle copy = rect.getCopy();
- lifelineEP.getPrimaryShape().translateToRelative(copy);
- List<ShapeNodeEditPart> executionSpecificationList = LifelineEditPartUtil.getChildShapeNodeEditPart(lifelineEP);
- List<ShapeNodeEditPart> movedChildrenParts = LifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts(AbstractExecutionSpecificationEditPart.this);
- executionSpecificationList.remove(movedPart); // ignore current action and its children
- executionSpecificationList.removeAll(movedChildrenParts);
- ShapeNodeEditPart parentBar = LifelineXYLayoutEditPolicy.getParent(lifelineEP, copy, executionSpecificationList);
- Rectangle dotLineBounds = lifelineEP.getPrimaryShape().getFigureLifelineDotLineFigure().getBounds();
- int dotLineBarLocationX = dotLineBounds.x + dotLineBounds.width / 2 - LifelineXYLayoutEditPolicy.EXECUTION_INIT_WIDTH / 2;
- if (parentBar == null) {
- if (dotLineBarLocationX < copy.x) { // there is no parent bar, move to the center dotline position
- int dx = dotLineBarLocationX - copy.x;
- request.getMoveDelta().x += dx;
- rect.x += dx;
- }
- } else {
- while (!executionSpecificationList.isEmpty()) {
- Rectangle parentBounds = parentBar.getFigure().getBounds();
- int width = parentBounds.width > 0 ? parentBounds.width : LifelineXYLayoutEditPolicy.EXECUTION_INIT_WIDTH;
- int x = parentBounds.x + width / 2 + 1; // affixed to the parent bar
- int dx = x - copy.x;
- rect.x += dx;
- request.getMoveDelta().x += dx;
- copy.x = x;
- // check again to see if the new bar location overlaps with existing bars
- ShapeNodeEditPart part = LifelineXYLayoutEditPolicy.getParent(lifelineEP, copy, executionSpecificationList);
- if (part == parentBar) {
- break;
- } else {
- // if overlaps, go on moving the bar to next x position
- parentBar = part;
- }
- }
- }
- return parentBar;
- }
-
- /**
- * Override for add elements on ExecutionSpecification
- */
- @Override
- public Command getCommand(Request request) {
- if (request instanceof CreateUnspecifiedTypeRequest) {
- return getParent().getCommand(request);
- }
- return super.getCommand(request);
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @Override
- public void showSourceFeedback(Request request) {
- if (request instanceof CreateUnspecifiedTypeRequest) {
- getParent().showSourceFeedback(request);
- }
- super.showSourceFeedback(request);
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @Override
- public void eraseSourceFeedback(Request request) {
- if (request instanceof CreateUnspecifiedTypeRequest) {
- getParent().eraseSourceFeedback(request);
- }
- super.eraseSourceFeedback(request);
- }
-
- @Override
- public void showTargetFeedback(Request request) {
- if (request instanceof CreateUnspecifiedTypeRequest) {
- getParent().showTargetFeedback(request);
- }
- super.showTargetFeedback(request);
- }
-
- @Override
- public void eraseTargetFeedback(Request request) {
- if (request instanceof CreateUnspecifiedTypeRequest) {
- getParent().eraseTargetFeedback(request);
- }
- super.eraseTargetFeedback(request);
- }
+// protected ShapeNodeEditPart moveExecutionSpecificationFeedback(ChangeBoundsRequest request, AbstractExecutionSpecificationEditPart movedPart, PrecisionRectangle rect) {
+// OLDLifelineEditPart lifelineEP = (OLDLifelineEditPart) movedPart.getParent();
+// Rectangle copy = rect.getCopy();
+// lifelineEP.getPrimaryShape().translateToRelative(copy);
+// List<ShapeNodeEditPart> executionSpecificationList = LifelineEditPartUtil.getChildShapeNodeEditPart(lifelineEP);
+// List<ShapeNodeEditPart> movedChildrenParts = OLDLifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts(AbstractExecutionSpecificationEditPart.this);
+// executionSpecificationList.remove(movedPart); // ignore current action and its children
+// executionSpecificationList.removeAll(movedChildrenParts);
+// ShapeNodeEditPart parentBar = OLDLifelineXYLayoutEditPolicy.getParent(lifelineEP, copy, executionSpecificationList);
+// Rectangle dotLineBounds = lifelineEP.getPrimaryShape().getFigureLifelineDotLineFigure().getBounds();
+// int dotLineBarLocationX = dotLineBounds.x + dotLineBounds.width / 2 - OLDLifelineXYLayoutEditPolicy.EXECUTION_INIT_WIDTH / 2;
+// if (parentBar == null) {
+// if (dotLineBarLocationX < copy.x) { // there is no parent bar, move to the center dotline position
+// int dx = dotLineBarLocationX - copy.x;
+// request.getMoveDelta().x += dx;
+// rect.x += dx;
+// }
+// } else {
+// while (!executionSpecificationList.isEmpty()) {
+// Rectangle parentBounds = parentBar.getFigure().getBounds();
+// int width = parentBounds.width > 0 ? parentBounds.width : OLDLifelineXYLayoutEditPolicy.EXECUTION_INIT_WIDTH;
+// int x = parentBounds.x + width / 2 + 1; // affixed to the parent bar
+// int dx = x - copy.x;
+// rect.x += dx;
+// request.getMoveDelta().x += dx;
+// copy.x = x;
+// // check again to see if the new bar location overlaps with existing bars
+// ShapeNodeEditPart part = OLDLifelineXYLayoutEditPolicy.getParent(lifelineEP, copy, executionSpecificationList);
+// if (part == parentBar) {
+// break;
+// } else {
+// // if overlaps, go on moving the bar to next x position
+// parentBar = part;
+// }
+// }
+// }
+// return parentBar;
+// }
+
+// /**
+// * Override for add elements on ExecutionSpecification
+// */
+// @Override
+// public Command getCommand(Request request) {
+// if (request instanceof CreateUnspecifiedTypeRequest) {
+// return getParent().getCommand(request);
+// }
+// return super.getCommand(request);
+// }
+//
+// /**
+// * @generated NOT Override for redirecting creation request to the lifeline
+// */
+// @Override
+// public void showSourceFeedback(Request request) {
+// if (request instanceof CreateUnspecifiedTypeRequest) {
+// getParent().showSourceFeedback(request);
+// }
+// super.showSourceFeedback(request);
+// }
+//
+// /**
+// * @generated NOT Override for redirecting creation request to the lifeline
+// */
+// @Override
+// public void eraseSourceFeedback(Request request) {
+// if (request instanceof CreateUnspecifiedTypeRequest) {
+// getParent().eraseSourceFeedback(request);
+// }
+// super.eraseSourceFeedback(request);
+// }
+//
+// @Override
+// public void showTargetFeedback(Request request) {
+// if (request instanceof CreateUnspecifiedTypeRequest) {
+// getParent().showTargetFeedback(request);
+// }
+// super.showTargetFeedback(request);
+// }
+//
+// @Override
+// public void eraseTargetFeedback(Request request) {
+// if (request instanceof CreateUnspecifiedTypeRequest) {
+// getParent().eraseTargetFeedback(request);
+// }
+// super.eraseTargetFeedback(request);
+// }
/**
* Add connection on top off the figure during the feedback.
@@ -662,30 +492,11 @@ public abstract class AbstractExecutionSpecificationEditPart extends RoundedComp
@Override
protected NodeFigure createSVGNodePlate() {
- LinkLFSVGNodePlateFigure svgNodePlateFigure = new LinkLFSVGNodePlateFigure(this, -1, -1) {
- /**
- * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#isDefaultAnchorArea(org.eclipse.draw2d.geometry.PrecisionPoint)
- */
- @Override
- protected boolean isDefaultAnchorArea(PrecisionPoint p) {
- return false;
- }
-
- @Override
- public ConnectionAnchor getConnectionAnchor(String terminal) {
- // Use FixedAnchorEx for MessageSync, this will be invoked by mapConnectionAnchor(termial) operation.
- if (terminal != null && terminal.indexOf("{") != -1 && terminal.indexOf("}") != -1) {
- int position = AnchorHelper.FixedAnchorEx.parsePosition(terminal);
- if (PositionConstants.TOP == position || PositionConstants.BOTTOM == position) {
- return new AnchorHelper.FixedAnchorEx(this, position);
- }
- }
- return super.getConnectionAnchor(terminal);
- }
- };
+ ExecutionSpecificationNodePlate svgNodePlateFigure= new ExecutionSpecificationNodePlate(this, -1, -1);
svgNodePlateFigure.setMinimumSize(new Dimension(getMapMode().DPtoLP(16), getMapMode().DPtoLP(20))); // min height 20
svgNodePlate = svgNodePlateFigure.withLinkLFEnabled();
svgNodePlate.setDefaultNodePlate(createNodePlate());
return svgNodePlate;
}
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractMessageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractMessageEditPart.java
index c069917bb87..2140d3b833a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractMessageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractMessageEditPart.java
@@ -10,6 +10,7 @@ import org.eclipse.draw2d.geometry.PointList;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.DragTracker;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.ReconnectRequest;
@@ -25,6 +26,7 @@ import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.Shape;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.selection.SelectSeveralLinksEditPartTracker;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
import org.eclipse.papyrus.uml.diagram.common.figure.edge.UMLEdgeFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionFragmentsOrderingEditPolicy;
@@ -32,6 +34,9 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraph
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageFigure;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.ConnectEdgeToGrillingEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.ConnectLifeLineToGrillingEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.util.SelectMessagesEditPartTracker;
import org.eclipse.papyrus.uml.diagram.sequence.util.SelfMessageHelper;
import org.eclipse.swt.events.MouseMoveListener;
import org.eclipse.swt.graphics.Cursor;
@@ -71,6 +76,22 @@ public abstract class AbstractMessageEditPart extends UMLConnectionNodeEditPart
}
}
+ /**
+ * This method has been added in order to satisfy the requirement Diagram.UML.Sequence.REQ_004:
+ * <I>"It should be possible to select and move several messages at the same time."</I>
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart#getDragTracker(org.eclipse.gef.Request)
+ *
+ *
+ * @param req
+ * @return the drag tracker
+ *
+ */
+ @Override
+ public DragTracker getDragTracker(Request req) {
+ return new SelectMessagesEditPartTracker(this);
+ }
+
+
private void hookGraphicalViewer() {
if (SelfMessageHelper.isSelfLink(this)) {
getViewer().getControl().addMouseMoveListener(mouseMoveListener = new MouseMoveListener() {
@@ -227,6 +248,8 @@ public abstract class AbstractMessageEditPart extends UMLConnectionNodeEditPart
installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MessageLabelEditPolicy());
// Ordering Message Occurrence Specification. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=403233
installEditPolicy(InteractionFragmentsOrderingEditPolicy.ORDERING_ROLE, new InteractionFragmentsOrderingEditPolicy());
+ installEditPolicy(ConnectLifeLineToGrillingEditPolicy.CONNECT_TO_GRILLING_MANAGEMENT, new ConnectEdgeToGrillingEditPolicy());
+
}
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AnnotatedLinkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AnnotatedLinkEditPart.java
index 41b7f538dbb..8bb135e1613 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AnnotatedLinkEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AnnotatedLinkEditPart.java
@@ -36,7 +36,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AnnotatedLinkEndpo
*
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public abstract class AnnotatedLinkEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart {
+public abstract class AnnotatedLinkEditPart extends org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart implements ITreeBranchEditPart {
/**
* Constructor.
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BorderItemLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BorderItemLabelEditPart.java
index ea006fbd709..4d767a4daf5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BorderItemLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BorderItemLabelEditPart.java
@@ -70,8 +70,8 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEd
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.sequence.Activator;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleEvent;
import org.eclipse.swt.graphics.Color;
@@ -553,7 +553,7 @@ public abstract class BorderItemLabelEditPart extends PapyrusLabelEditPart imple
protected void initExtendedEditorConfiguration() {
if (configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ final String languagePreferred = UMLDiagramEditorPlugin.getInstance().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
@@ -563,7 +563,7 @@ public abstract class BorderItemLabelEditPart extends PapyrusLabelEditPart imple
}
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ String languagePreferred = UMLDiagramEditorPlugin.getInstance().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedCompartmentEditPart.java
new file mode 100644
index 00000000000..3438dcf8d21
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedCompartmentEditPart.java
@@ -0,0 +1,225 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.editpolicies.ResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+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;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ElementCreationWithMessageEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class CCombinedCompartmentEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final String VISUAL_ID = "CombinedFragment_SubfragmentCompartment";
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public CCombinedCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpecificationEditPart.ExecutionSpecificationRectangleFigure
+ *
+ * @generated
+ */
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(200, 100);
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public EditPolicy getPrimaryDragEditPolicy() {
+ EditPolicy result = super.getPrimaryDragEditPolicy();
+ if (result instanceof ResizableEditPolicy) {
+ ResizableEditPolicy ep = (ResizableEditPolicy) result;
+ ep.setResizeDirections(PositionConstants.NORTH | PositionConstants.SOUTH);
+ }
+ return result;
+ }
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodeFigure() {
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
+
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ // /**
+ // * @generated
+ // */
+ // @Override
+ // protected void setLineWidth(int width) {
+ // if(primaryShape instanceof Shape) {
+ // ((Shape)primaryShape).setLineWidth(width);
+ // }
+ // }
+ /**
+ * @generated
+ */
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedFragmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedFragmentEditPart.java
new file mode 100644
index 00000000000..2a30b822f32
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CCombinedFragmentEditPart.java
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.CombinedFragment;
+
+/**
+ * @author PT202707
+ * @since 3.0
+ *
+ */
+public class CCombinedFragmentEditPart extends CombinedFragmentEditPart {
+ public static int DEFAULT_HEIGHT=40;
+ public static int DEFAULT_WIDTH=40;
+
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public CCombinedFragmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param event
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ // TODO Auto-generated method stub
+ super.handleNotificationEvent(event);
+ getPrimaryShape().setName(((CombinedFragment)this.resolveSemanticElement()).getInteractionOperator().getLiteral());
+ }
+
+
+// /**
+// * Modify it to avoid scrollbar
+// */
+// protected boolean addFixedChild(EditPart childEditPart) {
+//
+// if (childEditPart instanceof CCombinedCompartmentEditPart) {
+// IFigure pane = getPrimaryShape().getCompartmentFigure();
+// setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+// pane.add(((CCombinedCompartmentEditPart) childEditPart).getFigure());
+// return true;
+// }
+//
+// return false;
+// }
+//
+// /**
+// * @generated
+// */
+// protected boolean removeFixedChild(EditPart childEditPart) {
+// if (childEditPart instanceof CCombinedCompartmentEditPart) {
+// IFigure pane = getPrimaryShape().getCompartmentFigure();
+// pane.remove(((CCombinedCompartmentEditPart) childEditPart).getFigure());
+// return true;
+// }
+// return false;
+// }
+// protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+// if (editPart instanceof CCombinedCompartmentEditPart) {
+// return getPrimaryShape().getCompartmentFigure();
+// }
+// return getContentPane();
+// }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CInteractionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CInteractionEditPart.java
new file mode 100644
index 00000000000..cf738c485b9
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CInteractionEditPart.java
@@ -0,0 +1,182 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.edit.parts;
+
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.LocationRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gef.requests.TargetRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.ConnectionViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
+import org.eclipse.papyrus.uml.service.types.element.UMLDIElementTypes;
+
+
+
+
+/**
+ * @author PT202707
+ * @since 3.0
+ *
+ */
+public class CInteractionEditPart extends InteractionEditPart{
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public CInteractionEditPart(View view) {
+ super(view);
+ }
+
+
+ //***********************************************************************
+ //**ALL this code is used to manage LOST and CREATE MESSAGE on Interaction.
+ //**************************************************************************
+ /**
+ * Handle found message
+ */
+ @Override
+ public ConnectionAnchor getSourceConnectionAnchor(Request request) {
+ ConnectionAnchor sourceAnchor = createAnchor(request, UMLDIElementTypes.MESSAGE_FOUND_EDGE, MessageFoundEditPart.VISUAL_ID, MessageFoundEditPart.class);
+ System.err.println("getSourceConnectionAnchor "+((AnchorHelper.InnerPointAnchor)(sourceAnchor)).getTerminal());
+ if (sourceAnchor == null) {
+ sourceAnchor = super.getSourceConnectionAnchor(request);
+ }
+ return sourceAnchor;
+ }
+
+ /**
+ * Handle found message
+ */
+ @Override
+ public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connEditPart) {
+
+ // Read the anchor and load it, it read the absolute position
+ if (connEditPart instanceof MessageFoundEditPart) {
+ String terminal = AnchorHelper.getAnchorId(getEditingDomain(), connEditPart, true);
+ if (terminal.length() > 0) {
+ PrecisionPoint pt = BaseSlidableAnchor.parseTerminalString(terminal);
+ return new AnchorHelper.InnerPointAnchor(getFigure(), pt);
+ }
+ }
+ ConnectionAnchor sourceConnectionAnchor = super.getSourceConnectionAnchor(connEditPart);
+ return sourceConnectionAnchor;
+ }
+
+ /**
+ * Handle lost message
+ */
+ @Override
+ public ConnectionAnchor getTargetConnectionAnchor(Request request) {
+
+ ConnectionAnchor targetAnchor = createAnchor(request, UMLDIElementTypes.MESSAGE_LOST_EDGE, MessageLostEditPart.VISUAL_ID, MessageLostEditPart.class);
+// if (targetAnchor == null) {
+// // Enabled to find Anchor for MessageCreate, this would be useful when showing feedbacks.
+// // Fixed bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=403134
+// targetAnchor = createAnchor(request, UMLDIElementTypes.MESSAGE_CREATE_EDGE, MessageCreateEditPart.VISUAL_ID, MessageCreateEditPart.class);
+// }
+ if (targetAnchor == null) {
+ targetAnchor = super.getTargetConnectionAnchor(request);
+ }
+ return targetAnchor;
+ }
+
+ /**
+ * Handle lost message
+ */
+ @Override
+ public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connEditPart) {
+ // Enabled to find Anchor for MessageCreate, this would be useful when showing feedbacks.
+ // Fixed bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=403134
+ if (connEditPart instanceof MessageLostEditPart || connEditPart instanceof MessageCreateEditPart) {
+ String terminal = AnchorHelper.getAnchorId(getEditingDomain(), connEditPart, false);
+ if (terminal.length() > 0) {
+ PrecisionPoint pt = BaseSlidableAnchor.parseTerminalString(terminal);
+ return new AnchorHelper.InnerPointAnchor(getFigure(), pt);
+ }
+ }
+ ConnectionAnchor targetConnectionAnchor = super.getTargetConnectionAnchor(connEditPart);
+ return targetConnectionAnchor;
+ }
+
+ /**
+ * Create Anchor
+ *
+ * @param request
+ * The request
+ * @param elementType
+ * The element type of the message
+ * @param visualId
+ * The visual ID of the message
+ * @param messageType
+ * The type of the message
+ * @return The connection anchor
+ */
+ private ConnectionAnchor createAnchor(Request request, IElementType elementType, String visualId, Class<?> messageType) {
+ if (request instanceof CreateUnspecifiedTypeConnectionRequest) {
+
+
+ CreateUnspecifiedTypeConnectionRequest createRequest = (CreateUnspecifiedTypeConnectionRequest) request;
+
+ List<?> relationshipTypes = createRequest.getElementTypes();
+ for (Object obj : relationshipTypes) {
+ if (elementType.equals(obj)) {
+ return createAnchor(createRequest.getLocation().getCopy());
+ }
+ }
+ } else if (request instanceof CreateConnectionViewRequest) {
+ CreateConnectionViewRequest createRequest = (CreateConnectionViewRequest) request;
+ ConnectionViewDescriptor connectionViewDescriptor = createRequest.getConnectionViewDescriptor();
+ if (connectionViewDescriptor != null) {
+ if (visualId.equals(connectionViewDescriptor.getSemanticHint())) {
+ return createAnchor(createRequest.getLocation().getCopy());
+ }
+ }
+ } else if (request instanceof ReconnectRequest) {
+ ReconnectRequest reconnectRequest = (ReconnectRequest) request;
+ ConnectionEditPart connectionEditPart = reconnectRequest.getConnectionEditPart();
+ // Fixed bug creating anchors for MessageLost and MessageFound.
+ if (messageType.isInstance(connectionEditPart) && request instanceof LocationRequest) {
+ return createAnchor(((LocationRequest) request).getLocation().getCopy());
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Create Anchor
+ *
+ * @param location
+ * The location
+ * @return The connection anchor
+ */
+ private ConnectionAnchor createAnchor(Point location) {
+ // return new SlidableAnchor(getFigure(), BaseSlidableAnchor.getAnchorRelativeLocation(location, getFigure().getBounds()));
+ return AnchorHelper.InnerPointAnchor.createAnchorAtLocation(getFigure(), new PrecisionPoint(location));
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CLifeLineEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CLifeLineEditPart.java
new file mode 100644
index 00000000000..59094fb0d18
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CLifeLineEditPart.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.edit.parts;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.sequence.LifelineNodePlate;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.ILifelineInternalFigure;
+
+/**
+ * @author PT202707
+ * @since 3.0
+ *
+ */
+public class CLifeLineEditPart extends LifelineEditPart {
+
+ public static int DEFAUT_HEIGHT=250;
+ public static int DEFAUT_WIDTH=100;
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public CLifeLineEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart#createSVGNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createSVGNodePlate() {
+ svgNodePlate = new LifelineNodePlate(this, -1, -1).withLinkLFEnabled();
+ svgNodePlate.setDefaultNodePlate(createNodePlate());
+
+ return svgNodePlate;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#getCommand(org.eclipse.gef.Request)
+ *
+ * @param _request
+ * @return
+ */
+ @Override
+ public Command getCommand(Request _request) {
+ // TODO Auto-generated method stub
+ return super.getCommand(_request);
+ }
+
+ @Override
+ public void setLayoutConstraint(EditPart child, IFigure childFigure, Object constraint) {
+ if (!(childFigure instanceof ILifelineInternalFigure)) {
+ getPrimaryShape().setConstraint(childFigure, constraint);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomActionExecutionSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomActionExecutionSpecificationEditPart.java
index f049e1d1822..607d940d977 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomActionExecutionSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomActionExecutionSpecificationEditPart.java
@@ -13,17 +13,22 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomActionExecutionSpecificationItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.ILifelineInternalFigure;
/**
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class CustomActionExecutionSpecificationEditPart extends ActionExecutionSpecificationEditPart {
+public class CustomActionExecutionSpecificationEditPart extends CCombinedCompartmentEditPart {
+ public static int DEFAULT_HEIGHT=100;
/**
* Constructor.
*
@@ -39,9 +44,39 @@ public class CustomActionExecutionSpecificationEditPart extends ActionExecutionS
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomActionExecutionSpecificationItemSemanticEditPolicy());
// Fixed bug about reconnect message when the ends of execution were MessageOccurrenceSpecification.
removeEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE);
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ExecutionGraphicalNodeEditPolicy());
}
+
+
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#refreshBounds()
+ *
+ */
+ @Override
+ protected void refreshBounds() {
+ // TODO Auto-generated method stub
+ super.refreshBounds();
+ }
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpecificationEditPart#refreshVisuals()
+ *
+ */
+ @Override
+ protected void refreshVisuals() {
+ // TODO Auto-generated method stub
+ super.refreshVisuals();
+ }
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param event
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ // TODO Auto-generated method stub
+ super.handleNotificationEvent(event);
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragment2EditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragment2EditPart.java
index 070cbfa84cd..8ac37f0b90d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragment2EditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragment2EditPart.java
@@ -16,12 +16,10 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomCombinedFragment2ResizeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomCombinedFragment2ItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.CoRegionCombinedFragmentFigure;
import org.eclipse.uml2.uml.Lifeline;
@@ -45,7 +43,6 @@ public class CustomCombinedFragment2EditPart extends CombinedFragment2EditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomCombinedFragment2ItemSemanticEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new CustomCombinedFragment2ResizeEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragmentCombinedFragmentCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragmentCombinedFragmentCompartmentEditPart.java
index 9c5335e9942..e02b1072130 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragmentCombinedFragmentCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragmentCombinedFragmentCompartmentEditPart.java
@@ -39,7 +39,6 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.sequence.util.OperandBoundsComputeHelper;
@@ -96,7 +95,6 @@ public class CustomCombinedFragmentCombinedFragmentCompartmentEditPart extends C
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, createCreationEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCommentAnnotatedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCommentAnnotatedElementEditPart.java
index a204f1bd36c..83183cce428 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCommentAnnotatedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCommentAnnotatedElementEditPart.java
@@ -20,7 +20,6 @@ import org.eclipse.gef.EditPart;
import org.eclipse.gef.LayerConstants;
import org.eclipse.gef.Request;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.internal.figures.ConnectionLayerEx;
import org.eclipse.gmf.runtime.draw2d.ui.internal.routers.FanRouter;
import org.eclipse.gmf.runtime.gef.ui.internal.tools.SelectConnectionEditPartTracker;
@@ -28,7 +27,6 @@ import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.RoutingStyle;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.draw2d.routers.DurationConstraintAutomaticRouter;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomCommentAnnotatedElementItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.util.LinkRouteModelElementFactory;
/**
@@ -45,14 +43,6 @@ public class CustomCommentAnnotatedElementEditPart extends CommentAnnotatedEleme
super(view);
}
- /**
- * @Override
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomCommentAnnotatedElementItemSemanticEditPolicy());
- }
@Override
protected void handleNotificationEvent(Notification event) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCommentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCommentEditPart.java
index 7b638e11935..e809d7855ed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCommentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCommentEditPart.java
@@ -13,12 +13,10 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.FillStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomCommentItemSemanticEditPolicy;
/**
* @author Jin Liu (jin.liu@soyatec.com)
@@ -34,14 +32,6 @@ public class CustomCommentEditPart extends CommentEditPart {
super(view);
}
- /**
- * @Override
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomCommentItemSemanticEditPolicy());
- }
@Override
protected void setLineWidth(int width) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConsiderIgnoreFragmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConsiderIgnoreFragmentEditPart.java
index abeba2b82d7..4fc04e0ecc2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConsiderIgnoreFragmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConsiderIgnoreFragmentEditPart.java
@@ -19,7 +19,6 @@ import java.lang.reflect.Field;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.util.EList;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
@@ -28,7 +27,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstants
import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomConsiderIgnoreFragmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.util.NotificationHelper;
import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
@@ -43,7 +41,7 @@ import org.eclipse.uml2.uml.UMLPackage;
/**
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class CustomConsiderIgnoreFragmentEditPart extends CustomCombinedFragmentEditPart {
+public class CustomConsiderIgnoreFragmentEditPart extends OLDCustomCombinedFragmentEditPart {
/**
* Notfier for listen and unlistend model element.
@@ -92,15 +90,6 @@ public class CustomConsiderIgnoreFragmentEditPart extends CustomCombinedFragment
}
/**
- * @Override
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomConsiderIgnoreFragmentItemSemanticEditPolicy());
- }
-
- /**
* Handle for message
*/
@Override
@@ -147,7 +136,7 @@ public class CustomConsiderIgnoreFragmentEditPart extends CustomCombinedFragment
operatorKind.append(" {").append(sb.deleteCharAt(sb.length() - 1).toString()).append("}");
}
}
- getPrimaryShape().getHeaderLabel().setText(operatorKind.toString());
+ getPrimaryShape().getNameLabel().setText(operatorKind.toString());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConstraintConstrainedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConstraintConstrainedElementEditPart.java
deleted file mode 100644
index bf0b096cf4b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConstraintConstrainedElementEditPart.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomConstraintConstrainedElementItemSemanticEditPolicy;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomConstraintConstrainedElementEditPart extends ConstraintConstrainedElementEditPart {
-
- /**
- * Constructor.
- *
- * @param view
- */
- public CustomConstraintConstrainedElementEditPart(View view) {
- super(view);
- }
-
- /**
- * @Override
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomConstraintConstrainedElementItemSemanticEditPolicy());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConstraintEditPart.java
index 5da50198f89..7a4b2103fcb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConstraintEditPart.java
@@ -18,13 +18,11 @@ import java.util.List;
import org.eclipse.draw2d.ColorConstants;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EReference;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.FillStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
/**
@@ -49,14 +47,6 @@ public class CustomConstraintEditPart extends ConstraintEditPart {
return figure;
}
- /**
- * @Override
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomConstraintItemSemanticEditPolicy());
- }
@Override
protected void handleNotificationEvent(Notification event) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomContinuationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomContinuationEditPart.java
index 90561e64cc2..4118c9db989 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomContinuationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomContinuationEditPart.java
@@ -17,12 +17,10 @@ import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomContinuationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.ContinuationFigure;
import org.eclipse.papyrus.uml.diagram.sequence.locator.ContinuationLocator;
import org.eclipse.uml2.uml.UMLPackage;
@@ -41,14 +39,6 @@ public class CustomContinuationEditPart extends ContinuationEditPart implements
super(view);
}
- /**
- * @Override
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomContinuationItemSemanticEditPolicy());
- }
/**
* Overrides to manage the position of the Continuation
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDestructionOccurrenceSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDestructionOccurrenceSpecificationEditPart.java
index 95da6bcdcd3..e603ac18a2f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDestructionOccurrenceSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDestructionOccurrenceSpecificationEditPart.java
@@ -17,13 +17,11 @@ 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.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AppliedStereotypeCommentCreationEditPolicyEx;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomDestructionOccurrenceSpecificationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpolicies.AppliedStereotypeCommentEditPolicy;
/**
@@ -56,7 +54,6 @@ public class CustomDestructionOccurrenceSpecificationEditPart extends Destructio
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDestructionOccurrenceSpecificationItemSemanticEditPolicy());
// install a editpolicy to display stereotypes
installEditPolicy(AppliedStereotypeCommentEditPolicy.APPLIED_STEREOTYPE_COMMENT, new AppliedStereotypeCommentCreationEditPolicyEx());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintEditPart.java
index eb902e87c76..b896b942855 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintEditPart.java
@@ -48,7 +48,6 @@ import org.eclipse.gef.requests.ReconnectRequest;
import org.eclipse.gmf.runtime.common.core.util.StringStatics;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.render.editparts.RenderedDiagramRootEditPart;
@@ -71,7 +70,6 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper.FixedAnchorEx;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AppliedStereotypeCommentCreationEditPolicyEx;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExternalLabelPrimaryDragRoleEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomDurationConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.DurationConstraintFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
@@ -113,7 +111,6 @@ public class CustomDurationConstraintEditPart extends DurationConstraintEditPart
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDurationConstraintItemSemanticEditPolicy());
// install a editpolicy to display stereotypes, there's a bug on super class.
installEditPolicy(AppliedStereotypeCommentEditPolicy.APPLIED_STEREOTYPE_COMMENT, new AppliedStereotypeCommentCreationEditPolicyEx());
}
@@ -691,7 +688,7 @@ public class CustomDurationConstraintEditPart extends DurationConstraintEditPart
}
public static Rectangle fixMessageBounds(Rectangle newBounds, Request cvr, LifelineEditPart host) {
- Object oc1 = getFirstElement(cvr.getExtendedData().get(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION));
+ Object oc1 = getFirstElement(cvr.getExtendedData().get(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION));
Object oc2 = getFirstElement(cvr.getExtendedData().get(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2));
if (oc1 != null && oc2 != null && (oc1 instanceof MessageOccurrenceSpecification || oc2 instanceof MessageOccurrenceSpecification)) {
Point start = null, end = null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintInMessageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintInMessageEditPart.java
index 86d85cf3327..206bbc7de82 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintInMessageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintInMessageEditPart.java
@@ -26,14 +26,12 @@ import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExternalLabelPrimaryDragRoleEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomDurationConstraintInMessageItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
/**
@@ -51,15 +49,6 @@ public class CustomDurationConstraintInMessageEditPart extends DurationConstrain
}
/**
- * @Override
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDurationConstraintInMessageItemSemanticEditPolicy());
- }
-
- /**
* Make sure bounds are also refreshed.
*
* @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#refresh()
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationObservationEditPart.java
index 0f8bb0f0598..d8a7844d1e0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationObservationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationObservationEditPart.java
@@ -33,7 +33,6 @@ import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocat
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomConnectionHandleEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomDurationObservationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
/**
@@ -56,7 +55,6 @@ public class CustomDurationObservationEditPart extends DurationObservationEditPa
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDurationObservationItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE, new CustomConnectionHandleEditPolicy());
removeEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
removeEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomGeneralOrderingEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomGeneralOrderingEditPart.java
index 944b887fd71..7586b9b3669 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomGeneralOrderingEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomGeneralOrderingEditPart.java
@@ -30,13 +30,11 @@ import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomGeneralOrderingItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.GeneralOrderingDescriptor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
@@ -56,15 +54,6 @@ public class CustomGeneralOrderingEditPart extends GeneralOrderingEditPart imple
super(view);
}
- /**
- * @Override
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomGeneralOrderingItemSemanticEditPolicy());
- }
-
@Override
protected void handleNotificationEvent(Notification notification) {
super.handleNotificationEvent(notification);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionInteractionCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionInteractionCompartmentEditPart.java
index eaec5055deb..eb4ec63c38d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionInteractionCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionInteractionCompartmentEditPart.java
@@ -19,7 +19,6 @@ import org.eclipse.gef.Request;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomInteractionInteractionCompartmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.util.HighlightUtil;
/**
@@ -42,7 +41,6 @@ public class CustomInteractionInteractionCompartmentEditPart extends Interaction
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInteractionInteractionCompartmentItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CombinedFragmentCreationEditPolicy());
removeEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionNameEditPart.java
index d3bcd9ba40f..b583995726f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionNameEditPart.java
@@ -42,7 +42,7 @@ public class CustomInteractionNameEditPart extends InteractionNameEditPart {
Object p = getParent();
if (p instanceof InteractionEditPart) {
InteractionEditPart iep = (InteractionEditPart) p;
- IFigure container = iep.getPrimaryShape().getHeaderLabel().getParent();
+ IFigure container = iep.getPrimaryShape().getNameLabel().getParent();
if (container != null) {
container.revalidate();
container.repaint();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionOperandEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionOperandEditPart.java
index e1fc8267e67..2a691b5c956 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionOperandEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionOperandEditPart.java
@@ -84,7 +84,6 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ExecutionSpecificatio
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandGuardEditPart.GuardFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandAppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomInteractionOperandItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionOperandFigure;
import org.eclipse.papyrus.uml.diagram.sequence.locator.ContinuationLocator;
import org.eclipse.papyrus.uml.diagram.sequence.locator.TextCellEditorLocator;
@@ -176,7 +175,6 @@ public class CustomInteractionOperandEditPart extends InteractionOperandEditPart
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CombinedFragmentCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInteractionOperandItemSemanticEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new GuardConditionDirectEditPolicy());
removeEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE);
// display stereotype
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionUseEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionUseEditPart.java
index b8673848d99..b9d05f15680 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionUseEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionUseEditPart.java
@@ -28,7 +28,6 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Bounds;
@@ -45,7 +44,6 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode
import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.GateCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.GatesHolderGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomInteractionUseItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionUseRectangleFigure;
import org.eclipse.papyrus.uml.diagram.sequence.locator.GateLocator;
import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
@@ -124,7 +122,6 @@ public class CustomInteractionUseEditPart extends InteractionUseEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInteractionUseItemSemanticEditPolicy());
// installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new SequenceGraphicalNodeEditPolicy());
// Fixed bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389531
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new GatesHolderGraphicalNodeEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineNameEditPart.java
index 6cfd969a8d6..ec48af10dae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineNameEditPart.java
@@ -155,7 +155,7 @@ public class CustomLifelineNameEditPart extends LifelineNameEditPart {
*/
@Override
protected void handleNotificationEvent(Notification event) {
- if (getParent() instanceof CustomLifelineEditPart) {
+ if (getParent() instanceof OLDLifelineEditPart) {
Object feature = event.getFeature();
Object notifier = event.getNotifier();
Lifeline lifeline = (Lifeline) this.resolveSemanticElement();
@@ -165,10 +165,10 @@ public class CustomLifelineNameEditPart extends LifelineNameEditPart {
|| UMLPackage.Literals.NAMED_ELEMENT__NAME.equals(feature) || UMLPackage.Literals.LIFELINE__REPRESENTS.equals(feature)
|| UMLPackage.Literals.LIFELINE__DECOMPOSED_AS.equals(feature) || UMLPackage.Literals.LIFELINE__SELECTOR.equals(feature)
|| event.getNotifier() instanceof Bounds) {
- ((CustomLifelineEditPart) getParent()).updateLifelinePosition();
+ ((OLDLifelineEditPart) getParent()).updateLifelinePosition();
}
if (notifier instanceof EAnnotation && ((EAnnotation) notifier).getSource().equals(VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION)) {
- ((CustomLifelineEditPart) getParent()).updateLifelinePosition();
+ ((OLDLifelineEditPart) getParent()).updateLifelinePosition();
}
}
super.handleNotificationEvent(event);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageAsyncEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageAsyncEditPart.java
index ead767b1e94..18962ced9c4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageAsyncEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageAsyncEditPart.java
@@ -16,9 +16,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.Connection;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomMessageASyncItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageAsync;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
import org.eclipse.uml2.uml.Message;
@@ -44,7 +42,6 @@ public class CustomMessageAsyncEditPart extends MessageAsyncEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomMessageASyncItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageCreateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageCreateEditPart.java
index 0c3e9e911dd..eb6b4f51cf8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageCreateEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageCreateEditPart.java
@@ -16,9 +16,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.Connection;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomMessageCreateItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageCreate;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
import org.eclipse.uml2.uml.Message;
@@ -44,7 +42,6 @@ public class CustomMessageCreateEditPart extends MessageCreateEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomMessageCreateItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageDeleteEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageDeleteEditPart.java
index 9f7e7687cf3..6dacce143b5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageDeleteEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageDeleteEditPart.java
@@ -16,9 +16,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.Connection;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomMessageDeleteItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageDelete;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
import org.eclipse.uml2.uml.Message;
@@ -44,7 +42,6 @@ public class CustomMessageDeleteEditPart extends MessageDeleteEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomMessageDeleteItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageFoundEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageFoundEditPart.java
index 8db900a2596..befe2ca3185 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageFoundEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageFoundEditPart.java
@@ -15,9 +15,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.Connection;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomMessageFoundItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageFound;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
import org.eclipse.uml2.uml.Message;
@@ -43,7 +41,6 @@ public class CustomMessageFoundEditPart extends MessageFoundEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomMessageFoundItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageLostEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageLostEditPart.java
index 83c3475e0c9..000b29592a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageLostEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageLostEditPart.java
@@ -15,9 +15,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.Connection;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomMessageLostItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageLost;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
import org.eclipse.uml2.uml.Message;
@@ -43,7 +41,6 @@ public class CustomMessageLostEditPart extends MessageLostEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomMessageLostItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageReplyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageReplyEditPart.java
index 89afce8ea5e..d27e5c7fb18 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageReplyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageReplyEditPart.java
@@ -16,9 +16,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.Connection;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomMessageReplyItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageReply;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
import org.eclipse.uml2.uml.Message;
@@ -44,7 +42,6 @@ public class CustomMessageReplyEditPart extends MessageReplyEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomMessageReplyItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageSyncEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageSyncEditPart.java
index d83704df902..2d2ef0d01f2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageSyncEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomMessageSyncEditPart.java
@@ -15,9 +15,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.Connection;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomMessageSyncItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageSync;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
import org.eclipse.uml2.uml.Message;
@@ -43,7 +41,6 @@ public class CustomMessageSyncEditPart extends MessageSyncEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomMessageSyncItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomStateInvariantEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomStateInvariantEditPart.java
index b2d31ed2ec4..ac25d971b57 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomStateInvariantEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomStateInvariantEditPart.java
@@ -40,7 +40,6 @@ import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx;
@@ -64,7 +63,6 @@ import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElement
import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ExecutionSpecificationEndEditPart.DummyCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AppliedStereotypeCommentCreationEditPolicyEx;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomStateInvariantItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.ContinuationFigure;
import org.eclipse.papyrus.uml.diagram.sequence.locator.CenterLocator;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
@@ -150,7 +148,6 @@ public class CustomStateInvariantEditPart extends StateInvariantEditPart impleme
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomStateInvariantItemSemanticEditPolicy());
// install a editpolicy to display stereotypes
installEditPolicy(AppliedStereotypeCommentEditPolicy.APPLIED_STEREOTYPE_COMMENT, new AppliedStereotypeCommentCreationEditPolicyEx());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -642,13 +639,13 @@ public class CustomStateInvariantEditPart extends StateInvariantEditPart impleme
borderItemEP.getFigure().translateToAbsolute(realLocation);
Rectangle bounds = ep.getPrimaryShape().getBounds().getCopy();
ep.getPrimaryShape().translateToAbsolute(bounds);
- int nameHeight = ep.getPrimaryShape().getFigureLifelineNameContainerFigure().getBounds().height;
- if (realLocation.y - nameHeight < bounds.y) {
- return false;
- }
- if (realLocation.getBottom().y > bounds.getBottom().y) {
- return false;
- }
+// int nameHeight = ep.getPrimaryShape().getFigureLifelineNameContainerFigure().getBounds().height;
+// if (realLocation.y - nameHeight < bounds.y) {
+// return false;
+// }
+// if (realLocation.getBottom().y > bounds.getBottom().y) {
+// return false;
+// }
return true;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomTimeConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomTimeConstraintEditPart.java
index 4a9640a12a1..7b154b08b90 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomTimeConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomTimeConstraintEditPart.java
@@ -22,7 +22,6 @@ import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
@@ -31,7 +30,6 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeRelatedSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomTimeConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.TimeMarkElementFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
@@ -50,15 +48,6 @@ public class CustomTimeConstraintEditPart extends TimeConstraintEditPart {
}
/**
- * @Override
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomTimeConstraintItemSemanticEditPolicy());
- }
-
- /**
* @Override use ExternalLabelPrimaryDragRoleEditPolicy
*/
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomTimeObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomTimeObservationEditPart.java
index 79d12e23bf7..98d050c240f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomTimeObservationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomTimeObservationEditPart.java
@@ -22,7 +22,6 @@ import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
@@ -31,7 +30,6 @@ import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocat
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeRelatedSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomTimeObservationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.TimeObservationFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
@@ -55,7 +53,6 @@ public class CustomTimeObservationEditPart extends TimeObservationEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomTimeObservationItemSemanticEditPolicy());
removeEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
removeEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationEndEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationEndEditPart.java
index bc600131dea..f466a346ad8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationEndEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationEndEditPart.java
@@ -30,33 +30,26 @@ import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gef.requests.DropRequest;
import org.eclipse.gef.requests.ReconnectRequest;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.util.Log;
import org.eclipse.gmf.runtime.common.core.util.Trace;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIDebugOptions;
import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIPlugin;
import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIStatusCodes;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
import org.eclipse.gmf.runtime.draw2d.ui.figures.IAnchorableFigure;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
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.gef.ui.figures.SlidableOvalAnchor;
import org.eclipse.gmf.runtime.gef.ui.internal.figures.CircleFigure;
import org.eclipse.gmf.runtime.notation.Anchor;
@@ -69,10 +62,6 @@ import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.Shape;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.gmf.runtime.notation.impl.ShapeImpl;
-import org.eclipse.papyrus.uml.diagram.sequence.command.ExecutionOccurrenceSpecificationMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.ExecutionOccurrenceSpecificationMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AnnotatedLinkEndEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationEndGraphicalNodeEditPolicy;
@@ -182,7 +171,6 @@ public class ExecutionSpecificationEndEditPart extends GraphicalEditPart impleme
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionSpecificationEndSemanticEditPolicy());
// The custom Graphical node edit policy for showing feedback has been removed, and this will be finished in HighlightEditPolicy.
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ExecutionSpecificationEndGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {
@@ -346,50 +334,6 @@ public class ExecutionSpecificationEndEditPart extends GraphicalEditPart impleme
}
}
- static class ExecutionSpecificationEndSemanticEditPolicy extends SemanticEditPolicy {
-
- @Override
- protected Command getSemanticCommand(final IEditCommandRequest request) {
- if (request instanceof CreateRelationshipRequest) {
- return getCreateRelationshipCommand((CreateRelationshipRequest) request);
- } else if (request instanceof ReorientReferenceRelationshipRequest) {
- return getGEFWrapper(new ReorientExecutionSpecificationEndCommand((ReorientReferenceRelationshipRequest) request));
- } else if (request instanceof ReorientRelationshipRequest) {
- return getGEFWrapper(new ExecutionOccurrenceSpecificationMessageReorientCommand((ReorientRelationshipRequest) request));
- }
- Command cmd = super.getSemanticCommand(request);
- return cmd;
- }
-
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommandEx(req, req.getSource(), req.getTarget()));
- } else if (UMLElementTypes.Message_SynchEdge == req.getElementType() || UMLElementTypes.Message_AsynchEdge == req.getElementType() || UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new ExecutionOccurrenceSpecificationMessageCreateCommand(req));
- }
- return null;
- }
-
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommandEx(req, req.getSource(), req.getTarget()));
- } else if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommandEx(req, req.getSource(), req.getTarget()));
- } else if (UMLElementTypes.Message_SynchEdge == req.getElementType() || UMLElementTypes.Message_AsynchEdge == req.getElementType() || UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new ExecutionOccurrenceSpecificationMessageCreateCommand(req));
- }
- return null;
- }
-
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command;
- }
-
- protected final Command getGEFWrapper(ICommand cmd) {
- return new ICommandProxy(cmd);
- }
- }
public static class ExecutionSpecificationEndHelper {
@@ -413,37 +357,8 @@ public class ExecutionSpecificationEndEditPart extends GraphicalEditPart impleme
}
}
- static class CommentAnnotatedElementCreateCommandEx extends CommentAnnotatedElementCreateCommand {
- public CommentAnnotatedElementCreateCommandEx(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CommandResult res = super.doExecuteWithResult(monitor, info);
- if (getTarget() instanceof OccurrenceSpecification) {
- ExecutionSpecificationEndHelper.addConnectionSourceToExecutionSpecificationEnd((OccurrenceSpecification) getTarget(), getSource());
- }
- return res;
- }
- }
-
- static class ConstraintConstrainedElementCreateCommandEx extends ConstraintConstrainedElementCreateCommand {
- public ConstraintConstrainedElementCreateCommandEx(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CommandResult res = super.doExecuteWithResult(monitor, info);
- if (getTarget() instanceof OccurrenceSpecification) {
- ExecutionSpecificationEndHelper.addConnectionSourceToExecutionSpecificationEnd((OccurrenceSpecification) getTarget(), getSource());
- }
- return res;
- }
- }
public Locator getLocator() {
return locator;
@@ -659,8 +574,7 @@ public class ExecutionSpecificationEndEditPart extends GraphicalEditPart impleme
if (locator == null) {
initLocator();
}
- if (locator != null)
- {
+ if (locator != null) {
locator.relocate(fig); // place figure at north or south, ignore layout manager
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationRectangleFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationRectangleFigure.java
new file mode 100644
index 00000000000..7df1a7caf06
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationRectangleFigure.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.TreeSearch;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.ILifelineInternalFigure;
+
+public class ExecutionSpecificationRectangleFigure extends RoundedCompartmentFigure implements ILifelineInternalFigure {
+ /**
+ *
+ */
+ private final AbstractExecutionSpecificationEditPart abstractExecutionSpecificationEditPart;
+
+ public ExecutionSpecificationRectangleFigure(AbstractExecutionSpecificationEditPart abstractExecutionSpecificationEditPart) {
+ this.abstractExecutionSpecificationEditPart = abstractExecutionSpecificationEditPart;
+
+ }
+
+ @Override
+ public IFigure findMouseEventTargetAt(int x, int y) {
+ // check children first instead of self
+ IFigure f = findMouseEventTargetInDescendantsAt(x, y);
+ if (f != null) {
+ return f;
+ }
+ if (!containsPoint(x, y)) {
+ return null;
+ }
+ if (isMouseEventTarget()) {
+ return this;
+ }
+ return null;
+ }
+
+ @Override
+ public IFigure findFigureAt(int x, int y, TreeSearch search) {
+ if (search.prune(this)) {
+ return null;
+ }
+ IFigure child = findDescendantAtExcluding(x, y, search);
+ if (child != null) {
+ return child;
+ }
+ if (!containsPoint(x, y)) {
+ return null;
+ }
+ if (search.accept(this)) {
+ return this;
+ }
+ return null;
+ }
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GateEditPart.java
index 45e8d493f14..eb91bbf2ee8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GateEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GateEditPart.java
@@ -42,7 +42,6 @@ import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
@@ -59,7 +58,6 @@ import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocat
import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.GateGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.GateItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.util.GateHelper;
import org.eclipse.papyrus.uml.diagram.sequence.util.GateModelElementFactory;
import org.eclipse.uml2.uml.CombinedFragment;
@@ -161,7 +159,6 @@ public class GateEditPart extends AbstractBorderEditPart implements IBorderItemE
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new GateItemSemanticEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new GateGraphicalNodeEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandGuardEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandGuardEditPart.java
index 0e9c23a9ac4..048ff508786 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandGuardEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandGuardEditPart.java
@@ -100,10 +100,10 @@ import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEdi
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.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.Activator;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.locator.TextCellEditorLocator;
import org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.util.ElementIconUtil;
import org.eclipse.papyrus.uml.diagram.sequence.util.InteractionOperandModelElementFactory;
import org.eclipse.papyrus.uml.diagram.sequence.util.LoopOperatorUtil;
@@ -649,7 +649,7 @@ public class InteractionOperandGuardEditPart extends ShapeEditPart implements IT
protected void initExtendedEditorConfiguration() {
if (configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ final String languagePreferred = UMLDiagramEditorPlugin.getInstance().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else {
@@ -659,7 +659,7 @@ public class InteractionOperandGuardEditPart extends ShapeEditPart implements IT
}
protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ String languagePreferred = UMLDiagramEditorPlugin.getInstance().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEndEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEndEditPart.java
index 7ed17487338..29324f7ae36 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEndEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEndEditPart.java
@@ -50,17 +50,14 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gef.requests.DropRequest;
import org.eclipse.gef.requests.ReconnectRequest;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.util.Log;
import org.eclipse.gmf.runtime.common.core.util.Trace;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIDebugOptions;
import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIPlugin;
import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIStatusCodes;
@@ -70,8 +67,6 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
import org.eclipse.gmf.runtime.draw2d.ui.figures.IAnchorableFigure;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.gef.ui.figures.SlidableOvalAnchor;
import org.eclipse.gmf.runtime.gef.ui.internal.figures.CircleFigure;
@@ -85,9 +80,6 @@ import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.Shape;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.gmf.runtime.notation.impl.ShapeImpl;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AnnotatedLinkEndEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.HighlightEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -230,19 +222,18 @@ public class MessageEndEditPart extends GraphicalEditPart implements INodeEditPa
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MessageEndSemanticEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new MessageEndGraphicalNodeEditPolicy());
- installEditPolicy(HighlightEditPolicy.HIGHLIGHT_ROLE, new HighlightEditPolicy() {
-
- @Override
- protected void highlight(EditPart object) {
- super.highlight(getParent());
- IFigure feedback = getTargetIndicator();
- Rectangle rect = getFigure().getBounds().getCopy();
- getFigure().translateToAbsolute(rect);
- setFeedbackLocation(feedback, rect.getCenter());
- }
- });
+// installEditPolicy(HighlightEditPolicy.HIGHLIGHT_ROLE, new HighlightEditPolicy() {
+//
+// @Override
+// protected void highlight(EditPart object) {
+// super.highlight(getParent());
+// IFigure feedback = getTargetIndicator();
+// Rectangle rect = getFigure().getBounds().getCopy();
+// getFigure().translateToAbsolute(rect);
+// setFeedbackLocation(feedback, rect.getCenter());
+// }
+// });
// Remove CREATION_ROLE if there's no custom DRAG_DROP_ROLE and CREATION_ROLE editpolicies, otherwise, CustomizableDropEditPolicy will be added as a defaultCreationEditPolicy in new CustomizableDropEditPolicy.
removeEditPolicy(EditPolicyRoles.CREATION_ROLE);
}
@@ -251,7 +242,7 @@ public class MessageEndEditPart extends GraphicalEditPart implements INodeEditPa
protected IFigure createFigure() {
final MessageEnd messageEnd = (MessageEnd) this.resolveSemanticElement();
IFigure fig = new MessageEndFigure();
- fig.setForegroundColor(ColorConstants.white);
+ fig.setForegroundColor(ColorConstants.yellow);
Label tooltip = new Label();
if (messageEnd != null) {
tooltip.setText(UMLLabelInternationalization.getInstance().getLabel(messageEnd));
@@ -263,27 +254,6 @@ public class MessageEndEditPart extends GraphicalEditPart implements INodeEditPa
return fig;
}
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#resolveSemanticElement()
- *
- * @return
- */
- @Override
- public EObject resolveSemanticElement() {
- EObject resolveSemanticElement = super.resolveSemanticElement();
- if (resolveSemanticElement instanceof Message){
- // This should never happen but does see Bug 502155
- Message message = (Message) resolveSemanticElement;
- final MessageEnd messageEnd = message.getReceiveEvent();
- if (messageEnd != null) {
- return messageEnd;
- } else {
- return message.getSendEvent();
- }
- }
- return resolveSemanticElement;
- }
-
@Override
public boolean hasNotationView() {
return true;
@@ -301,8 +271,7 @@ public class MessageEndEditPart extends GraphicalEditPart implements INodeEditPa
Anchor a = ((Edge) connection.getModel()).getSourceAnchor();
if (a instanceof IdentityAnchor) {
setResult(((IdentityAnchor) a).getId());
- }
- else {
+ } else {
setResult(""); //$NON-NLS-1$
}
}
@@ -327,8 +296,7 @@ public class MessageEndEditPart extends GraphicalEditPart implements INodeEditPa
Anchor a = ((Edge) connection.getModel()).getTargetAnchor();
if (a instanceof IdentityAnchor) {
setResult(((IdentityAnchor) a).getId());
- }
- else {
+ } else {
setResult(""); //$NON-NLS-1$
}
}
@@ -396,8 +364,7 @@ public class MessageEndEditPart extends GraphicalEditPart implements INodeEditPa
if (annotation != null) {
for (EObject eo : annotation.getReferences()) {
View view = helper.findView(eo);
- if (view == null)
- {
+ if (view == null) {
continue; // should not happen
}
EList edges = view.getSourceEdges();
@@ -456,7 +423,7 @@ public class MessageEndEditPart extends GraphicalEditPart implements INodeEditPa
List<OccurrenceSpecification> events = new ArrayList<OccurrenceSpecification>(2);
final MessageOccurrenceSpecification messageEnd = (MessageOccurrenceSpecification) ((MessageEndEditPart) getHost()).resolveSemanticElement();
events.add(messageEnd);
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
+ extendedData.put(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION, request.getLocation());
}
}
@@ -518,80 +485,8 @@ public class MessageEndEditPart extends GraphicalEditPart implements INodeEditPa
}
}
- static class MessageEndSemanticEditPolicy extends SemanticEditPolicy {
-
- @Override
- protected Command getSemanticCommand(final IEditCommandRequest request) {
- if (request instanceof CreateRelationshipRequest) {
- return getCreateRelationshipCommand((CreateRelationshipRequest) request);
- } else if (request instanceof ReorientReferenceRelationshipRequest) {
- return getGEFWrapper(new ReorientMessageEndCommand((ReorientReferenceRelationshipRequest) request));
- }
- Command cmd = super.getSemanticCommand(request);
- return cmd;
- }
-
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommandEx(req, req.getSource(), req.getTarget()));
- } else if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommandEx(req, req.getSource(), req.getTarget()));
- } else if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommandEx(req, req.getSource(), req.getTarget()));
- } else if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command;
- }
-
- protected final Command getGEFWrapper(ICommand cmd) {
- return new ICommandProxy(cmd);
- }
- }
-
- static class CommentAnnotatedElementCreateCommandEx extends CommentAnnotatedElementCreateCommand {
- public CommentAnnotatedElementCreateCommandEx(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CommandResult res = super.doExecuteWithResult(monitor, info);
- if (getTarget() instanceof MessageEnd) {
- MessageEndHelper.addConnectionSourceToMessageEnd((MessageEnd) getTarget(), getSource());
- }
- return res;
- }
- }
-
- static class ConstraintConstrainedElementCreateCommandEx extends ConstraintConstrainedElementCreateCommand {
-
- public ConstraintConstrainedElementCreateCommandEx(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request, source, target);
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CommandResult res = super.doExecuteWithResult(monitor, info);
- if (getTarget() instanceof MessageEnd) {
- MessageEndHelper.addConnectionSourceToMessageEnd((MessageEnd) getTarget(), getSource());
- }
- return res;
- }
- }
static class MessageEndAnchor extends SlidableOvalAnchor {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomBehaviorExecutionSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDCustomBehaviorExecutionSpecificationEditPart.java
index 030182efc25..315165f0cc5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomBehaviorExecutionSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDCustomBehaviorExecutionSpecificationEditPart.java
@@ -41,7 +41,6 @@ import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
@@ -56,7 +55,6 @@ import org.eclipse.papyrus.uml.diagram.common.helper.NotificationHelper;
import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ExecutionSpecificationEndEditPart.DummyCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomBehaviorExecutionSpecificationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.util.BehaviorDisplayHelper;
import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
import org.eclipse.uml2.uml.Behavior;
@@ -72,7 +70,17 @@ import org.eclipse.uml2.uml.UMLPackage;
*
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class CustomBehaviorExecutionSpecificationEditPart extends BehaviorExecutionSpecificationEditPart {
+public class OLDCustomBehaviorExecutionSpecificationEditPart extends BehaviorExecutionSpecificationEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public OLDCustomBehaviorExecutionSpecificationEditPart(View view) {
+ super(view);
+ // TODO Auto-generated constructor stub
+ }
private NotificationHelper helper = new NotificationHelper(new UIAdapterImpl() {
@@ -88,14 +96,6 @@ public class CustomBehaviorExecutionSpecificationEditPart extends BehaviorExecut
*/
private EditPartListener selfRemovingListener;
- /**
- * Constructor.
- *
- * @param view
- */
- public CustomBehaviorExecutionSpecificationEditPart(View view) {
- super(view);
- }
/**
* @Override
@@ -103,7 +103,6 @@ public class CustomBehaviorExecutionSpecificationEditPart extends BehaviorExecut
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomBehaviorExecutionSpecificationItemSemanticEditPolicy());
// Fixed bug about reconnect message when the ends of execution were MessageOccurrenceSpecification.
removeEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE);
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ExecutionGraphicalNodeEditPolicy());
@@ -243,7 +242,7 @@ public class CustomBehaviorExecutionSpecificationEditPart extends BehaviorExecut
@Override
public void removingChild(EditPart child, int index) {
boolean removeBehavior = false;
- EditPart editPart = CustomBehaviorExecutionSpecificationEditPart.this;
+ EditPart editPart = OLDCustomBehaviorExecutionSpecificationEditPart.this;
while (editPart != null && !(editPart instanceof RootEditPart)) {
if (editPart == child) {
removeBehavior = true;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDCustomCombinedFragmentEditPart.java
index 3b5388001f5..cbed6655e7a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDCustomCombinedFragmentEditPart.java
@@ -61,7 +61,6 @@ import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
@@ -100,7 +99,6 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AbstractHeadImpact
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentHeadImpactLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.GateCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.GatesHolderGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomCombinedFragmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.CombinedFragmentFigure;
import org.eclipse.papyrus.uml.diagram.sequence.locator.GateLocator;
import org.eclipse.papyrus.uml.diagram.sequence.locator.TextCellEditorLocator;
@@ -129,7 +127,7 @@ import org.eclipse.uml2.uml.UMLPackage;
*
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class CustomCombinedFragmentEditPart extends CombinedFragmentEditPart implements ITextAwareEditPart {
+public class OLDCustomCombinedFragmentEditPart extends CombinedFragmentEditPart implements ITextAwareEditPart {
/**
@@ -187,7 +185,7 @@ public class CustomCombinedFragmentEditPart extends CombinedFragmentEditPart imp
*
* @param view
*/
- public CustomCombinedFragmentEditPart(View view) {
+ public OLDCustomCombinedFragmentEditPart(View view) {
super(view);
}
@@ -197,7 +195,6 @@ public class CustomCombinedFragmentEditPart extends CombinedFragmentEditPart imp
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomCombinedFragmentItemSemanticEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new CombinedFragmentDirectEditPolicy());
// Fixed bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389531
@@ -405,7 +402,7 @@ public class CustomCombinedFragmentEditPart extends CombinedFragmentEditPart imp
@Override
public void run() {
LifelineCoveredByUpdater updater = new LifelineCoveredByUpdater();
- updater.update(CustomCombinedFragmentEditPart.this);
+ updater.update(OLDCustomCombinedFragmentEditPart.this);
}
});
}
@@ -467,7 +464,7 @@ public class CustomCombinedFragmentEditPart extends CombinedFragmentEditPart imp
if (element instanceof CombinedFragment) {
CombinedFragment combinedFragment = (CombinedFragment) element;
String operatorKind = combinedFragment.getInteractionOperator().getName();
- getPrimaryShape().getHeaderLabel().setText(operatorKind);
+ getPrimaryShape().getNameLabel().setText(operatorKind);
}
}
@@ -568,7 +565,7 @@ public class CustomCombinedFragmentEditPart extends CombinedFragmentEditPart imp
protected void refreshLabelIcon() {
Image image = ElementIconUtil.getLabelIcon(this);
- getPrimaryShape().getHeaderLabel().setIcon(image);
+ getPrimaryShape().getNameLabel().setIcon(image);
}
// update label visibility and text
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDLifelineEditPart.java
index 771cc43d301..9aa57d8fa57 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDLifelineEditPart.java
@@ -106,8 +106,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionCompart
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineHeadImpactLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineXYLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomLifelineItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDLifelineXYLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure;
import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineFigure;
import org.eclipse.papyrus.uml.diagram.sequence.locator.TimeMarkElementPositionLocator;
@@ -143,8 +142,9 @@ import org.eclipse.uml2.uml.UMLPackage;
/**
* @author Jin Liu (jin.liu@soyatec.com)
+ * @deprecated will be remove in Oxygen
*/
-public class CustomLifelineEditPart extends LifelineEditPart {
+public class OLDLifelineEditPart extends LifelineEditPart {
public class CustomLifelineFigure extends LifelineFigure {
@@ -157,7 +157,7 @@ public class CustomLifelineEditPart extends LifelineEditPart {
@Override
protected IMapMode getMapMode() {
- return CustomLifelineEditPart.this.getMapMode();
+ return OLDLifelineEditPart.this.getMapMode();
}
@Override
@@ -318,7 +318,7 @@ public class CustomLifelineEditPart extends LifelineEditPart {
/**
* Layout role for normal mode
*/
- private LayoutEditPolicy normalModeLayoutRole = new LifelineXYLayoutEditPolicy();
+ private LayoutEditPolicy normalModeLayoutRole = new OLDLifelineXYLayoutEditPolicy();
/**
* Layout role for drag drop
@@ -332,7 +332,7 @@ public class CustomLifelineEditPart extends LifelineEditPart {
*
* @param view
*/
- public CustomLifelineEditPart(View view) {
+ public OLDLifelineEditPart(View view) {
super(view);
}
@@ -450,7 +450,6 @@ public class CustomLifelineEditPart extends LifelineEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomLifelineItemSemanticEditPolicy());
// Fixed bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=364608
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new LifelineSelectionEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new LifelineMessageCreateHelper.ComponentEditPolicyEx());
@@ -765,8 +764,8 @@ public class CustomLifelineEditPart extends LifelineEditPart {
if (request instanceof CreateConnectionRequest) {
CreateConnectionRequest createConnectionRequest = (CreateConnectionRequest) request;
EditPart target = createConnectionRequest.getTargetEditPart();
- if (target instanceof CustomLifelineEditPart) {
- CustomLifelineEditPart lifelineEditPart = (CustomLifelineEditPart) target;
+ if (target instanceof OLDLifelineEditPart) {
+ OLDLifelineEditPart lifelineEditPart = (OLDLifelineEditPart) target;
Rectangle lifelineBounds = lifelineEditPart.getContentPane().getBounds();
for (ShapeNodeEditPart executionSpecificationEditPart : LifelineEditPartUtil.getChildShapeNodeEditPart(lifelineEditPart)) {
IFigure executionSpecificationFigure = executionSpecificationEditPart.getFigure();
@@ -829,7 +828,7 @@ public class CustomLifelineEditPart extends LifelineEditPart {
LifelineDotLineFigure figureLifelineDotLineFigure = getPrimaryShape().getFigureLifelineDotLineFigure();
Rectangle rectDotLine = figureLifelineDotLineFigure.getBounds().getCopy();
figureLifelineDotLineFigure.translateToAbsolute(rectDotLine);
- int bottom = rectDotLine.y + LifelineXYLayoutEditPolicy.SPACING_HEIGHT; // at least header height + spacing
+ int bottom = rectDotLine.y + OLDLifelineXYLayoutEditPolicy.SPACING_HEIGHT; // at least header height + spacing
for (InteractionFragment interactionFragment : coveredBys) {
Collection<Setting> settings = CacheAdapter.getInstance().getNonNavigableInverseReferences(interactionFragment);
for (Setting ref : settings) {
@@ -1055,8 +1054,8 @@ public class CustomLifelineEditPart extends LifelineEditPart {
@Override
public void run() {
- LifelineCoveredByUpdater updater = new LifelineCoveredByUpdater();
- updater.update(CustomLifelineEditPart.this);
+// LifelineCoveredByUpdater updater = new LifelineCoveredByUpdater();
+// updater.update(CustomLifelineEditPart.this);
}
});
}
@@ -1279,7 +1278,7 @@ public class CustomLifelineEditPart extends LifelineEditPart {
return -1;
}
CustomInteractionInteractionCompartmentEditPart parentEP = (CustomInteractionInteractionCompartmentEditPart) getParent();
- CustomInteractionEditPart grandParent = (CustomInteractionEditPart) parentEP.getParent();
+ OldCustomInteractionEditPart grandParent = (OldCustomInteractionEditPart) parentEP.getParent();
final Bounds bounds = (Bounds) ((Shape) getModel()).getLayoutConstraint();
final Bounds boundsGrandParent = (Bounds) ((Shape) grandParent.getModel()).getLayoutConstraint();
if (bounds != null && boundsGrandParent != null) {
@@ -1294,7 +1293,7 @@ public class CustomLifelineEditPart extends LifelineEditPart {
grandParent.getFigure().translateToRelative(boundsRect);
// return boundsGrandParent.getHeight() - boundsRect.y - LifelineXYLayoutEditPolicy.LIFELINE_SOUTH_SPACING;
int heightDiff = grandParent.getFigure().getBounds().height - parentEP.getFigure().getBounds().height;
- Dimension zoomedAddon = new Dimension(0, LifelineXYLayoutEditPolicy.LIFELINE_SOUTH_SPACING);
+ Dimension zoomedAddon = new Dimension(0, OLDLifelineXYLayoutEditPolicy.LIFELINE_SOUTH_SPACING);
grandParent.getFigure().translateToRelative(zoomedAddon);
return grandParentRect.height() - bounds.getY() - heightDiff - zoomedAddon.height;
}
@@ -1335,7 +1334,7 @@ public class CustomLifelineEditPart extends LifelineEditPart {
}
org.eclipse.emf.common.command.Command changeHeightCommand = SetCommand.create(getEditingDomain(), bounds, NotationPackage.Literals.SIZE__HEIGHT, bounds.getHeight());
changeHeightCommand.execute();
- PreserveAnchorsPositionCommandEx preserveAnchorsCommand = new PreserveAnchorsPositionCommandEx(CustomLifelineEditPart.this, new Dimension(0, heightDelta), PreserveAnchorsPositionCommand.PRESERVE_Y, getPrimaryShape()
+ PreserveAnchorsPositionCommandEx preserveAnchorsCommand = new PreserveAnchorsPositionCommandEx(OLDLifelineEditPart.this, new Dimension(0, heightDelta), PreserveAnchorsPositionCommand.PRESERVE_Y, getPrimaryShape()
.getFigureLifelineDotLineFigure(), PositionConstants.SOUTH);
if (preserveAnchorsCommand.canExecute()) {
preserveAnchorsCommand.execute(monitor, info);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomPackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDPackageEditPart.java
index 37a4e17d688..2d67082ddad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomPackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OLDPackageEditPart.java
@@ -24,20 +24,19 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.providers.BaseViewInfo;
import org.eclipse.papyrus.uml.diagram.common.providers.ViewInfo;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomPackageItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
/**
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class CustomPackageEditPart extends PackageEditPart {
+public class OLDPackageEditPart extends SequenceDiagramEditPart {
/**
* Constructor.
*
* @param view
*/
- public CustomPackageEditPart(View view) {
+ public OLDPackageEditPart(View view) {
super(view);
}
@@ -49,7 +48,6 @@ public class CustomPackageEditPart extends PackageEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomPackageItemSemanticEditPolicy());
removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
removeEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE);
// fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364688
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OldCustomInteractionEditPart.java
index 0cd63fb04f2..56ed6481597 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/OldCustomInteractionEditPart.java
@@ -67,7 +67,6 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.GateCreationEditPo
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionFragmentsCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionHeadImpactLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomInteractionItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.StereotypeInteractionFigure;
import org.eclipse.papyrus.uml.diagram.sequence.locator.GateLocator;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -83,7 +82,7 @@ import org.eclipse.uml2.uml.UMLPackage;
*
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class CustomInteractionEditPart extends InteractionEditPart implements IPapyrusEditPart {
+public class OldCustomInteractionEditPart extends InteractionEditPart implements IPapyrusEditPart {
/**
* Default Margin when not present in CSS
@@ -120,7 +119,7 @@ public class CustomInteractionEditPart extends InteractionEditPart implements IP
*
* @param view
*/
- public CustomInteractionEditPart(View view) {
+ public OldCustomInteractionEditPart(View view) {
super(view);
}
@@ -147,12 +146,12 @@ public class CustomInteractionEditPart extends InteractionEditPart implements IP
}
public Command getUpdateLifelinesHeightsCommand(Command command) {
- for (Object child : CustomInteractionEditPart.this.getChildren()) {
+ for (Object child : OldCustomInteractionEditPart.this.getChildren()) {
if (child instanceof InteractionInteractionCompartmentEditPart) {
InteractionInteractionCompartmentEditPart childEditPart = (InteractionInteractionCompartmentEditPart) child;
for (Object grandChild : childEditPart.getChildren()) {
- if (grandChild instanceof CustomLifelineEditPart) {
- command = ((CustomLifelineEditPart) grandChild).getAlignLifelineBottomToParentCommand(command, false);
+ if (grandChild instanceof OLDLifelineEditPart) {
+ //command = ((CustomLifelineEditPart) grandChild).getAlignLifelineBottomToParentCommand(command, false);
}
}
}
@@ -166,7 +165,6 @@ public class CustomInteractionEditPart extends InteractionEditPart implements IP
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInteractionItemSemanticEditPolicy());
// Fixed bugs: https://bugs.eclipse.org/bugs/show_bug.cgi?id=403134 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=389531
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new InteractionGraphicalNodeEditPolicy());
// Create gate: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389531
@@ -212,15 +210,15 @@ public class CustomInteractionEditPart extends InteractionEditPart implements IP
@Override
public Dimension getMinimumSize(int wHint, int hHint) {
Rectangle bounds = new Rectangle();
- for (Object child : CustomInteractionEditPart.this.getChildren()) {
+ for (Object child : OldCustomInteractionEditPart.this.getChildren()) {
if (child instanceof InteractionInteractionCompartmentEditPart) {
InteractionInteractionCompartmentEditPart childEditPart = (InteractionInteractionCompartmentEditPart) child;
for (Object grandChild : childEditPart.getChildren()) {
GraphicalEditPart editPart = (GraphicalEditPart) grandChild;
IFigure figure = editPart.getFigure();
- if (grandChild instanceof CustomLifelineEditPart) {
+ if (grandChild instanceof OLDLifelineEditPart) {
Rectangle childBounds = figure.getBounds().getCopy();
- childBounds.height = ((CustomLifelineEditPart) grandChild).getMinimumHeight(-1);
+ //childBounds.height = ((CustomLifelineEditPart) grandChild).getMinimumHeight(-1);
bounds.union(childBounds);
} else {
bounds.union(figure.getBounds());
@@ -228,7 +226,7 @@ public class CustomInteractionEditPart extends InteractionEditPart implements IP
}
IFigure figure = childEditPart.getFigure();
Rectangle rectangle = figure.getBounds();
- IFigure parentfigure = CustomInteractionEditPart.this.getFigure();
+ IFigure parentfigure = OldCustomInteractionEditPart.this.getFigure();
Rectangle parentRectangle = parentfigure.getBounds();
Dimension zoomedAddon = new Dimension(10, 16);
figure.translateToRelative(zoomedAddon);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/AnnotatedLinkEndEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/AnnotatedLinkEndEditPolicy.java
index 91db4040eb1..6399b78584b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/AnnotatedLinkEndEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/AnnotatedLinkEndEditPolicy.java
@@ -39,8 +39,8 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.command.AnnotatedLinkEditCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AnnotatedLinkEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart.CustomLifelineFigure;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart.CustomLifelineFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.figures.EllipseDecoration;
@@ -70,11 +70,11 @@ public class AnnotatedLinkEndEditPolicy extends GraphicalNodeEditPolicy {
Point location = ((DropRequest) request).getLocation();
EditPart host = getHost();
// Fixed bugs when link with PartDecomposition.
- if (host instanceof CustomLifelineEditPart && ((CustomLifelineEditPart) host).isInlineMode()) {
- List children = ((CustomLifelineEditPart) host).getChildren();
+ if (host instanceof OLDLifelineEditPart && ((OLDLifelineEditPart) host).isInlineMode()) {
+ List children = ((OLDLifelineEditPart) host).getChildren();
for (Object object : children) {
- if (object instanceof CustomLifelineEditPart) {
- CustomLifelineFigure figure = ((CustomLifelineEditPart) object).getPrimaryShape();
+ if (object instanceof OLDLifelineEditPart) {
+ CustomLifelineFigure figure = ((OLDLifelineEditPart) object).getPrimaryShape();
Point pt = location.getCopy();
figure.translateToRelative(pt);
if (figure.containsPoint(pt)) {
@@ -82,7 +82,7 @@ public class AnnotatedLinkEndEditPolicy extends GraphicalNodeEditPolicy {
}
}
}
- IFigure nameFigure = ((CustomLifelineEditPart) host).getPrimaryShape().getFigureLifelineNameContainerFigure();
+ IFigure nameFigure = ((OLDLifelineEditPart) host).getPrimaryShape().getFigureLifelineNameContainerFigure();
Point pt = location.getCopy();
nameFigure.translateToRelative(pt);
if (nameFigure.containsPoint(pt)) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCreationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCreationEditPolicy.java
index d3c34e7c835..9b7ebf0df86 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCreationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCreationEditPolicy.java
@@ -25,11 +25,11 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -46,7 +46,7 @@ import org.eclipse.uml2.uml.InteractionFragment;
* @author mvelten
*
*/
-public class CombinedFragmentCreationEditPolicy extends CreationEditPolicy {
+public class CombinedFragmentCreationEditPolicy extends DefaultCreationEditPolicy {
@SuppressWarnings("unchecked")
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentHeadImpactLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentHeadImpactLayoutEditPolicy.java
index 0fc07e6813c..67ae048e778 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentHeadImpactLayoutEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentHeadImpactLayoutEditPolicy.java
@@ -51,7 +51,7 @@ public class CombinedFragmentHeadImpactLayoutEditPolicy extends AbstractHeadImpa
protected int getHeadHeight() {
IFigure primaryShape = getPrimaryShape();
if (primaryShape instanceof StereotypeInteractionFigure) {
- IFigure headContainer = ((StereotypeInteractionFigure) primaryShape).getHeaderLabel().getParent();
+ IFigure headContainer = ((StereotypeInteractionFigure) primaryShape).getNameLabel().getParent();
Rectangle boundsRect = getBoundsRect();
return headContainer.getPreferredSize(boundsRect.width, -1).height;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemComponentEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemComponentEditPolicy.java
index 1eec7839c61..a0dcc7d310d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemComponentEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemComponentEditPolicy.java
@@ -28,7 +28,7 @@ import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalC
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.util.CombinedFragmentDeleteHelper;
import org.eclipse.uml2.uml.CombinedFragment;
-
+@Deprecated
public class CombinedFragmentItemComponentEditPolicy extends ComponentEditPolicy {
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CreationOnMessageEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CreationOnMessageEditPolicy.java
index b63d49f60c8..067ff526721 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CreationOnMessageEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CreationOnMessageEditPolicy.java
@@ -70,7 +70,7 @@ public class CreationOnMessageEditPolicy extends CreationEditPolicy {
if (extendedData.containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2)) {
extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2, events);
} else {
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
+ extendedData.put(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
}
if (extendedData.containsKey(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2)) {
extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2, location);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomCombinedFragment2ResizeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomCombinedFragment2ResizeEditPolicy.java
index 96c28311655..bd018c3e4eb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomCombinedFragment2ResizeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomCombinedFragment2ResizeEditPolicy.java
@@ -25,7 +25,7 @@ import org.eclipse.gef.requests.ChangeBoundsRequest;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;
import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineFigure;
import org.eclipse.papyrus.uml.diagram.sequence.util.HighlightUtil;
@@ -37,7 +37,7 @@ public class CustomCombinedFragment2ResizeEditPolicy extends ResizableShapeEditP
@Override
protected void showChangeBoundsFeedback(ChangeBoundsRequest request) {
- CustomLifelineEditPart lifelineEP = (CustomLifelineEditPart) getHost().getParent();
+ OLDLifelineEditPart lifelineEP = (OLDLifelineEditPart) getHost().getParent();
request.getMoveDelta().x = 0; // reset offset
request.getSizeDelta().width = 0; // reset offset
IFigure feedback = getDragSourceFeedbackFigure();
@@ -70,7 +70,7 @@ public class CustomCombinedFragment2ResizeEditPolicy extends ResizableShapeEditP
IFigure dotlineFigure = ((LifelineFigure)lifelineEP.getPrimaryShape()).getFigureLifelineDotLineFigure();
Rectangle rectParent = dotlineFigure.getBounds().getCopy();
lifelineEP.getPrimaryShape().translateToAbsolute(rectParent);
- int minLifelineY = rectParent.y + LifelineXYLayoutEditPolicy.SPACING_HEIGHT;
+ int minLifelineY = rectParent.y + OLDLifelineXYLayoutEditPolicy.SPACING_HEIGHT;
if (rect.y < minLifelineY) {
request.getMoveDelta().y += minLifelineY - rect.y;
rect.y = minLifelineY;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java
index 9d973361526..ba216d9b144 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java
@@ -74,6 +74,7 @@ import org.eclipse.papyrus.uml.diagram.common.helper.DurationObservationHelper;
import org.eclipse.papyrus.uml.diagram.sequence.command.CreateGateViewCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CreateLocatedConnectionViewCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.RestoreDurationConstraintLinkCommand;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
@@ -86,7 +87,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Constraint2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomCombinedFragmentEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDCustomCombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
@@ -105,7 +106,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
@@ -163,6 +164,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
protected Set<String> getDroppableElementVisualId() {
Set<String> elementsVisualId = new HashSet<String>();
elementsVisualId.add(LifelineEditPart.VISUAL_ID);
+ elementsVisualId.add(CCombinedCompartmentEditPart.VISUAL_ID);
elementsVisualId.add(ActionExecutionSpecificationEditPart.VISUAL_ID);
elementsVisualId.add(BehaviorExecutionSpecificationEditPart.VISUAL_ID);
elementsVisualId.add(InteractionUseEditPart.VISUAL_ID);
@@ -184,7 +186,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
elementsVisualId.add(TimeConstraintEditPart.VISUAL_ID);
elementsVisualId.add(TimeObservationEditPart.VISUAL_ID);
elementsVisualId.add(DurationConstraintEditPart.VISUAL_ID);
- elementsVisualId.add(PackageEditPart.VISUAL_ID);
+ elementsVisualId.add(SequenceDiagramEditPart.VISUAL_ID);
elementsVisualId.add(MessageSyncEditPart.VISUAL_ID);
elementsVisualId.add(MessageAsyncEditPart.VISUAL_ID);
elementsVisualId.add(MessageReplyEditPart.VISUAL_ID);
@@ -222,8 +224,8 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
if (editParts != null) {
for (Object part : editParts) {
- someCombinedFragment |= (part instanceof CustomCombinedFragmentEditPart);
- someNonCombinedFragment |= !(part instanceof CustomCombinedFragmentEditPart);
+ someCombinedFragment |= (part instanceof OLDCustomCombinedFragmentEditPart);
+ someNonCombinedFragment |= !(part instanceof OLDCustomCombinedFragmentEditPart);
}
}
@@ -251,7 +253,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
// Move the request's CFs models and views
if (editParts != null) {
for (Object part : editParts) {
- CustomCombinedFragmentEditPart combinedFragmentEP = (CustomCombinedFragmentEditPart) part;
+ OLDCustomCombinedFragmentEditPart combinedFragmentEP = (OLDCustomCombinedFragmentEditPart) part;
CombinedFragment combinedFragment = (CombinedFragment) ViewUtil.resolveSemanticElement((View) ((IGraphicalEditPart) combinedFragmentEP).getModel());
if (combinedFragmentEP.getParent() == newParentEP) {
@@ -283,7 +285,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
newParentEP.getFigure().translateToAbsolute(newParentOldRect);
Rectangle newParentNewRect = new Rectangle(newParentOldRect.getUnion(rectangleDroppedCombined));
- if (getHost().getParent() instanceof CustomCombinedFragmentEditPart) {
+ if (getHost().getParent() instanceof OLDCustomCombinedFragmentEditPart) {
CombinedFragmentMoveHelper.adjustNewParentOperands(cc, newParentNewRect, newParentOldRect, getHost());
}
// TODO: resize parent's parent (and so on)
@@ -303,7 +305,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
if (editParts != null) {
for (Object part : request.getEditParts()) {
- CustomCombinedFragmentEditPart combinedFragmentEP = (CustomCombinedFragmentEditPart) part;
+ OLDCustomCombinedFragmentEditPart combinedFragmentEP = (OLDCustomCombinedFragmentEditPart) part;
CombinedFragmentMoveHelper.moveCombinedFragmentEP(cc, request, combinedFragmentEP, newParentEP, newParentOffsetSW);
}
}
@@ -379,8 +381,9 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
}
if (nodeVISUALID != null) {
switch (nodeVISUALID) {
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
+ case CCombinedCompartmentEditPart.VISUAL_ID:
return dropExecutionSpecification((ExecutionSpecification) semanticElement, nodeVISUALID, location);
case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
return dropDestructionOccurrence((DestructionOccurrenceSpecification) semanticElement, nodeVISUALID, location);
@@ -465,7 +468,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
if (getHostObject().equals(parentContainer)) {
List<View> existingViews = DiagramEditPartsUtil.findViews(parent, getViewer());
if (!existingViews.isEmpty()) {
- EditPart parentEditPart = lookForEditPart(parent);
+ EditPart parentEditPart = getHost();
if (parentEditPart instanceof GraphicalEditPart) {
// check if all lifelines coversby exist in diagram.
Rectangle bounds = null;
@@ -781,7 +784,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
if (execution != null) {
List<View> existingViews = DiagramEditPartsUtil.findViews(execution, getViewer());
for (View view : existingViews) {
- if (ActionExecutionSpecificationEditPart.VISUAL_ID.equals(UMLVisualIDRegistry.getVisualID(view)) || BehaviorExecutionSpecificationEditPart.VISUAL_ID.equals(UMLVisualIDRegistry.getVisualID(view))) {
+ if (CCombinedCompartmentEditPart.VISUAL_ID.equals(UMLVisualIDRegistry.getVisualID(view)) || BehaviorExecutionSpecificationEditPart.VISUAL_ID.equals(UMLVisualIDRegistry.getVisualID(view))) {
Object object = getViewer().getEditPartRegistry().get(view);
if (object instanceof IGraphicalEditPart) {
Rectangle bounds = SequenceUtil.getAbsoluteBounds((IGraphicalEditPart) object);
@@ -1079,19 +1082,19 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
// Get the lifelines containing the graphical destructionEvent
List<Lifeline> lifelines = getLifelines(existingViews);
// If the list of lifeline already containing the destructionEvent doesn't contain the lifeline targeted.
- if (!lifelines.contains(getHostObject())) {
- Lifeline lifeline = (Lifeline) getHostObject();
- for (InteractionFragment ift : lifeline.getCoveredBys()) {
- if (ift instanceof DestructionOccurrenceSpecification) {
- DestructionOccurrenceSpecification occurrenceSpecification = (DestructionOccurrenceSpecification) ift;
- // if the event of the occurrenceSpecification is the DestructionEvent, create the command
- if (destructionOccurence.equals(occurrenceSpecification)) {
+// if (!lifelines.contains(getHostObject())) {
+// Lifeline lifeline = (Lifeline) getHostObject();
+// for (InteractionFragment ift : lifeline.getCoveredBys()) {
+// if (ift instanceof DestructionOccurrenceSpecification) {
+// DestructionOccurrenceSpecification occurrenceSpecification = (DestructionOccurrenceSpecification) ift;
+// // if the event of the occurrenceSpecification is the DestructionEvent, create the command
+// if (destructionOccurence.equals(occurrenceSpecification)) {
return new ICommandProxy(getDefaultDropNodeCommand(nodeVISUALID, location, destructionOccurence));
- }
- }
- }
- }
- return UnexecutableCommand.INSTANCE;
+// }
+// }
+// }
+// }
+// return UnexecutableCommand.INSTANCE;
}
/**
@@ -1206,7 +1209,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
// Minimum shape (not just an horizontal line)
if (possibleFinishLocations.height <= 0) {
- possibleFinishLocations.height = LifelineXYLayoutEditPolicy.EXECUTION_INIT_HEIGHT;
+ possibleFinishLocations.height = OLDLifelineXYLayoutEditPolicy.EXECUTION_INIT_HEIGHT;
}
}
// find start and finish locations with correct y (start.y < finish.y) and proportions
@@ -1253,7 +1256,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
}
// deduce bounds
Rectangle result = new Rectangle(startLocation, finishLocation);
- result.width = LifelineXYLayoutEditPolicy.EXECUTION_INIT_WIDTH;
+ result.width = OLDLifelineXYLayoutEditPolicy.EXECUTION_INIT_WIDTH;
return result;
}
return null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DeleteTimeElementWithoutEventPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DeleteTimeElementWithoutEventPolicy.java
index 917959accb9..90ffa995a41 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DeleteTimeElementWithoutEventPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DeleteTimeElementWithoutEventPolicy.java
@@ -246,7 +246,7 @@ public class DeleteTimeElementWithoutEventPolicy extends AbstractEditPolicy impl
} else if (getHost() instanceof TimeConstraintEditPart && hostSemanticElement instanceof TimeConstraint) {
LifelineEditPart lifeline = SequenceUtil.getParentLifelinePart(getHost());
List<Element> occs = ((TimeConstraint) hostSemanticElement).getConstrainedElements();
- if (occs.size() > 0 & occs.get(0) instanceof OccurrenceSpecification) {
+ if (occs.size() > 0 && occs.get(0) instanceof OccurrenceSpecification) {
EditPart part = SequenceUtil.getLinkedEditPart(lifeline, (OccurrenceSpecification) occs.get(0));
if (part != null) {
return Collections.singletonList((View) part.getModel());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ElementCreationWithMessageEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ElementCreationWithMessageEditPolicy.java
index 75f6a01a565..1e7f5919f54 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ElementCreationWithMessageEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ElementCreationWithMessageEditPolicy.java
@@ -37,11 +37,14 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElemen
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.uml.diagram.sequence.command.DropDestructionOccurenceSpecification;
import org.eclipse.papyrus.uml.diagram.sequence.command.PromptCreateElementAndNodeCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart.CustomLifelineFigure;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart.CustomLifelineFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
@@ -86,30 +89,16 @@ public class ElementCreationWithMessageEditPolicy extends LifelineChildGraphical
target = ViewUtil.resolveSemanticElement((View) targetEP.getModel());
}
EditPart sourceEditPart = request.getSourceEditPart();
- if (sourceEditPart instanceof ActionExecutionSpecificationEditPart || sourceEditPart instanceof BehaviorExecutionSpecificationEditPart) {
+ if (sourceEditPart instanceof CCombinedCompartmentEditPart || sourceEditPart instanceof BehaviorExecutionSpecificationEditPart) {
return new ICommandProxy(new PromptCreateElementAndNodeCommand(command, getEditingDomain(), viewRequest.getConnectionViewDescriptor(), (ShapeNodeEditPart) targetEP, target, sourceEP, request, ift));
}
- // IHintedType elementType = null;
- // if(sourceEditPart instanceof ActionExecutionSpecificationEditPart) {
- // elementType = (IHintedType)UMLElementTypes.ActionExecutionSpecification_Shape;
- // } else if(request.getSourceEditPart() instanceof BehaviorExecutionSpecificationEditPart) {
- // elementType = (IHintedType)UMLElementTypes.BehaviorExecutionSpecification_Shape;
- // }
- //
- //
- // if(elementType != null) {
- // CreateElementAndNodeCommand createExecutionSpecificationCommand = new CreateElementAndNodeCommand(getEditingDomain(), (ShapeNodeEditPart)targetEP, target, elementType, request.getLocation());
- // createExecutionSpecificationCommand.putCreateElementRequestParameter(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER, ift);
- // compound.add(createExecutionSpecificationCommand);
- //
- // // put the anchor at the top of the figure
- // ChangeEdgeTargetCommand changeTargetCommand = new ChangeEdgeTargetCommand(getEditingDomain(), createExecutionSpecificationCommand, viewRequest.getConnectionViewDescriptor(), "(0.5, 0.0)");
- // compound.add(new ICommandProxy(changeTargetCommand));
- // }
}
}
+
+ //if the message is DELETE KIND, we must drop the view of the DestructionOccurrenceSpecification
if (getDeleteMessageHint().equals(viewRequest.getConnectionViewDescriptor().getSemanticHint())) {
- command = LifelineMessageDeleteHelper.getAttachToNewDosCommand(command, viewRequest, getEditingDomain(), targetEP, getHost());
+// DropDestructionOccurenceSpecification dropDestructionOccurenceSpecification= new DropDestructionOccurenceSpecification(getEditingDomain(), viewRequest, targetEP);
+// command=command.chain(new EMFtoGEFCommandWrapper(dropDestructionOccurenceSpecification));
}
}
}
@@ -139,8 +128,8 @@ public class ElementCreationWithMessageEditPolicy extends LifelineChildGraphical
@Override
public EditPart getTargetEditPart(Request request) {
EditPart host = getHost();
- if (host instanceof CustomLifelineEditPart) {
- CustomLifelineEditPart lifeline = (CustomLifelineEditPart) host;
+ if (host instanceof OLDLifelineEditPart) {
+ OLDLifelineEditPart lifeline = (OLDLifelineEditPart) host;
boolean inlineMode = lifeline.isInlineMode();
if (inlineMode) {
Object type = request.getType();
@@ -170,10 +159,10 @@ public class ElementCreationWithMessageEditPolicy extends LifelineChildGraphical
return super.getTargetEditPart(request);
}
- private EditPart getTargetEditPart(Request request, CustomLifelineEditPart lifeline, Point location) {
+ private EditPart getTargetEditPart(Request request, OLDLifelineEditPart lifeline, Point location) {
EditPart childEditPart = getChildEditPart(lifeline, location);
- if (childEditPart instanceof CustomLifelineEditPart) {
- CustomLifelineEditPart childLifeline = (CustomLifelineEditPart) childEditPart;
+ if (childEditPart instanceof OLDLifelineEditPart) {
+ OLDLifelineEditPart childLifeline = (OLDLifelineEditPart) childEditPart;
if (isCreateConnectionRequest(request, UMLElementTypes.Message_CreateEdge) && isLocatedOnLifelineHeader(childLifeline, location)) {
return childEditPart;
} else if (request instanceof ReconnectRequest && (UMLVisualIDRegistry.getVisualID((View) ((ReconnectRequest) request).getConnectionEditPart().getModel()).equals(MessageCreateEditPart.VISUAL_ID) && isLocatedOnLifelineHeader(childLifeline, location))) {
@@ -187,7 +176,7 @@ public class ElementCreationWithMessageEditPolicy extends LifelineChildGraphical
return childEditPart;
}
- private EditPart getChildEditPart(CustomLifelineEditPart lifeline, Point location) {
+ private EditPart getChildEditPart(OLDLifelineEditPart lifeline, Point location) {
List children = lifeline.getChildren();
for (Object object : children) {
if (!(object instanceof GraphicalEditPart)) {
@@ -204,7 +193,7 @@ public class ElementCreationWithMessageEditPolicy extends LifelineChildGraphical
return null;
}
- private boolean isLocatedOnLifelineDotLine(CustomLifelineEditPart host, Point location) {
+ private boolean isLocatedOnLifelineDotLine(OLDLifelineEditPart host, Point location) {
CustomLifelineFigure primaryShape = host.getPrimaryShape();
LifelineDotLineCustomFigure figureLifelineDotLineFigure = primaryShape.getFigureLifelineDotLineFigure();
Point pt = location.getCopy();
@@ -214,7 +203,7 @@ public class ElementCreationWithMessageEditPolicy extends LifelineChildGraphical
return rect.contains(pt);
}
- private boolean isLocatedOnLifelineHeader(CustomLifelineEditPart host, Point location) {
+ private boolean isLocatedOnLifelineHeader(OLDLifelineEditPart host, Point location) {
RectangleFigure figureLifelineNameContainerFigure = host.getPrimaryShape().getFigureLifelineNameContainerFigure();
Point pt = location.getCopy();
figureLifelineNameContainerFigure.translateToRelative(pt);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationComponentEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationComponentEditPolicy.java
index 9cfb33c7524..b1152caf199 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationComponentEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationComponentEditPolicy.java
@@ -53,7 +53,7 @@ public class ExecutionSpecificationComponentEditPolicy extends ComponentEditPoli
// support nested actions and behaviors execution, https://bugs.eclipse.org/bugs/show_bug.cgi?id=384616
public static void addDeleteViewChildrenCommand(CompoundCommand deleteViewsCommand, TransactionalEditingDomain editingDomain, ShapeNodeEditPart part) {
- List<ShapeNodeEditPart> list = LifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts(part);
+ List<ShapeNodeEditPart> list = OLDLifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts(part);
for (ShapeNodeEditPart p : list) {
deleteViewsCommand.add(new ICommandProxy(new DeleteCommand(editingDomain, (View) p.getModel())));
SequenceDeleteHelper.completeDeleteExecutionSpecificationViewCommand(deleteViewsCommand, editingDomain, p);
@@ -62,7 +62,7 @@ public class ExecutionSpecificationComponentEditPolicy extends ComponentEditPoli
}
public static void addDestroyElementChildrenCommand(CompoundCommand deleteElementsCommand, TransactionalEditingDomain editingDomain, EditPart part) {
- List<ShapeNodeEditPart> list = LifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts((ShapeNodeEditPart) part);
+ List<ShapeNodeEditPart> list = OLDLifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts((ShapeNodeEditPart) part);
for (ShapeNodeEditPart p : list) {
Request request = new EditCommandRequestWrapper(new DestroyElementRequest(p.resolveSemanticElement(), false));
deleteElementsCommand.add(p.getCommand(request));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationEndGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationEndGraphicalNodeEditPolicy.java
index d8f7e73236d..8f6a9ebcf9e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationEndGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationEndGraphicalNodeEditPolicy.java
@@ -219,16 +219,16 @@ public class ExecutionSpecificationEndGraphicalNodeEditPolicy extends GraphicalN
private Command getCreateAdditionalESCommand(CreateConnectionRequest request) {
INodeEditPart sourceEP = getSourceEditPart(request.getSourceEditPart());
- INodeEditPart targetEP = getConnectionCompleteEditPart(request);
- View targetView = (View) targetEP.getModel();
+ INodeEditPart targetEditPart = getConnectionCompleteEditPart(request);
+ View targetView = (View) targetEditPart.getModel();
EObject target = ViewUtil.resolveSemanticElement(targetView);
if (target == null) {
target = targetView;
}
- if (targetEP == sourceEP) {
+ if (targetEditPart == sourceEP) {
return null;
}
- if (!(targetEP instanceof AbstractExecutionSpecificationEditPart
+ if (!(targetEditPart instanceof AbstractExecutionSpecificationEditPart
&& getHost() instanceof ExecutionSpecificationEndEditPart)) {
return null;
}
@@ -248,13 +248,16 @@ public class ExecutionSpecificationEndGraphicalNodeEditPolicy extends GraphicalN
if (false == ((IHintedType) UMLElementTypes.Message_SynchEdge).getSemanticHint().equals(((CreateConnectionViewRequest) request).getConnectionViewDescriptor().getSemanticHint())) {
return null;
}
- InteractionFragment ift = SequenceUtil.findInteractionFragmentContainerAt(request.getLocation(), getHost());
- EObject parentElement = ((AbstractExecutionSpecificationEditPart) targetEP).resolveSemanticElement();
- EObject element = ((ExecutionSpecificationEndEditPart) getHost()).resolveSemanticElement();
- boolean executionLinkedAlready = parentElement instanceof ExecutionSpecification && element instanceof MessageOccurrenceSpecification;
+
+ //find semantic container
+ InteractionFragment semanticContainer = SequenceUtil.findInteractionFragmentContainerAt(request.getLocation(), getHost());
+ EObject executionTarget = ((AbstractExecutionSpecificationEditPart) targetEditPart).resolveSemanticElement();
+ EObject executionEnd = ((ExecutionSpecificationEndEditPart) getHost()).resolveSemanticElement();
+ boolean executionLinkedAlready = executionTarget instanceof ExecutionSpecification && executionEnd instanceof MessageOccurrenceSpecification;
+
// Check if we go uphill
ConnectionAnchor sourceAnchor = getActualSourceConnectionAnchor(request);
- ConnectionAnchor targetAnchor = getSourceConnectionAnchor(targetEP, request);
+ ConnectionAnchor targetAnchor = getSourceConnectionAnchor(targetEditPart, request);
Point sourceLocation = sourceAnchor.getLocation(targetAnchor.getReferencePoint()).getCopy();
if (sourceEP instanceof GateEditPart) {
// Changing target for Gates changes anchor location - we're taking care of it
@@ -262,30 +265,30 @@ public class ExecutionSpecificationEndGraphicalNodeEditPolicy extends GraphicalN
sourceEP.getFigure().translateToAbsolute(gateBounds);
sourceLocation.y = gateBounds.y + gateBounds.height/2;
}
- Point targetLocation = targetEP.getFigure().getBounds().getTopLeft().getCopy();
- targetEP.getFigure().translateToAbsolute(targetLocation);
+ Point targetLocation = targetEditPart.getFigure().getBounds().getTopLeft().getCopy();
+ targetEditPart.getFigure().translateToAbsolute(targetLocation);
boolean messageGoUphill = targetLocation.y < sourceLocation.y;
if (!executionLinkedAlready && !messageGoUphill) {
return null;
}
CompositeCommand compound = new CompositeCommand(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER);
Point newExecutionLocation = targetLocation.getCopy();
- INodeEditPart targetLifelineEP = (INodeEditPart)targetEP.getParent();
+ INodeEditPart targetLifelineEP = (INodeEditPart)targetEditPart.getParent();
if (messageGoUphill) {
newExecutionLocation.y = sourceLocation.y;
// Calc resize amount
- org.eclipse.draw2d.geometry.Rectangle targetBounds = targetEP.getFigure().getBounds().getCopy();
- targetEP.getFigure().translateToAbsolute(targetBounds);
+ org.eclipse.draw2d.geometry.Rectangle targetBounds = targetEditPart.getFigure().getBounds().getCopy();
+ targetEditPart.getFigure().translateToAbsolute(targetBounds);
int resizeAmount = newExecutionLocation.y
- + LifelineXYLayoutEditPolicy.EXECUTION_INIT_HEIGHT + LifelineXYLayoutEditPolicy.SPACING_HEIGHT
+ + OLDLifelineXYLayoutEditPolicy.EXECUTION_INIT_HEIGHT + OLDLifelineXYLayoutEditPolicy.SPACING_HEIGHT
- targetBounds.bottom();
if (resizeAmount > 0) {
// Resize parent ES
ChangeBoundsRequest esRequest = new ChangeBoundsRequest(org.eclipse.gef.RequestConstants.REQ_MOVE);
- esRequest.setEditParts(targetEP);
+ esRequest.setEditParts(targetEditPart);
esRequest.setResizeDirection(PositionConstants.SOUTH);
esRequest.setSizeDelta(new Dimension(0, resizeAmount));
- Command moveESCommand = LifelineXYLayoutEditPolicy.getResizeOrMoveChildrenCommand((LifelineEditPart) targetLifelineEP, esRequest, false, false, true);
+ Command moveESCommand = OLDLifelineXYLayoutEditPolicy.getResizeOrMoveChildrenCommand((LifelineEditPart) targetLifelineEP, esRequest, false, false, true);
if (moveESCommand != null && !moveESCommand.canExecute()) {
// forbid creation of the message if the es can't be moved correctly
return UnexecutableCommand.INSTANCE;
@@ -294,13 +297,14 @@ public class ExecutionSpecificationEndGraphicalNodeEditPolicy extends GraphicalN
}
}
}
- EObject targetLifeline = ViewUtil.resolveSemanticElement((View) targetEP.getParent().getModel());
- CreateElementAndNodeCommand createExecutionSpecificationCommand = new CreateElementAndNodeCommand(getEditingDomain(), (ShapeNodeEditPart)targetLifelineEP, targetLifeline, elementType, newExecutionLocation);
- createExecutionSpecificationCommand.putCreateElementRequestParameter(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER, ift);
- compound.compose(createExecutionSpecificationCommand);
+ EObject targetLifeline = ViewUtil.resolveSemanticElement((View) targetEditPart.getParent().getModel());
+ //create a DestructionOccurence
+ //CreateElementAndNodeCommand createExecutionSpecificationCommand = new CreateElementAndNodeCommand(getEditingDomain(), (ShapeNodeEditPart)targetLifelineEP, semanticContainer, elementType, newExecutionLocation);
+ //createExecutionSpecificationCommand.putCreateElementRequestParameter(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.COVERED, targetLifeline);
+ //compound.compose(createExecutionSpecificationCommand);
// put the anchor at the top of the figure
- ChangeEdgeTargetCommand changeTargetCommand = new ChangeEdgeTargetCommand(getEditingDomain(), createExecutionSpecificationCommand, viewRequest.getConnectionViewDescriptor(), "(0.5, 0.0)");
- compound.compose(changeTargetCommand);
+ //ChangeEdgeTargetCommand changeTargetCommand = new ChangeEdgeTargetCommand(getEditingDomain(), createExecutionSpecificationCommand, viewRequest.getConnectionViewDescriptor(), "(0.5, 0.0)");
+ //compound.compose(changeTargetCommand);
return new ICommandProxy(compound);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GatesHolderGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GatesHolderGraphicalNodeEditPolicy.java
index 17b5890f5d9..b1b0c3fc0fa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GatesHolderGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GatesHolderGraphicalNodeEditPolicy.java
@@ -75,10 +75,10 @@ import org.eclipse.uml2.uml.Message;
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=389531
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class GatesHolderGraphicalNodeEditPolicy extends SequenceGraphicalNodeEditPolicy {
+public class GatesHolderGraphicalNodeEditPolicy extends OLDSequenceGraphicalNodeEditPolicy {
/**
- * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy#getReconnectSourceCommand(org.eclipse.gef.requests.ReconnectRequest)
+ * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDSequenceGraphicalNodeEditPolicy#getReconnectSourceCommand(org.eclipse.gef.requests.ReconnectRequest)
*
* @param request
* @return
@@ -120,7 +120,7 @@ public class GatesHolderGraphicalNodeEditPolicy extends SequenceGraphicalNodeEdi
}
/**
- * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy#getReconnectTargetCommand(org.eclipse.gef.requests.ReconnectRequest)
+ * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDSequenceGraphicalNodeEditPolicy#getReconnectTargetCommand(org.eclipse.gef.requests.ReconnectRequest)
*
* @param request
* @return
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/HighlightEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/HighlightEditPolicy.java
index b7714cf1d4d..a1bf9ad7f2a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/HighlightEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/HighlightEditPolicy.java
@@ -13,6 +13,7 @@ import org.eclipse.draw2d.PolylineConnection;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
@@ -23,11 +24,14 @@ import org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy;
import org.eclipse.gef.requests.CreateConnectionRequest;
import org.eclipse.gef.requests.GroupRequest;
import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gef.requests.TargetRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEndEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.figures.EllipseDecoration;
@@ -65,6 +69,9 @@ public class HighlightEditPolicy extends GraphicalEditPolicy {
}
if (editPolicy != null) {
EditPart targetEditPart = ((CreateConnectionRequest) request).getTargetEditPart();
+ if( targetEditPart instanceof InteractionEditPart){
+ System.err.println();
+ }
boolean canExecute = targetEditPart != null;
if (targetEditPart != null) {
Command command = targetEditPart.getCommand(request);
@@ -141,6 +148,10 @@ public class HighlightEditPolicy extends GraphicalEditPolicy {
highlight((EditPart) object);
}
} else if (request instanceof CreateConnectionRequest) {
+ if( request instanceof CreateConnectionRequest){
+ Rectangle ptOnScreen=new Rectangle(((CreateConnectionRequest)request).getLocation(), new Dimension());
+ ((CreateConnectionRequest)request).setLocation(ptOnScreen.getTopLeft());
+ }
CreateConnectionRequest req = (CreateConnectionRequest) request;
EditPart sourceEditPart = req.getSourceEditPart();
EditPart targetEditPart = req.getTargetEditPart();
@@ -265,7 +276,7 @@ public class HighlightEditPolicy extends GraphicalEditPolicy {
*/
private void highlightEventsAboutConstraints(Request request) {
Object locTop = request.getExtendedData().get(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION);
- Object topEvents = request.getExtendedData().get(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
+ Object topEvents = request.getExtendedData().get(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
if (locTop instanceof Point && topEvents != null && topEvents instanceof Collection<?> && !((Collection<?>) topEvents).isEmpty()) {
Point referenceTop = ((Point) locTop).getCopy();
OccurrenceSpecification event = (OccurrenceSpecification) ((Collection<?>) topEvents).iterator().next();
@@ -408,6 +419,7 @@ public class HighlightEditPolicy extends GraphicalEditPolicy {
@Override
public void eraseTargetFeedback(Request request) {
+
unhighlight();
safeRemoveFeedback(sourceIndicator);
sourceIndicator = null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCompartmentXYLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCompartmentXYLayoutEditPolicy.java
index 59ef3604909..d86afe17953 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCompartmentXYLayoutEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCompartmentXYLayoutEditPolicy.java
@@ -70,8 +70,8 @@ import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifie
import org.eclipse.papyrus.uml.diagram.common.commands.PreserveAnchorsPositionCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomInteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OldCustomInteractionEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
@@ -133,7 +133,7 @@ public class InteractionCompartmentXYLayoutEditPolicy extends XYLayoutEditPolicy
// Adjust excessive vertical resizing
if (child instanceof LifelineEditPart && hasCreateLink && request.getMoveDelta().y > 0) {
int oldHeight = child.getFigure().getBounds().height;
- int oldMinimumHeight = ((CustomLifelineEditPart)child).getMinimumHeight(-1);
+ int oldMinimumHeight = ((OLDLifelineEditPart)child).getMinimumHeight(-1);
int requestHeight = oldHeight + request.getMoveDelta().y;
int newMinimumHeight = oldMinimumHeight + request.getMoveDelta().y;
int newHeight = Math.max(oldHeight, newMinimumHeight);
@@ -172,7 +172,7 @@ public class InteractionCompartmentXYLayoutEditPolicy extends XYLayoutEditPolicy
compoundCmd.add(changeConstraintCommand);
// Update heights of all the lifelines
if (child instanceof LifelineEditPart && changeConstraintCommand != null && request.getMoveDelta().y != 0) {
- CustomInteractionEditPart hostParent = (CustomInteractionEditPart)getHost().getParent();
+ OldCustomInteractionEditPart hostParent = (OldCustomInteractionEditPart)getHost().getParent();
Command commandUpdateLifelines = hostParent.getUpdateLifelinesHeightsCommand(null);
compoundCmd.add(commandUpdateLifelines);
}
@@ -414,7 +414,7 @@ public class InteractionCompartmentXYLayoutEditPolicy extends XYLayoutEditPolicy
ChangeBoundsRequest esRequest = new ChangeBoundsRequest(org.eclipse.gef.RequestConstants.REQ_MOVE);
esRequest.setEditParts(sep);
esRequest.setMoveDelta(moveDelta);
- Command moveESCommand = LifelineXYLayoutEditPolicy.getResizeOrMoveChildrenCommand((LifelineEditPart) parentEP, esRequest, true, false, true);
+ Command moveESCommand = OLDLifelineXYLayoutEditPolicy.getResizeOrMoveChildrenCommand((LifelineEditPart) parentEP, esRequest, true, false, true);
if (moveESCommand != null && !moveESCommand.canExecute()) {
// forbid move if the es can't be moved correctly
return UnexecutableCommand.INSTANCE;
@@ -733,7 +733,7 @@ public class InteractionCompartmentXYLayoutEditPolicy extends XYLayoutEditPolicy
// SetBounds command modifying the sizeDelta
compoundCmd.add(getSetBoundsCommand(lifelineEP, cbr, newSizeDelta));
// PreserveAnchors command
- compoundCmd.add(new ICommandProxy(new CustomLifelineEditPart.PreserveAnchorsPositionCommandEx(lifelineEP, newSizeDelta, preserveY, lifelineEP.getPrimaryShape().getFigureLifelineDotLineFigure(), resizeDirection)));
+ compoundCmd.add(new ICommandProxy(new OLDLifelineEditPart.PreserveAnchorsPositionCommandEx(lifelineEP, newSizeDelta, preserveY, lifelineEP.getPrimaryShape().getFigureLifelineDotLineFigure(), resizeDirection)));
}
}
if (compoundCmd.size() == 0) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionGraphicalNodeEditPolicy.java
index ca5e10c465b..11480485742 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionGraphicalNodeEditPolicy.java
@@ -84,7 +84,7 @@ public class InteractionGraphicalNodeEditPolicy extends GatesHolderGraphicalNode
}
/**
- * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy#getTargetEditPart(org.eclipse.gef.Request)
+ * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDSequenceGraphicalNodeEditPolicy#getTargetEditPart(org.eclipse.gef.Request)
*
* @param request
* @return
@@ -115,7 +115,7 @@ public class InteractionGraphicalNodeEditPolicy extends GatesHolderGraphicalNode
}
/**
- * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy#getConnectionCompleteCommand(org.eclipse.gef.requests.CreateConnectionRequest)
+ * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDSequenceGraphicalNodeEditPolicy#getConnectionCompleteCommand(org.eclipse.gef.requests.CreateConnectionRequest)
*
* @param request
* @return
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionHeadImpactLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionHeadImpactLayoutEditPolicy.java
index 9d51bf17a2c..c8a9dc107fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionHeadImpactLayoutEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionHeadImpactLayoutEditPolicy.java
@@ -54,7 +54,7 @@ public class InteractionHeadImpactLayoutEditPolicy extends AbstractHeadImpactLay
protected int getHeadHeight() {
IFigure primaryShape = getPrimaryShape();
if (primaryShape instanceof StereotypeInteractionFigure) {
- IFigure headContainer = ((StereotypeInteractionFigure) primaryShape).getHeaderLabel().getParent();
+ IFigure headContainer = ((StereotypeInteractionFigure) primaryShape).getNameLabel().getParent();
Rectangle boundsRect = getBoundsRect();
return headContainer.getPreferredSize(boundsRect.width, -1).height;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandDragDropEditPolicy.java
index 3b28af3563e..45056f6a02a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandDragDropEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandDragDropEditPolicy.java
@@ -40,26 +40,27 @@ public class InteractionOperandDragDropEditPolicy extends ResizableEditPolicy {
*/
@Override
protected Command getResizeCommand(ChangeBoundsRequest request) {
- boolean isVertResize = (request.getResizeDirection() & PositionConstants.NORTH_SOUTH) != 0;
- boolean isHorResize = (request.getResizeDirection() & PositionConstants.EAST_WEST) != 0;
- boolean isNorthResize = (request.getResizeDirection() & PositionConstants.NORTH) != 0;
- boolean isSouthResize = (request.getResizeDirection() & PositionConstants.SOUTH) != 0;
- if (isHorResize && !isVertResize) {
- EditPart parent = getHost().getParent().getParent();
- return parent.getCommand(request);
- } else if (isVertResize) {
- if (this.getHost() instanceof InteractionOperandEditPart && this.getHost().getParent() instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
- InteractionOperandEditPart currentIOEP = (InteractionOperandEditPart) this.getHost();
- CombinedFragmentCombinedFragmentCompartmentEditPart compartEP = (CombinedFragmentCombinedFragmentCompartmentEditPart) this.getHost().getParent();
- // if the OP's border same as/linked to the CF's border
- if (this.getHost() == OperandBoundsComputeHelper.findFirstIOEP(compartEP) && isNorthResize
- || this.getHost() == OperandBoundsComputeHelper.findLastIOEP(compartEP) && isSouthResize) {
- return getHost().getParent().getParent().getCommand(request);
- } else {
- return OperandBoundsComputeHelper.createIOEPResizeCommand(currentIOEP, request, compartEP);
- }
- }
- }
- return null;
+ Command cmd= super.getResizeCommand(request);
+// boolean isVertResize = (request.getResizeDirection() & PositionConstants.NORTH_SOUTH) != 0;
+// boolean isHorResize = (request.getResizeDirection() & PositionConstants.EAST_WEST) != 0;
+// boolean isNorthResize = (request.getResizeDirection() & PositionConstants.NORTH) != 0;
+// boolean isSouthResize = (request.getResizeDirection() & PositionConstants.SOUTH) != 0;
+// if (isHorResize && !isVertResize) {
+// EditPart parent = getHost().getParent().getParent();
+// return parent.getCommand(request);
+// } else if (isVertResize) {
+// if (this.getHost() instanceof InteractionOperandEditPart && this.getHost().getParent() instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
+// InteractionOperandEditPart currentIOEP = (InteractionOperandEditPart) this.getHost();
+// CombinedFragmentCombinedFragmentCompartmentEditPart compartEP = (CombinedFragmentCombinedFragmentCompartmentEditPart) this.getHost().getParent();
+// // if the OP's border same as/linked to the CF's border
+// if (this.getHost() == OperandBoundsComputeHelper.findFirstIOEP(compartEP) && isNorthResize
+// || this.getHost() == OperandBoundsComputeHelper.findLastIOEP(compartEP) && isSouthResize) {
+// return getHost().getParent().getParent().getCommand(request);
+// } else {
+// return OperandBoundsComputeHelper.createIOEPResizeCommand(currentIOEP, request, compartEP);
+// }
+// }
+// }
+ return cmd;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifeLineAffixedNodesCreationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifeLineAffixedNodesCreationEditPolicy.java
new file mode 100644
index 00000000000..fb7ae58c39b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifeLineAffixedNodesCreationEditPolicy.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.edit.policies;
+
+import java.util.Map;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.DestructionEventFigure;
+import org.eclipse.papyrus.uml.diagram.sequence.locator.CenterLocator;
+import org.eclipse.papyrus.uml.service.types.element.UMLDIElementTypes;
+
+/**
+ * This class place element for the border item of the lifeline
+ * @since 3.0
+ *
+ */
+public class LifeLineAffixedNodesCreationEditPolicy extends DefaultCreationEditPolicy {
+
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getSetBoundsCommand(CreateViewRequest request, CreateViewRequest.ViewDescriptor descriptor) {
+ ICommand setBoundsCommand = null;
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ // Retrieve parent location
+ Point parentLoc = getHostFigure().getBounds().getLocation().getCopy();
+ final Point realWantedLocation;
+ Map<?, ?> params = request.getExtendedData();
+ Point realLocation = (Point) params.get(AspectUnspecifiedTypeCreationTool.INITIAL_MOUSE_LOCATION_FOR_CREATION);
+ if (realLocation != null) {
+ realWantedLocation = realLocation.getCopy();
+ } else {
+ // we use this location to be able to create Port in the corners of the figure
+ realWantedLocation = request.getLocation().getCopy();
+ }
+ // Compute relative creation location
+ Point requestedLocation = realWantedLocation.getCopy();
+
+ //The position of the node must be relation form its container
+ requestedLocation.translate(parentLoc.negate());
+ //In the case of the destruction event we contsider the center as the origin.
+ if( descriptor.getSemanticHint().equals(UMLDIElementTypes.DESTRUCTION_OCCURRENCE_SPECIFICATION_SHAPE.getSemanticHint())){
+ DestructionEventFigure destructionEventFigure= new DestructionEventFigure();
+ requestedLocation.y=requestedLocation.y-destructionEventFigure.getDefaultSize().height/2;
+ }
+
+ setBoundsCommand = new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, descriptor, requestedLocation);
+
+ return setBoundsCommand;
+ }
+
+ protected CenterLocator getPositionLocator() {
+ return new CenterLocator(getHostFigure(), PositionConstants.NONE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected IFigure getHostFigure() {
+ return ((GraphicalEditPart) getHost()).getFigure();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineAppliedStereotypeNodeLabelDisplayEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineAppliedStereotypeNodeLabelDisplayEditPolicy.java
index ca60bb99f83..47e38d7935e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineAppliedStereotypeNodeLabelDisplayEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineAppliedStereotypeNodeLabelDisplayEditPolicy.java
@@ -13,7 +13,7 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpolicies.AppliedStereotypeLabelEditPolicy;
/**
@@ -31,8 +31,8 @@ public class LifelineAppliedStereotypeNodeLabelDisplayEditPolicy extends Applied
@Override
public void refreshStereotypeDisplay() {
super.refreshStereotypeDisplay();
- if (getHost() instanceof CustomLifelineEditPart) {
- ((CustomLifelineEditPart) getHost()).updateLifelinePosition();
+ if (getHost() instanceof OLDLifelineEditPart) {
+ ((OLDLifelineEditPart) getHost()).updateLifelinePosition();
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java
index b33f15b8979..91f663048f0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java
@@ -45,7 +45,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.command.CreateGateViewCommand;
import org.eclipse.papyrus.uml.diagram.sequence.draw2d.routers.MessageRouter;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
@@ -64,13 +64,13 @@ import org.eclipse.uml2.uml.MessageEnd;
/**
* A specific policy to handle :
- * - Message aspects inherited from {@link SequenceGraphicalNodeEditPolicy}.
+ * - Message aspects inherited from {@link OLDSequenceGraphicalNodeEditPolicy}.
* - Time/duration move when a message end or an execution is moved.
* - Duration constraint/observation creation feedback.
* - Creation of general ordering links.
* This edit policy is intended to be installed on parts which represent a lifeline or which are contained within a lifeline part.
*/
-public class LifelineChildGraphicalNodeEditPolicy extends SequenceGraphicalNodeEditPolicy {
+public class LifelineChildGraphicalNodeEditPolicy extends OLDSequenceGraphicalNodeEditPolicy {
/** the feedback for creating a duration constraint node */
private Polyline durationCreationFeedback = null;
@@ -149,7 +149,7 @@ public class LifelineChildGraphicalNodeEditPolicy extends SequenceGraphicalNodeE
/**
* Get the command to reconnect the source and move associated time/duration constraints/observation.
*
- * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy#getReconnectSourceCommand(org.eclipse.gef.requests.ReconnectRequest)
+ * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDSequenceGraphicalNodeEditPolicy#getReconnectSourceCommand(org.eclipse.gef.requests.ReconnectRequest)
*
* @param request
* the reconnection request
@@ -162,7 +162,7 @@ public class LifelineChildGraphicalNodeEditPolicy extends SequenceGraphicalNodeE
command = OccurrenceSpecificationMoveHelper.completeReconnectConnectionCommand(command, request, getConnectableEditPart());
if (request.getConnectionEditPart() instanceof MessageCreateEditPart && request.getTarget() instanceof LifelineEditPart) {
LifelineEditPart newSource = (LifelineEditPart) request.getTarget();
- CustomLifelineEditPart target = (CustomLifelineEditPart) request.getConnectionEditPart().getTarget();
+ OLDLifelineEditPart target = (OLDLifelineEditPart) request.getConnectionEditPart().getTarget();
command = LifelineMessageCreateHelper.moveLifelineDown(command, target, newSource.getFigure().getBounds().getLocation().getCopy());
}
}
@@ -172,7 +172,7 @@ public class LifelineChildGraphicalNodeEditPolicy extends SequenceGraphicalNodeE
/**
* Get the command to reconnect the target and move associated time/duration constraints/observation.
*
- * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy#getReconnectTargetCommand(org.eclipse.gef.requests.ReconnectRequest)
+ * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDSequenceGraphicalNodeEditPolicy#getReconnectTargetCommand(org.eclipse.gef.requests.ReconnectRequest)
*
* @param request
* the reconnection request
@@ -187,7 +187,7 @@ public class LifelineChildGraphicalNodeEditPolicy extends SequenceGraphicalNodeE
command = LifelineMessageCreateHelper.reconnectMessageCreateTarget(request, command);
}
if (request.getConnectionEditPart() instanceof MessageDeleteEditPart && request.getTarget() instanceof LifelineEditPart) {
- command = LifelineMessageDeleteHelper.getReconnectMessageDeleteTargetCommand(request, command);
+ // command = LifelineMessageDeleteHelper.getReconnectMessageDeleteTargetCommand(request, command);
}
}
return command;
@@ -260,7 +260,7 @@ public class LifelineChildGraphicalNodeEditPolicy extends SequenceGraphicalNodeE
}
/**
- * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy#getConnectionCompleteCommand(org.eclipse.gef.requests.CreateConnectionRequest)
+ * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDSequenceGraphicalNodeEditPolicy#getConnectionCompleteCommand(org.eclipse.gef.requests.CreateConnectionRequest)
*
* @param request
* @return
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineHeadImpactLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineHeadImpactLayoutEditPolicy.java
index 2fcbac9650c..8ac32fae40d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineHeadImpactLayoutEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineHeadImpactLayoutEditPolicy.java
@@ -16,8 +16,8 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
import org.eclipse.draw2d.RectangleFigure;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart.CustomLifelineFigure;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart.CustomLifelineFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineHeadUtil;
@@ -29,7 +29,7 @@ public class LifelineHeadImpactLayoutEditPolicy extends AbstractHeadImpactLayout
@Override
protected int getHeadHeight() {
- CustomLifelineFigure primaryShape = ((CustomLifelineEditPart) getHost()).getPrimaryShape();
+ CustomLifelineFigure primaryShape = ((OLDLifelineEditPart) getHost()).getPrimaryShape();
RectangleFigure figure = primaryShape.getFigureLifelineNameContainerFigure();
Rectangle r = getBoundsRect();
Dimension preferredSize = figure.getPreferredSize(r.width, -1);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineSelectionEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineSelectionEditPolicy.java
index 9c69de10cf4..0ecdac5f885 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineSelectionEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineSelectionEditPolicy.java
@@ -27,7 +27,7 @@ import org.eclipse.gef.tools.ResizeTracker;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableEditPolicyEx;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineFigure;
@@ -94,9 +94,9 @@ public class LifelineSelectionEditPolicy extends ResizableEditPolicyEx {
boolean skipMinSize = false;
// Only enable horizontal dragging on lifelines(except lifelines that are result of a create message).
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=364688
- if (this.getHost() instanceof CustomLifelineEditPart) {
+ if (this.getHost() instanceof OLDLifelineEditPart) {
skipMinSize = true;
- CustomLifelineEditPart lifelineEP = (CustomLifelineEditPart) this.getHost();
+ OLDLifelineEditPart lifelineEP = (OLDLifelineEditPart) this.getHost();
if (!SequenceUtil.isCreateMessageEndLifeline(lifelineEP)) {
request.getMoveDelta().y = 0;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionEventComponentEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDDestructionEventComponentEditPolicy.java
index 906d3451887..c78ec6b4dc8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionEventComponentEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDDestructionEventComponentEditPolicy.java
@@ -24,7 +24,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
/**
* This edit policy also deletes time/duration edit parts which are linked with the deleted edit part.
*/
-public class DestructionEventComponentEditPolicy extends ComponentEditPolicy {
+public class OLDDestructionEventComponentEditPolicy extends ComponentEditPolicy {
/**
* {@inheritDoc}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifeLineLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifeLineLayoutEditPolicy.java
new file mode 100644
index 00000000000..6c017c4a732
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifeLineLayoutEditPolicy.java
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.edit.policies;
+
+import java.util.Map;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest.ViewAndElementDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.DestructionEventFigure;
+import org.eclipse.papyrus.uml.service.types.element.UMLDIElementTypes;
+import org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant;
+
+/**
+ *
+ * This class is manage border item and element inside Lifeline
+ * @since 3.0
+ *
+ */
+public class OLDLifeLineLayoutEditPolicy extends DefaultCreationEditPolicy {
+
+
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy#getCreateElementAndViewCommand(org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected Command getCreateElementAndViewCommand(CreateViewAndElementRequest request) {
+ ViewAndElementDescriptor descriptor=request.getViewAndElementDescriptor();
+ if (UMLDIElementTypes.ACTION_EXECUTION_SPECIFICATION_SHAPE.getSemanticHint().equals(descriptor.getSemanticHint())){
+ // get the element descriptor
+ CreateElementRequestAdapter requestAdapter =
+ request.getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // get the semantic request
+ CreateElementRequest createElementRequest =
+ (CreateElementRequest) requestAdapter.getAdapter(
+ CreateElementRequest.class);
+ View view = (View)getHost().getModel();
+ EObject hostElement = ViewUtil.resolveSemanticElement(view);
+ createElementRequest.setContainer(hostElement.eContainer());
+ createElementRequest.setParameter(SequenceRequestConstant.COVERED, hostElement);
+
+ }
+ return super.getCreateElementAndViewCommand(request);
+ }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getSetBoundsCommand(CreateViewRequest request, CreateViewRequest.ViewDescriptor descriptor) {
+ ICommand setBoundsCommand = null;
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ // Retrieve parent location
+ if( descriptor.getSemanticHint().equals(UMLDIElementTypes.DESTRUCTION_OCCURRENCE_SPECIFICATION_SHAPE.getSemanticHint())){
+ Point parentLoc = getHostFigure().getBounds().getLocation().getCopy();
+ final Point realWantedLocation;
+ Map<?, ?> params = request.getExtendedData();
+ Point realLocation = (Point) params.get(AspectUnspecifiedTypeCreationTool.INITIAL_MOUSE_LOCATION_FOR_CREATION);
+ if (realLocation != null) {
+ realWantedLocation = realLocation.getCopy();
+ } else {
+ // we use this location to be able to create Port in the corners of the figure
+ realWantedLocation = request.getLocation().getCopy();
+ }
+ // Compute relative creation location
+ Point requestedLocation = realWantedLocation.getCopy();
+
+ //The position of the node must be relation form its container
+ requestedLocation.translate(parentLoc.negate());
+ //In the case of the destruction event we contsider the center as the origin.
+
+ DestructionEventFigure destructionEventFigure= new DestructionEventFigure();
+ requestedLocation.y=requestedLocation.y-destructionEventFigure.getDefaultSize().height/2;
+ setBoundsCommand = new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, descriptor, requestedLocation);
+ }
+ else{
+ super.getSetBoundsCommand(request, descriptor);
+ }
+
+
+
+ return setBoundsCommand;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected IFigure getHostFigure() {
+ return ((GraphicalEditPart) getHost()).getFigure();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineCreationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifelineCreationEditPolicy.java
index ee9afca5ce2..0df5a6cd274 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineCreationEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifelineCreationEditPolicy.java
@@ -54,22 +54,22 @@ import org.eclipse.uml2.uml.OccurrenceSpecification;
*
* Occurrence Specification is located on the lifeline, but not visible. Though, elements must be created on it.
*/
-public class LifelineCreationEditPolicy extends CreationEditPolicy {
+public class OLDLifelineCreationEditPolicy extends CreationEditPolicy {
@Override
protected Command getCreateElementAndViewCommand(CreateViewAndElementRequest request) {
// get the element descriptor
CreateElementRequestAdapter requestAdapter = request.getViewAndElementDescriptor().getCreateElementRequestAdapter();
// get the semantic request
+ View view = (View) getHost().getModel();
+ EObject hostElement = ViewUtil.resolveSemanticElement(view);
+ if (hostElement == null && view.getElement() == null) {
+ hostElement = view;
+ }
+
CreateElementRequest createElementRequest = (CreateElementRequest) requestAdapter.getAdapter(CreateElementRequest.class);
if (createElementRequest.getContainer() == null) {
// complete the semantic request by filling in the host's semantic
- // element as the context
- View view = (View) getHost().getModel();
- EObject hostElement = ViewUtil.resolveSemanticElement(view);
- if (hostElement == null && view.getElement() == null) {
- hostElement = view;
- }
// Returns null if host is unresolvable so that trying to create a
// new element in an unresolved shape will not be allowed.
if (hostElement == null) {
@@ -80,6 +80,9 @@ public class LifelineCreationEditPolicy extends CreationEditPolicy {
InteractionFragment ift = SequenceUtil.findInteractionFragmentContainerAt(request.getLocation(), getHost());
Map<String, Object> extendedData = request.getExtendedData();
extendedData.put(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER, ift);
+ extendedData.put(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.COVERED, hostElement);
+
+ createElementRequest.setContainer(ift);
// record the nearest event if necessary
String requestHint = request.getViewAndElementDescriptor().getSemanticHint();
if (isCreatedOnOccurrenceSpecification(requestHint)) {
@@ -96,7 +99,7 @@ public class LifelineCreationEditPolicy extends CreationEditPolicy {
if (extendedData.containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2)) {
extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2, events);
} else {
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
+ extendedData.put(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
}
if (extendedData.containsKey(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2)) {
extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2, location);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineXYLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifelineXYLayoutEditPolicy.java
index 86ddf4c8b14..aed8529a428 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineXYLayoutEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDLifelineXYLayoutEditPolicy.java
@@ -51,12 +51,12 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.commands.PreserveAnchorsPositionCommand;
import org.eclipse.papyrus.uml.diagram.common.draw2d.LifelineDotLineFigure;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomZOrderCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomDurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart.PreserveAnchorsPositionCommandEx;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart.PreserveAnchorsPositionCommandEx;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomStateInvariantEditPart.StateInvariantResizableEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
@@ -70,8 +70,9 @@ import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
/**
* The custom LayoutEditPolicy for LifelineEditPart.
+ * @deprecated will be removed in Oxygen
*/
-public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
+public class OLDLifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
/** Initialization width of Execution Specification. */
public final static int EXECUTION_INIT_WIDTH = 16;
@@ -113,8 +114,8 @@ public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
@Override
public EditPart getTargetEditPart(Request request) {
EditPart targetEditPart = super.getTargetEditPart(request);
- if (targetEditPart instanceof CustomLifelineEditPart) {
- CustomLifelineEditPart lifelineEditPart = (CustomLifelineEditPart) targetEditPart;
+ if (targetEditPart instanceof OLDLifelineEditPart) {
+ OLDLifelineEditPart lifelineEditPart = (OLDLifelineEditPart) targetEditPart;
if (lifelineEditPart.isInlineMode()) {
Point location = null;
if (request instanceof DropRequest) {
@@ -123,10 +124,10 @@ public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
if (location != null) {
List children = lifelineEditPart.getChildren();
for (Object object : children) {
- if (!(object instanceof CustomLifelineEditPart)) {
+ if (!(object instanceof OLDLifelineEditPart)) {
continue;
}
- CustomLifelineEditPart child = (CustomLifelineEditPart) object;
+ OLDLifelineEditPart child = (OLDLifelineEditPart) object;
IFigure figure = child.getFigure();
Point pt = location.getCopy();
figure.translateToRelative(pt);
@@ -159,9 +160,9 @@ public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
@Override
protected Command getCreateCommand(CreateRequest request) {
EditPart targetEditPart = getTargetEditPart(request);
- if (targetEditPart instanceof CustomLifelineEditPart && targetEditPart.getParent() instanceof CustomLifelineEditPart) {
+ if (targetEditPart instanceof OLDLifelineEditPart && targetEditPart.getParent() instanceof OLDLifelineEditPart) {
Point location = request.getLocation();
- IFigure figure = ((CustomLifelineEditPart) targetEditPart).getPrimaryShape();
+ IFigure figure = ((OLDLifelineEditPart) targetEditPart).getPrimaryShape();
Point pt = location.getCopy();
figure.translateToRelative(pt);
if (!figure.containsPoint(pt)) {
@@ -425,7 +426,7 @@ public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
// resize parent bar
if (parent != null) {
Rectangle newAdjustedBounds = newBounds.getCopy();
- newAdjustedBounds.height += LifelineXYLayoutEditPolicy.SPACING_HEIGHT;
+ newAdjustedBounds.height += OLDLifelineXYLayoutEditPolicy.SPACING_HEIGHT;
p = p.chain(resizeParentExecutionSpecification((LifelineEditPart) getHost(), parent, newAdjustedBounds, executionSpecificationList));
}
return p;
@@ -436,7 +437,7 @@ public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
childBounds.x = bounds.x;
childBounds.width = bounds.width;
Rectangle rect = bounds.getCopy();
- int spacingY = LifelineXYLayoutEditPolicy.SPACING_HEIGHT;
+ int spacingY = OLDLifelineXYLayoutEditPolicy.SPACING_HEIGHT;
if (childBounds.y - spacingY < rect.y) {
rect.height += rect.y - childBounds.y + spacingY;
rect.y = childBounds.y - spacingY;
@@ -537,7 +538,7 @@ public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
* @return the height defined in the create request or a default value depending on the created figure
*/
private int getFigureHeight(String semanticHint, Dimension size) {
- int newHeight;
+ int newHeight=10;
if (TIME_OBSERVATION_HINT.equals(semanticHint) || TIME_CONSTRAINT_HINT.equals(semanticHint)) {
// height for a time bar (takes precedence on request's size)
newHeight = TIME_BAR_HEIGHT;
@@ -644,7 +645,7 @@ public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
compoundCmd.setLabel("Move or resize");
compoundCmd.setDebugLabel("Debug: Move or resize of a Lifeline's children");
for (EditPart ep : editParts) {
- if (ep instanceof ActionExecutionSpecificationEditPart || ep instanceof BehaviorExecutionSpecificationEditPart) {
+ if (ep instanceof CCombinedCompartmentEditPart || ep instanceof BehaviorExecutionSpecificationEditPart) {
// an execution specification have been moved or resized
ShapeNodeEditPart executionSpecificationEP = (ShapeNodeEditPart) ep;
// Check if height is within the limits of the figure
@@ -716,7 +717,7 @@ public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
compoundCmd.add(SequenceUtil.createUpdateEnclosingInteractionCommand(executionSpecificationEP, request.getMoveDelta(), newSizeDelta));
}
// keep absolute position of anchors
- compoundCmd.add(new ICommandProxy(new CustomLifelineEditPart.PreserveAnchorsPositionCommandEx(executionSpecificationEP, new Dimension(realMoveDelta.width, realMoveDelta.height), PreserveAnchorsPositionCommand.PRESERVE_Y,
+ compoundCmd.add(new ICommandProxy(new OLDLifelineEditPart.PreserveAnchorsPositionCommandEx(executionSpecificationEP, new Dimension(realMoveDelta.width, realMoveDelta.height), PreserveAnchorsPositionCommand.PRESERVE_Y,
executionSpecificationEP.getFigure(), request.getResizeDirection())));
}
if (ep instanceof CombinedFragment2EditPart) {
@@ -740,7 +741,7 @@ public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
compoundCmd.add(new ICommandProxy(setBoundsCmd));
// keep absolute position of anchors
if (sizeDelta != null && sizeDelta.height != 0) {
- compoundCmd.add(new ICommandProxy(new CustomLifelineEditPart.PreserveAnchorsPositionCommandEx(cf2EP, new Dimension(0, sizeDelta.height), PreserveAnchorsPositionCommand.PRESERVE_Y, cf2EP.getPrimaryShape().getCentralVerticalLine(),
+ compoundCmd.add(new ICommandProxy(new OLDLifelineEditPart.PreserveAnchorsPositionCommandEx(cf2EP, new Dimension(0, sizeDelta.height), PreserveAnchorsPositionCommand.PRESERVE_Y, cf2EP.getPrimaryShape().getCentralVerticalLine(),
request.getResizeDirection())));
}
}
@@ -772,7 +773,7 @@ public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
Rectangle rectLifeline = lifelineEP.getFigure().getBounds() .getCopy();
Dimension zoomedAddon = new Dimension(0, DESTRUCTION_INIT_SIZE/2);
lifelineEP.getFigure().translateToRelative(zoomedAddon);
- int minimumHeight = ((CustomLifelineEditPart)lifelineEP).getMinimumHeight(-1, true) + zoomedAddon.height;
+ int minimumHeight = ((OLDLifelineEditPart)lifelineEP).getMinimumHeight(-1, true) + zoomedAddon.height;
newHeight = Math.max(newHeight, minimumHeight);
int heightDelta = newHeight - rectLifeline.height;
if (heightDelta == 0) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageConnectionEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDMessageConnectionEditPolicy.java
index 17209ff9e0c..9d3444de84b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageConnectionEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDMessageConnectionEditPolicy.java
@@ -25,7 +25,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
/**
* This edit policy also deletes time/duration edit parts which are linked with the deleted edit part.
*/
-public class MessageConnectionEditPolicy extends ConnectionEditPolicy {
+public class OLDMessageConnectionEditPolicy extends ConnectionEditPolicy {
@Override
protected Command createDeleteSemanticCommand(GroupRequest deleteRequest) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java
new file mode 100644
index 00000000000..7d1d663c339
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OLDSequenceGraphicalNodeEditPolicy.java
@@ -0,0 +1,710 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.ConnectionRouter;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Polyline;
+import org.eclipse.draw2d.Viewport;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.CreateConnectionRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.SetConnectionAnchorsCommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.internal.commands.SetConnectionBendpointsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest.ConnectionViewAndElementDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool.CreateAspectUnspecifiedTypeConnectionRequest;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomCombinedFragment2EditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionFragmentEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.sequence.util.FragmentsOrdererHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
+import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
+import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypesCommentLinkEditPart;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.OccurrenceSpecification;
+
+/**
+ * A specific policy to handle the message :
+ * - Message cannot be uphill.
+ * - Message Occurrence Specification which are created along the message may have a different container than the message.
+ * - Message feedback on creation is always drawn in black (to avoid invisible feedback)
+ *
+ */
+@SuppressWarnings({ "restriction", "unchecked", "rawtypes" })
+public class OLDSequenceGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
+
+ /** A static margin to allow drawing of straight message */
+ private static final int MARGIN = 2;
+
+ /**
+ * Gets the command to start the creation of a new connection and relationship. This will update the request appropriately. Also completes the
+ * request with nearby occurrence specification information.
+ *
+ * @param request
+ * creation request
+ * @return Command
+ */
+ @Override
+ protected Command getConnectionAndRelationshipCreateCommand(CreateConnectionViewAndElementRequest request) {
+ Map<String, Object> extendedData = request.getExtendedData();
+ // record the nearest event if necessary
+ String requestHint = request.getConnectionViewAndElementDescriptor().getSemanticHint();
+ if (isCreatedNearOccurrenceSpecification(requestHint) || isOnOccerrenceSpecification(request.getLocation())) {
+ LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(getHost());
+ if (lifelinePart != null) {
+ Entry<Point, List<OccurrenceSpecification>> eventAndLocation = SequenceUtil.findNearestEvent(request.getLocation(), lifelinePart);
+ // find an event near enough to create the constraint or observation
+ List<OccurrenceSpecification> events = Collections.emptyList();
+ Point location = null;
+ if (eventAndLocation != null) {
+ location = eventAndLocation.getKey();
+ events = eventAndLocation.getValue();
+ }
+ extendedData.put(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
+ extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION, location);
+ if (location != null) {
+ request.setLocation(location);
+ }
+ }
+ }
+ return super.getConnectionAndRelationshipCreateCommand(request);
+ }
+
+ private boolean isOnOccerrenceSpecification(Point location) {
+ EditPart editPart = getHost().getViewer().findObjectAt(location);
+ if (editPart == null) {
+ return false;
+ }
+ Object model = editPart.getModel();
+ if (model instanceof View) {
+ return (ViewUtil.resolveSemanticElement((View) model) instanceof OccurrenceSpecification);
+ }
+ return false;
+ }
+
+ /**
+ * Gets the command to complete the creation of a new connection and relationship. Also completes the request with nearby occurrence specification
+ * information.
+ *
+ * @param request
+ * the creation request
+ * @return Command
+ */
+ @Override
+ protected Command getConnectionAndRelationshipCompleteCommand(CreateConnectionViewAndElementRequest request) {
+ Map<String, Object> extendedData = request.getExtendedData();
+ // record the nearest event if necessary
+ String requestHint = request.getConnectionViewAndElementDescriptor().getSemanticHint();
+ if (isCreatedNearOccurrenceSpecification(requestHint) || isOnOccerrenceSpecification(request.getLocation())) {
+ LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(getHost());
+ if (lifelinePart != null) {
+ Entry<Point, List<OccurrenceSpecification>> eventAndLocation = SequenceUtil.findNearestEvent(request.getLocation(), lifelinePart);
+ // find an event near enough to create the constraint or observation
+ List<OccurrenceSpecification> events = Collections.emptyList();
+ Point location = null;
+ if (eventAndLocation != null) {
+ location = eventAndLocation.getKey();
+ events = eventAndLocation.getValue();
+ }
+ extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2, events);
+ extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2, location);
+ if (location != null) {
+ request.setLocation(location);
+ }
+ }
+ }
+ // Ordering message occurrence specifications after message creation, See https://bugs.eclipse.org/bugs/show_bug.cgi?id=403233
+ Command command = super.getConnectionAndRelationshipCompleteCommand(request);
+ if (command != null && command.canExecute()) {
+ command = command.chain(FragmentsOrdererHelper.createOrderingFragmentsCommand(getHost(), request));
+ }
+ return command;
+ }
+
+ /**
+ * Return true if creation must be performed to or from an occurrence specification
+ *
+ * @param requestHint
+ * the hint of object to create
+ * @return true if creation to or from an occurrence specification
+ */
+ private boolean isCreatedNearOccurrenceSpecification(String requestHint) {
+ String generalOrderingHint = ((IHintedType) UMLElementTypes.GeneralOrdering_Edge).getSemanticHint();
+ return generalOrderingHint.equals(requestHint);
+ }
+
+ /**
+ * Return true if a message is being created
+ *
+ * @param requestHint
+ * the hint of object to create
+ * @return true if creation of a message
+ */
+ protected boolean isMessageHint(String requestHint) {
+ List<String> messageHints = new ArrayList<String>(7);
+ String messageHint = ((IHintedType) UMLElementTypes.Message_SynchEdge).getSemanticHint();
+ messageHints.add(messageHint);
+ messageHint = ((IHintedType) UMLElementTypes.Message_AsynchEdge).getSemanticHint();
+ messageHints.add(messageHint);
+ messageHint = ((IHintedType) UMLElementTypes.Message_ReplyEdge).getSemanticHint();
+ messageHints.add(messageHint);
+ messageHint = ((IHintedType) UMLElementTypes.Message_CreateEdge).getSemanticHint();
+ messageHints.add(messageHint);
+ messageHint = ((IHintedType) UMLElementTypes.Message_DeleteEdge).getSemanticHint();
+ messageHints.add(messageHint);
+ messageHint = ((IHintedType) UMLElementTypes.Message_LostEdge).getSemanticHint();
+ messageHints.add(messageHint);
+ messageHint = ((IHintedType) UMLElementTypes.Message_FoundEdge).getSemanticHint();
+ messageHints.add(messageHint);
+ return messageHints.contains(requestHint);
+ }
+
+ @Override
+ protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
+ // move source point to the bottom if it is contained in LifelineNameContainerFigure
+ EditPart targetEditPart = request.getTargetEditPart();
+ if (targetEditPart != null && targetEditPart instanceof LifelineEditPart) {
+ LifelineEditPart target = (LifelineEditPart) targetEditPart;
+ if (target.getPrimaryShape() != null) {
+ Rectangle sourceBounds = target.getPrimaryShape().getFigureLifelineNameContainerFigure().getBounds().getCopy();
+ Point sourcePointCopy = request.getLocation().getCopy();
+ target.getFigure().translateToRelative(sourcePointCopy);
+ if (sourcePointCopy.y() < sourceBounds.getBottom().y()) {
+ target.getFigure().translateToAbsolute(sourceBounds);
+ request.getLocation().setY(sourceBounds.getBottom().y() + 1);
+ }
+ }
+ }
+ /**
+ * Sometime, the viewport would be scrolled when drag to select the target of connection by using AutoexposeHelper. We need to adjust the
+ * source
+ * location if needed.
+ */
+ PointEx sourcePoint = new PointEx(request.getLocation());
+ Viewport vp = findViewport((GraphicalEditPart) getHost().getViewer().getRootEditPart());
+ if (vp != null) {
+ Point loc1 = vp.getClientArea().getLocation().getCopy();
+ sourcePoint.setViewportLocation(loc1);
+ }
+ request.getExtendedData().put(SequenceRequestConstant.SOURCE_LOCATION_DATA, sourcePoint);
+ // Safely calculate the source model container here.
+ request.getExtendedData().put(SequenceRequestConstant.SOURCE_MODEL_CONTAINER, SequenceUtil.findInteractionFragmentContainerAt(sourcePoint, getHost()));
+ return super.getConnectionCreateCommand(request);
+ }
+
+ protected Viewport findViewport(GraphicalEditPart part) {
+ IFigure figure = null;
+ Viewport port = null;
+ do {
+ if (figure == null) {
+ figure = part.getContentPane();
+ } else {
+ figure = figure.getParent();
+ }
+ if (figure instanceof Viewport) {
+ port = (Viewport) figure;
+ break;
+ }
+ } while (figure != part.getFigure() && figure != null);
+ return port;
+ }
+
+ /**
+ * Overrides to disable uphill message
+ */
+ @Override
+ protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
+ Command command = super.getConnectionCompleteCommand(request);
+ if (command == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // disable the following code if we are not creating a message.
+ String requestHint = null;
+ if (request instanceof CreateConnectionViewRequest) {
+ requestHint = ((CreateConnectionViewRequest) request).getConnectionViewDescriptor().getSemanticHint();
+ if (!isMessageHint(requestHint)) {
+ return command;
+ }
+ }
+ // ICommandProxy proxy = (ICommandProxy)request.getStartCommand();
+ // CompositeCommand cc = (CompositeCommand)proxy.getICommand();
+ // Iterator<?> commandItr = cc.iterator();
+ // while(commandItr.hasNext()) {
+ // Object obj = commandItr.next();
+ // if(obj instanceof SetConnectionBendpointsCommand) {
+ // SetConnectionBendpointsCommand sbbCommand = (SetConnectionBendpointsCommand)obj;
+ // final PointList pointList = sbbCommand.getNewPointList();
+ Point sourcePoint = (Point) request.getExtendedData().get(SequenceRequestConstant.SOURCE_LOCATION_DATA);
+ Point targetPoint = request.getLocation();
+ // Adjust source location to current coordinate system (the viewport may be scrolled by AutoexposeHelper.).
+ if (sourcePoint instanceof PointEx) {
+ Viewport vp = findViewport((GraphicalEditPart) getHost().getViewer().getRootEditPart());
+ if (vp != null) {
+ Point loc2 = vp.getClientArea().getLocation();
+ sourcePoint = ((PointEx) sourcePoint).adjustToFitNewViewport(loc2);
+ }
+ }
+ // prevent uphill message (leave margin for horizontal messages)
+ boolean messageCreate = ((IHintedType) UMLElementTypes.Message_CreateEdge).getSemanticHint().equals(requestHint);
+ if (sourcePoint == null || sourcePoint.y >= targetPoint.y + MARGIN) {
+ if (!messageCreate && !isLostFoundMessage(requestHint)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ // prevent uphill message (for self recursive message)
+ if (request.getSourceEditPart().equals(request.getTargetEditPart()) && sourcePoint.y >= targetPoint.y) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // prevent uphill message (for reply message)
+ if (request instanceof CreateConnectionViewAndElementRequest) {
+ ConnectionViewAndElementDescriptor desc = ((CreateConnectionViewAndElementRequest) request).getConnectionViewAndElementDescriptor();
+ String replyHint = ((IHintedType) UMLElementTypes.Message_ReplyEdge).getSemanticHint();
+ if (replyHint.equals(desc.getSemanticHint()) && request.getSourceEditPart() instanceof IGraphicalEditPart) {
+ Rectangle srcBounds = SequenceUtil.getAbsoluteBounds((IGraphicalEditPart) request.getSourceEditPart());
+ int bottom = srcBounds.getBottom().y;
+ if (bottom >= targetPoint.y + MARGIN) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ }
+ // prevent duplicate create link
+ if (messageCreate && request.getSourceEditPart() != null && request.getTargetEditPart() != null) {
+ if (LifelineMessageCreateHelper.hasMessageCreate((GraphicalEditPart) request.getSourceEditPart(), request.getTargetEditPart())) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ // The SOURCE MODEL should be calculated when connection started, the scroll bar maybe already changed when connection come to finished.
+ // request.getExtendedData().put(SequenceRequestConstant.SOURCE_MODEL_CONTAINER, SequenceUtil.findInteractionFragmentContainerAt(sourcePoint, getHost()));
+ request.getExtendedData().put(SequenceRequestConstant.TARGET_MODEL_CONTAINER, SequenceUtil.findInteractionFragmentContainerAt(targetPoint, getHost()));
+ // In case we are creating a connection to/from a CoRegion, we will need the lifeline element where is drawn the CoRegion later in the process.
+ EditPart targetEditPart = getTargetEditPart(request);
+ if (targetEditPart instanceof CustomCombinedFragment2EditPart) {
+ request.getExtendedData().put(SequenceRequestConstant.LIFELINE_GRAPHICAL_CONTAINER, ((CustomCombinedFragment2EditPart) targetEditPart).getAttachedLifeline());
+ }
+ // update bendpoints for self link message.
+ if (connectionFeedback != null && ((IHintedType) UMLElementTypes.Message_AsynchEdge).getSemanticHint().equals(requestHint)) {
+ updateConnectionBendpoints(request, command);
+ }
+ // change constraint of the target lifeline after added a Create Message
+ if (request.getTargetEditPart() instanceof LifelineEditPart && !(request.getSourceEditPart().equals(request.getTargetEditPart()))) {
+ if (requestHint.equals((((IHintedType) UMLElementTypes.Message_CreateEdge).getSemanticHint()))) {
+ OLDLifelineEditPart target = (OLDLifelineEditPart) request.getTargetEditPart();
+ command = LifelineMessageCreateHelper.moveLifelineDown(command, target, sourcePoint.getCopy());
+ }
+ }
+ return command;
+ }
+
+ /**
+ * Update bendpoints when creating self message with the feedback, so that, the message can be created like feedback,
+ */
+ private void updateConnectionBendpoints(CreateConnectionRequest request, Command command) {
+ if (connectionFeedback == null || connectionFeedback.getPoints().size() < 4) {
+ return;
+ }
+ if (!(command instanceof ICommandProxy)) {
+ return;
+ }
+ ICommand iCommand = ((ICommandProxy) command).getICommand();
+ if (!(iCommand instanceof CompositeCommand)) {
+ return;
+ }
+ INodeEditPart targetEP = getConnectionCompleteEditPart(request);
+ if (targetEP == null) {
+ return;
+ }
+ LifelineEditPart sourceLifeline = getLifeline(request.getSourceEditPart());
+ LifelineEditPart targetLifeline = getLifeline(request.getTargetEditPart());
+ boolean isSelfLink = sourceLifeline != null && sourceLifeline.equals(targetLifeline);
+ if (!isSelfLink) {
+ return;
+ }
+ CompositeCommand cc = (CompositeCommand) iCommand;
+ SetConnectionAnchorsCommand scaCommand = null;
+ SetConnectionBendpointsCommand sbbCommand = null;
+ Iterator it = cc.iterator();
+ while (it.hasNext()) {
+ Object next = it.next();
+ if (next instanceof SetConnectionBendpointsCommand) {
+ sbbCommand = (SetConnectionBendpointsCommand) next;
+ } else if (next instanceof SetConnectionAnchorsCommand) {
+ scaCommand = (SetConnectionAnchorsCommand) next;
+ }
+ if (sbbCommand != null && scaCommand != null) {
+ break;
+ }
+ }
+ if (sbbCommand == null || scaCommand == null) {
+ return;
+ }
+ ConnectionAnchor targetAnchor = targetEP.getTargetConnectionAnchor(request);
+ INodeEditPart sourceEditPart = (INodeEditPart) request.getSourceEditPart();
+ ConnectionAnchor sourceAnchor = sourceEditPart.mapTerminalToConnectionAnchor(scaCommand.getNewSourceTerminal());
+ PointList pointList = connectionFeedback.getPoints().getCopy();
+ connectionFeedback.translateToAbsolute(pointList);
+ sbbCommand.setNewPointList(pointList, sourceAnchor.getReferencePoint(), targetAnchor.getReferencePoint());
+ }
+
+ private LifelineEditPart getLifeline(EditPart editPart) {
+ if (editPart == null) {
+ return null;
+ }
+ if (editPart instanceof LifelineEditPart) {
+ return (LifelineEditPart) editPart;
+ }
+ return getLifeline(editPart.getParent());
+ }
+
+ /**
+ * Override to disable uphill message
+ */
+ @Override
+ protected Command getReconnectSourceCommand(ReconnectRequest request) {
+ if (isUphillMessage(request) && !isLostFoundMessage(request)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // prevent duplicate link
+ if (request.getConnectionEditPart() instanceof MessageCreateEditPart && request.getTarget() != null && !LifelineMessageCreateHelper.canReconnectMessageCreate(request)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Avoid to reconnect AppliedStereotypesCommentLink to another EditPart.
+ ConnectionEditPart connection = request.getConnectionEditPart();
+ if (connection instanceof AppliedStereotypesCommentLinkEditPart) {
+ if (connection.getSource() != getConnectableEditPart()) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ Command command = super.getReconnectSourceCommand(request);
+ // //Ordering message occurrence specifications after message reconnected, See https://bugs.eclipse.org/bugs/show_bug.cgi?id=403233
+ if (command != null && command.canExecute()) {
+ command = command.chain(FragmentsOrdererHelper.createOrderingFragmentsCommand(getHost(), request));
+ }
+ return command;
+ }
+
+ private boolean isLostFoundMessage(ReconnectRequest request) {
+ ConnectionEditPart connectionEditPart = request.getConnectionEditPart();
+ if (connectionEditPart instanceof MessageFoundEditPart || connectionEditPart instanceof MessageLostEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ private boolean isLostFoundMessage(String requestHint) {
+ if (((IHintedType) UMLElementTypes.Message_LostEdge).getSemanticHint().equals(requestHint) || ((IHintedType) UMLElementTypes.Message_FoundEdge).getSemanticHint().equals(requestHint)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Override to disable uphill message
+ */
+ @Override
+ protected Command getReconnectTargetCommand(ReconnectRequest request) {
+ if (isUphillMessage(request) && !isLostFoundMessage(request)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // prevent duplicate link
+ if (request.getConnectionEditPart() instanceof MessageCreateEditPart && request.getTarget() != null && !LifelineMessageCreateHelper.canReconnectMessageCreate(request)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ Command command = super.getReconnectTargetCommand(request);
+ // Ordering message occurrence specifications after message reconnected, See https://bugs.eclipse.org/bugs/show_bug.cgi?id=403233
+ if (command != null && command.canExecute()) {
+ command = command.chain(FragmentsOrdererHelper.createOrderingFragmentsCommand(getHost(), request));
+ }
+ return command;
+ }
+
+ /**
+ * Check that a message doesn't have its target point above its source point
+ *
+ * @param request
+ * the ReconnectRequest
+ * @return true if the target point is above the source point
+ */
+ protected boolean isUphillMessage(ReconnectRequest request) {
+ ConnectionEditPart connectionEditPart = request.getConnectionEditPart();
+ if (connectionEditPart.getModel() instanceof Edge) {
+ Edge edge = (Edge) connectionEditPart.getModel();
+ if (edge.getElement() instanceof Message) {
+ if (connectionEditPart.getFigure() instanceof Polyline) {
+ // get connection end points translated to absolute
+ Polyline polyline = (Polyline) connectionEditPart.getFigure();
+ Point end = polyline.getEnd().getCopy();
+ Point start = polyline.getStart().getCopy();
+ polyline.getParent().translateToAbsolute(end);
+ polyline.getParent().translateToAbsolute(start);
+ // look at the request rather than at both polyline ends which may not be up to date
+ if (REQ_RECONNECT_SOURCE.equals(request.getType())) {
+ return request.getLocation().y >= end.y + MARGIN;
+ } else if (REQ_RECONNECT_TARGET.equals(request.getType())) {
+ return start.y >= request.getLocation().y + MARGIN;
+ } else {
+ return start.y >= end.y + MARGIN;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Overrides to set the color of the dummyConnection to color black.
+ * This allow to see the feedback of the connection when it is created.
+ * By default, the color was the foreground color of the lifeline, which is always blank leading to an invisible feedback.
+ *
+ */
+ @Override
+ protected Connection createDummyConnection(Request req) {
+ Connection conn = super.createDummyConnection(req);
+ conn.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);
+ return conn;
+ }
+
+ /**
+ * Gets a command that pops up a menu which allows the user to select which
+ * type of connection to be created and then creates the connection.
+ *
+ * @param content
+ * The list of items making up the content of the popup menu.
+ * @param request
+ * The relevant create connection request.
+ * @return the command to popup up the menu and create the connection
+ */
+ @Override
+ protected ICommand getPromptAndCreateConnectionCommand(List content, CreateConnectionRequest request) {
+ return new SequencePromptAndCreateConnectionCommand(content, request);
+ }
+
+ /**
+ * Extends {@link PromptAndCreateConnectionCommand} to specify the type of message that can be selected.
+ */
+ protected class SequencePromptAndCreateConnectionCommand extends PromptAndCreateConnectionCommand {
+
+ /**
+ * @see {@link PromptAndCreateConnectionCommand#PromptAndCreateConnectionCommand(List, CreateConnectionRequest)}
+ */
+ public SequencePromptAndCreateConnectionCommand(List content, CreateConnectionRequest request) {
+ super(content, request);
+ }
+
+ /**
+ * Defines a specific label provider to handle message.
+ */
+ @Override
+ protected ILabelProvider getLabelProvider() {
+ return new LabelProvider() {
+
+ @Override
+ public String getText(Object object) {
+ if (object instanceof IHintedType) {
+ IHintedType elementType = (IHintedType) object;
+ switch (UMLVisualIDRegistry.getVisualID(elementType.getSemanticHint())) {
+ case MessageSyncEditPart.VISUAL_ID:
+ return Messages.MessageSync1CreationTool_title;
+ case MessageAsyncEditPart.VISUAL_ID:
+ return Messages.MessageAsync2CreationTool_title;
+ case MessageReplyEditPart.VISUAL_ID:
+ return Messages.MessageReply3CreationTool_title;
+ case MessageCreateEditPart.VISUAL_ID:
+ return Messages.MessageCreate4CreationTool_title;
+ case MessageDeleteEditPart.VISUAL_ID:
+ return Messages.MessageDelete5CreationTool_title;
+ case MessageLostEditPart.VISUAL_ID:
+ return Messages.MessageLost6CreationTool_title;
+ case MessageFoundEditPart.VISUAL_ID:
+ return Messages.MessageFound7CreationTool_title;
+ }
+ }
+ return super.getText(object);
+ }
+ };
+ }
+ }
+
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+ if (REQ_CONNECTION_START.equals(request.getType()) || REQ_CONNECTION_END.equals(request.getType()) || REQ_RECONNECT_SOURCE.equals(request.getType()) || REQ_RECONNECT_TARGET.equals(request.getType())) {
+ EditPart host = getHost();
+ if (request instanceof CreateConnectionRequest) {
+ if (host instanceof InteractionEditPart) {
+ if (REQ_CONNECTION_END.equals(request.getType()) && isCreateConnectionRequest(request, UMLElementTypes.Message_LostEdge)) {
+ return host;
+ }
+ if (REQ_CONNECTION_START.equals(request.getType()) && isCreateConnectionRequest(request, UMLElementTypes.Message_FoundEdge)) {
+ return host;
+ }
+ InteractionEditPart interactionPart = (InteractionEditPart) host;
+ if (!touchesInteractionBounds(interactionPart, ((CreateConnectionRequest) request).getLocation())) {
+ return null;
+ }
+ } else if (host instanceof InteractionOperandEditPart) {
+ return null;
+ } else if (host instanceof InteractionFragmentEditPart) {
+ CreateConnectionRequest req = (CreateConnectionRequest) request;
+ Point location = req.getLocation().getCopy();
+ // if mouse location is far from border, do not handle connection event
+ if (!touchesInteractionBounds((GraphicalEditPart) host, location)) {
+ return null;
+ }
+ }
+ } else if (request instanceof ReconnectRequest) {
+ if (host instanceof InteractionEditPart) {
+ ConnectionEditPart conn = ((ReconnectRequest) request).getConnectionEditPart();
+ Object model = conn.getModel();
+ if (model instanceof View) {
+ if (REQ_RECONNECT_TARGET.equals(request.getType()) && UMLVisualIDRegistry.getVisualID((View) model).equals(MessageLostEditPart.VISUAL_ID)) {
+ return host;
+ }
+ if (REQ_RECONNECT_SOURCE.equals(request.getType()) && UMLVisualIDRegistry.getVisualID((View) model).equals(MessageFoundEditPart.VISUAL_ID)) {
+ return host;
+ }
+ }
+ InteractionEditPart interactionEditPart = (InteractionEditPart) getHost();
+ if (!touchesInteractionBounds(interactionEditPart, ((ReconnectRequest) request).getLocation())) {
+ return null;
+ }
+ } else if (host instanceof InteractionOperandEditPart) {
+ return null;
+ } else if (host instanceof InteractionFragmentEditPart) {
+ Point location = ((ReconnectRequest) request).getLocation().getCopy();
+ // if mouse location is far from border, do not handle connection event
+ if (!touchesInteractionBounds((GraphicalEditPart) host, location)) {
+ return null;
+ }
+ }
+ }
+ return host;
+ }
+ return null;
+ }
+
+ private boolean touchesInteractionBounds(GraphicalEditPart interaction, Point location) {
+ Point p = location.getCopy();
+ IFigure figure = interaction.getFigure();
+ figure.translateToRelative(p);
+ // if mouse location is far from border, do not handle connection event
+ Rectangle r = figure.getBounds().getCopy();
+ Rectangle innerRetangle = r.getShrinked(20, 20);
+ if (innerRetangle.contains(p)) {
+ return false;
+ }
+ return r.getExpanded(1, 1).contains(p);
+ }
+
+ protected boolean isCreateConnectionRequest(Request request, IElementType type) {
+ if (request instanceof CreateAspectUnspecifiedTypeConnectionRequest) {
+ List types = ((CreateUnspecifiedTypeConnectionRequest) request).getElementTypes();
+ if (types.contains(type)) {
+ return true;
+ }
+ }
+ if (request instanceof CreateConnectionViewRequest) {
+ String requestHint = ((CreateConnectionViewRequest) request).getConnectionViewDescriptor().getSemanticHint();
+ if (((IHintedType) type).getSemanticHint().equals(requestHint)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected ConnectionRouter getDummyConnectionRouter(CreateConnectionRequest req) {
+ if (req.getSourceEditPart() instanceof InteractionEditPart || req.getSourceEditPart() instanceof CombinedFragmentEditPart) {
+ return ConnectionRouter.NULL;
+ }
+ return super.getDummyConnectionRouter(req);
+ }
+
+ /**
+ * A new point class which can hold the location of the viewpoint. The user can use adjustToFitNewViewport() service to get the correctly point in
+ * given viewport.
+ *
+ * @author Jin Liu
+ */
+ private static class PointEx extends Point {
+
+ private static final long serialVersionUID = -3049675238350676816L;
+
+ private Point viewportLocation;
+
+ public PointEx(Point pt) {
+ super(pt);
+ }
+
+ public void setViewportLocation(Point p) {
+ if (p != null) {
+ viewportLocation = p.getCopy();
+ }
+ }
+
+ public Point adjustToFitNewViewport(Point newViewportLoc) {
+ Point pt = getCopy();
+ if (newViewportLoc != null && viewportLocation != null && !newViewportLoc.equals(viewportLocation)) {
+ pt.x += (viewportLocation.x - newViewportLoc.x);
+ pt.y += (viewportLocation.y - newViewportLoc.y);
+ }
+ return pt;
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ObservationLinkPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ObservationLinkPolicy.java
index 5ff5aefb851..5fad87c3488 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ObservationLinkPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ObservationLinkPolicy.java
@@ -343,7 +343,7 @@ public class ObservationLinkPolicy extends GraphicalNodeEditPolicy {
}
Map<String, Object> extendedData = request.getExtendedData();
// assign the occurrence specification
- Object paramOcc1 = extendedData.get(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
+ Object paramOcc1 = extendedData.get(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
Object paramOcc2 = extendedData.get(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2);
if (paramOcc1 != null && paramOcc2 != null) {
events.add((OccurrenceSpecification) paramOcc1);
@@ -361,13 +361,13 @@ public class ObservationLinkPolicy extends GraphicalNodeEditPolicy {
View view = (View) messageEP.getModel();
Message message = (Message) view.getElement();
if (message.getSendEvent() != null) {
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, message.getSendEvent());
+ extendedData.put(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, message.getSendEvent());
}
if (message.getReceiveEvent() != null) {
extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2, message.getReceiveEvent());
}
}
- if (extendedData.containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION) && extendedData.containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2)) {
+ if (extendedData.containsKey(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION) && extendedData.containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2)) {
return true;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/SequenceGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/SequenceGraphicalNodeEditPolicy.java
index bca749d9d21..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/SequenceGraphicalNodeEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/SequenceGraphicalNodeEditPolicy.java
@@ -1,710 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.ConnectionRouter;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Polyline;
-import org.eclipse.draw2d.Viewport;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.CreateConnectionRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.SetConnectionAnchorsCommand;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.internal.commands.SetConnectionBendpointsCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest.ConnectionViewAndElementDescriptor;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool.CreateAspectUnspecifiedTypeConnectionRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomCombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.FragmentsOrdererHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypesCommentLinkEditPart;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * A specific policy to handle the message :
- * - Message cannot be uphill.
- * - Message Occurrence Specification which are created along the message may have a different container than the message.
- * - Message feedback on creation is always drawn in black (to avoid invisible feedback)
- *
- */
-@SuppressWarnings({ "restriction", "unchecked", "rawtypes" })
-public class SequenceGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
-
- /** A static margin to allow drawing of straight message */
- private static final int MARGIN = 2;
-
- /**
- * Gets the command to start the creation of a new connection and relationship. This will update the request appropriately. Also completes the
- * request with nearby occurrence specification information.
- *
- * @param request
- * creation request
- * @return Command
- */
- @Override
- protected Command getConnectionAndRelationshipCreateCommand(CreateConnectionViewAndElementRequest request) {
- Map<String, Object> extendedData = request.getExtendedData();
- // record the nearest event if necessary
- String requestHint = request.getConnectionViewAndElementDescriptor().getSemanticHint();
- if (isCreatedNearOccurrenceSpecification(requestHint) || isOnOccerrenceSpecification(request.getLocation())) {
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(getHost());
- if (lifelinePart != null) {
- Entry<Point, List<OccurrenceSpecification>> eventAndLocation = SequenceUtil.findNearestEvent(request.getLocation(), lifelinePart);
- // find an event near enough to create the constraint or observation
- List<OccurrenceSpecification> events = Collections.emptyList();
- Point location = null;
- if (eventAndLocation != null) {
- location = eventAndLocation.getKey();
- events = eventAndLocation.getValue();
- }
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
- extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION, location);
- if (location != null) {
- request.setLocation(location);
- }
- }
- }
- return super.getConnectionAndRelationshipCreateCommand(request);
- }
-
- private boolean isOnOccerrenceSpecification(Point location) {
- EditPart editPart = getHost().getViewer().findObjectAt(location);
- if (editPart == null) {
- return false;
- }
- Object model = editPart.getModel();
- if (model instanceof View) {
- return (ViewUtil.resolveSemanticElement((View) model) instanceof OccurrenceSpecification);
- }
- return false;
- }
-
- /**
- * Gets the command to complete the creation of a new connection and relationship. Also completes the request with nearby occurrence specification
- * information.
- *
- * @param request
- * the creation request
- * @return Command
- */
- @Override
- protected Command getConnectionAndRelationshipCompleteCommand(CreateConnectionViewAndElementRequest request) {
- Map<String, Object> extendedData = request.getExtendedData();
- // record the nearest event if necessary
- String requestHint = request.getConnectionViewAndElementDescriptor().getSemanticHint();
- if (isCreatedNearOccurrenceSpecification(requestHint) || isOnOccerrenceSpecification(request.getLocation())) {
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(getHost());
- if (lifelinePart != null) {
- Entry<Point, List<OccurrenceSpecification>> eventAndLocation = SequenceUtil.findNearestEvent(request.getLocation(), lifelinePart);
- // find an event near enough to create the constraint or observation
- List<OccurrenceSpecification> events = Collections.emptyList();
- Point location = null;
- if (eventAndLocation != null) {
- location = eventAndLocation.getKey();
- events = eventAndLocation.getValue();
- }
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2, events);
- extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2, location);
- if (location != null) {
- request.setLocation(location);
- }
- }
- }
- // Ordering message occurrence specifications after message creation, See https://bugs.eclipse.org/bugs/show_bug.cgi?id=403233
- Command command = super.getConnectionAndRelationshipCompleteCommand(request);
- if (command != null && command.canExecute()) {
- command = command.chain(FragmentsOrdererHelper.createOrderingFragmentsCommand(getHost(), request));
- }
- return command;
- }
-
- /**
- * Return true if creation must be performed to or from an occurrence specification
- *
- * @param requestHint
- * the hint of object to create
- * @return true if creation to or from an occurrence specification
- */
- private boolean isCreatedNearOccurrenceSpecification(String requestHint) {
- String generalOrderingHint = ((IHintedType) UMLElementTypes.GeneralOrdering_Edge).getSemanticHint();
- return generalOrderingHint.equals(requestHint);
- }
-
- /**
- * Return true if a message is being created
- *
- * @param requestHint
- * the hint of object to create
- * @return true if creation of a message
- */
- protected boolean isMessageHint(String requestHint) {
- List<String> messageHints = new ArrayList<String>(7);
- String messageHint = ((IHintedType) UMLElementTypes.Message_SynchEdge).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType) UMLElementTypes.Message_AsynchEdge).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType) UMLElementTypes.Message_ReplyEdge).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType) UMLElementTypes.Message_CreateEdge).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType) UMLElementTypes.Message_DeleteEdge).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType) UMLElementTypes.Message_LostEdge).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType) UMLElementTypes.Message_FoundEdge).getSemanticHint();
- messageHints.add(messageHint);
- return messageHints.contains(requestHint);
- }
-
- @Override
- protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
- // move source point to the bottom if it is contained in LifelineNameContainerFigure
- EditPart targetEditPart = request.getTargetEditPart();
- if (targetEditPart != null && targetEditPart instanceof LifelineEditPart) {
- LifelineEditPart target = (LifelineEditPart) targetEditPart;
- if (target.getPrimaryShape() != null) {
- Rectangle sourceBounds = target.getPrimaryShape().getFigureLifelineNameContainerFigure().getBounds().getCopy();
- Point sourcePointCopy = request.getLocation().getCopy();
- target.getFigure().translateToRelative(sourcePointCopy);
- if (sourcePointCopy.y() < sourceBounds.getBottom().y()) {
- target.getFigure().translateToAbsolute(sourceBounds);
- request.getLocation().setY(sourceBounds.getBottom().y() + 1);
- }
- }
- }
- /**
- * Sometime, the viewport would be scrolled when drag to select the target of connection by using AutoexposeHelper. We need to adjust the
- * source
- * location if needed.
- */
- PointEx sourcePoint = new PointEx(request.getLocation());
- Viewport vp = findViewport((GraphicalEditPart) getHost().getViewer().getRootEditPart());
- if (vp != null) {
- Point loc1 = vp.getClientArea().getLocation().getCopy();
- sourcePoint.setViewportLocation(loc1);
- }
- request.getExtendedData().put(SequenceRequestConstant.SOURCE_LOCATION_DATA, sourcePoint);
- // Safely calculate the source model container here.
- request.getExtendedData().put(SequenceRequestConstant.SOURCE_MODEL_CONTAINER, SequenceUtil.findInteractionFragmentContainerAt(sourcePoint, getHost()));
- return super.getConnectionCreateCommand(request);
- }
-
- protected Viewport findViewport(GraphicalEditPart part) {
- IFigure figure = null;
- Viewport port = null;
- do {
- if (figure == null) {
- figure = part.getContentPane();
- } else {
- figure = figure.getParent();
- }
- if (figure instanceof Viewport) {
- port = (Viewport) figure;
- break;
- }
- } while (figure != part.getFigure() && figure != null);
- return port;
- }
-
- /**
- * Overrides to disable uphill message
- */
- @Override
- protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
- Command command = super.getConnectionCompleteCommand(request);
- if (command == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // disable the following code if we are not creating a message.
- String requestHint = null;
- if (request instanceof CreateConnectionViewRequest) {
- requestHint = ((CreateConnectionViewRequest) request).getConnectionViewDescriptor().getSemanticHint();
- if (!isMessageHint(requestHint)) {
- return command;
- }
- }
- // ICommandProxy proxy = (ICommandProxy)request.getStartCommand();
- // CompositeCommand cc = (CompositeCommand)proxy.getICommand();
- // Iterator<?> commandItr = cc.iterator();
- // while(commandItr.hasNext()) {
- // Object obj = commandItr.next();
- // if(obj instanceof SetConnectionBendpointsCommand) {
- // SetConnectionBendpointsCommand sbbCommand = (SetConnectionBendpointsCommand)obj;
- // final PointList pointList = sbbCommand.getNewPointList();
- Point sourcePoint = (Point) request.getExtendedData().get(SequenceRequestConstant.SOURCE_LOCATION_DATA);
- Point targetPoint = request.getLocation();
- // Adjust source location to current coordinate system (the viewport may be scrolled by AutoexposeHelper.).
- if (sourcePoint instanceof PointEx) {
- Viewport vp = findViewport((GraphicalEditPart) getHost().getViewer().getRootEditPart());
- if (vp != null) {
- Point loc2 = vp.getClientArea().getLocation();
- sourcePoint = ((PointEx) sourcePoint).adjustToFitNewViewport(loc2);
- }
- }
- // prevent uphill message (leave margin for horizontal messages)
- boolean messageCreate = ((IHintedType) UMLElementTypes.Message_CreateEdge).getSemanticHint().equals(requestHint);
- if (sourcePoint == null || sourcePoint.y >= targetPoint.y + MARGIN) {
- if (!messageCreate && !isLostFoundMessage(requestHint)) {
- return UnexecutableCommand.INSTANCE;
- }
- }
- // prevent uphill message (for self recursive message)
- if (request.getSourceEditPart().equals(request.getTargetEditPart()) && sourcePoint.y >= targetPoint.y) {
- return UnexecutableCommand.INSTANCE;
- }
- // prevent uphill message (for reply message)
- if (request instanceof CreateConnectionViewAndElementRequest) {
- ConnectionViewAndElementDescriptor desc = ((CreateConnectionViewAndElementRequest) request).getConnectionViewAndElementDescriptor();
- String replyHint = ((IHintedType) UMLElementTypes.Message_ReplyEdge).getSemanticHint();
- if (replyHint.equals(desc.getSemanticHint()) && request.getSourceEditPart() instanceof IGraphicalEditPart) {
- Rectangle srcBounds = SequenceUtil.getAbsoluteBounds((IGraphicalEditPart) request.getSourceEditPart());
- int bottom = srcBounds.getBottom().y;
- if (bottom >= targetPoint.y + MARGIN) {
- return UnexecutableCommand.INSTANCE;
- }
- }
- }
- // prevent duplicate create link
- if (messageCreate && request.getSourceEditPart() != null && request.getTargetEditPart() != null) {
- if (LifelineMessageCreateHelper.hasMessageCreate((GraphicalEditPart) request.getSourceEditPart(), request.getTargetEditPart())) {
- return UnexecutableCommand.INSTANCE;
- }
- }
- // The SOURCE MODEL should be calculated when connection started, the scroll bar maybe already changed when connection come to finished.
- // request.getExtendedData().put(SequenceRequestConstant.SOURCE_MODEL_CONTAINER, SequenceUtil.findInteractionFragmentContainerAt(sourcePoint, getHost()));
- request.getExtendedData().put(SequenceRequestConstant.TARGET_MODEL_CONTAINER, SequenceUtil.findInteractionFragmentContainerAt(targetPoint, getHost()));
- // In case we are creating a connection to/from a CoRegion, we will need the lifeline element where is drawn the CoRegion later in the process.
- EditPart targetEditPart = getTargetEditPart(request);
- if (targetEditPart instanceof CustomCombinedFragment2EditPart) {
- request.getExtendedData().put(SequenceRequestConstant.LIFELINE_GRAPHICAL_CONTAINER, ((CustomCombinedFragment2EditPart) targetEditPart).getAttachedLifeline());
- }
- // update bendpoints for self link message.
- if (connectionFeedback != null && ((IHintedType) UMLElementTypes.Message_AsynchEdge).getSemanticHint().equals(requestHint)) {
- updateConnectionBendpoints(request, command);
- }
- // change constraint of the target lifeline after added a Create Message
- if (request.getTargetEditPart() instanceof LifelineEditPart && !(request.getSourceEditPart().equals(request.getTargetEditPart()))) {
- if (requestHint.equals((((IHintedType) UMLElementTypes.Message_CreateEdge).getSemanticHint()))) {
- CustomLifelineEditPart target = (CustomLifelineEditPart) request.getTargetEditPart();
- command = LifelineMessageCreateHelper.moveLifelineDown(command, target, sourcePoint.getCopy());
- }
- }
- return command;
- }
-
- /**
- * Update bendpoints when creating self message with the feedback, so that, the message can be created like feedback,
- */
- private void updateConnectionBendpoints(CreateConnectionRequest request, Command command) {
- if (connectionFeedback == null || connectionFeedback.getPoints().size() < 4) {
- return;
- }
- if (!(command instanceof ICommandProxy)) {
- return;
- }
- ICommand iCommand = ((ICommandProxy) command).getICommand();
- if (!(iCommand instanceof CompositeCommand)) {
- return;
- }
- INodeEditPart targetEP = getConnectionCompleteEditPart(request);
- if (targetEP == null) {
- return;
- }
- LifelineEditPart sourceLifeline = getLifeline(request.getSourceEditPart());
- LifelineEditPart targetLifeline = getLifeline(request.getTargetEditPart());
- boolean isSelfLink = sourceLifeline != null && sourceLifeline.equals(targetLifeline);
- if (!isSelfLink) {
- return;
- }
- CompositeCommand cc = (CompositeCommand) iCommand;
- SetConnectionAnchorsCommand scaCommand = null;
- SetConnectionBendpointsCommand sbbCommand = null;
- Iterator it = cc.iterator();
- while (it.hasNext()) {
- Object next = it.next();
- if (next instanceof SetConnectionBendpointsCommand) {
- sbbCommand = (SetConnectionBendpointsCommand) next;
- } else if (next instanceof SetConnectionAnchorsCommand) {
- scaCommand = (SetConnectionAnchorsCommand) next;
- }
- if (sbbCommand != null && scaCommand != null) {
- break;
- }
- }
- if (sbbCommand == null || scaCommand == null) {
- return;
- }
- ConnectionAnchor targetAnchor = targetEP.getTargetConnectionAnchor(request);
- INodeEditPart sourceEditPart = (INodeEditPart) request.getSourceEditPart();
- ConnectionAnchor sourceAnchor = sourceEditPart.mapTerminalToConnectionAnchor(scaCommand.getNewSourceTerminal());
- PointList pointList = connectionFeedback.getPoints().getCopy();
- connectionFeedback.translateToAbsolute(pointList);
- sbbCommand.setNewPointList(pointList, sourceAnchor.getReferencePoint(), targetAnchor.getReferencePoint());
- }
-
- private LifelineEditPart getLifeline(EditPart editPart) {
- if (editPart == null) {
- return null;
- }
- if (editPart instanceof LifelineEditPart) {
- return (LifelineEditPart) editPart;
- }
- return getLifeline(editPart.getParent());
- }
-
- /**
- * Override to disable uphill message
- */
- @Override
- protected Command getReconnectSourceCommand(ReconnectRequest request) {
- if (isUphillMessage(request) && !isLostFoundMessage(request)) {
- return UnexecutableCommand.INSTANCE;
- }
- // prevent duplicate link
- if (request.getConnectionEditPart() instanceof MessageCreateEditPart && request.getTarget() != null && !LifelineMessageCreateHelper.canReconnectMessageCreate(request)) {
- return UnexecutableCommand.INSTANCE;
- }
- // Avoid to reconnect AppliedStereotypesCommentLink to another EditPart.
- ConnectionEditPart connection = request.getConnectionEditPart();
- if (connection instanceof AppliedStereotypesCommentLinkEditPart) {
- if (connection.getSource() != getConnectableEditPart()) {
- return UnexecutableCommand.INSTANCE;
- }
- }
- Command command = super.getReconnectSourceCommand(request);
- // //Ordering message occurrence specifications after message reconnected, See https://bugs.eclipse.org/bugs/show_bug.cgi?id=403233
- if (command != null && command.canExecute()) {
- command = command.chain(FragmentsOrdererHelper.createOrderingFragmentsCommand(getHost(), request));
- }
- return command;
- }
-
- private boolean isLostFoundMessage(ReconnectRequest request) {
- ConnectionEditPart connectionEditPart = request.getConnectionEditPart();
- if (connectionEditPart instanceof MessageFoundEditPart || connectionEditPart instanceof MessageLostEditPart) {
- return true;
- }
- return false;
- }
-
- private boolean isLostFoundMessage(String requestHint) {
- if (((IHintedType) UMLElementTypes.Message_LostEdge).getSemanticHint().equals(requestHint) || ((IHintedType) UMLElementTypes.Message_FoundEdge).getSemanticHint().equals(requestHint)) {
- return true;
- }
- return false;
- }
-
- /**
- * Override to disable uphill message
- */
- @Override
- protected Command getReconnectTargetCommand(ReconnectRequest request) {
- if (isUphillMessage(request) && !isLostFoundMessage(request)) {
- return UnexecutableCommand.INSTANCE;
- }
- // prevent duplicate link
- if (request.getConnectionEditPart() instanceof MessageCreateEditPart && request.getTarget() != null && !LifelineMessageCreateHelper.canReconnectMessageCreate(request)) {
- return UnexecutableCommand.INSTANCE;
- }
- Command command = super.getReconnectTargetCommand(request);
- // Ordering message occurrence specifications after message reconnected, See https://bugs.eclipse.org/bugs/show_bug.cgi?id=403233
- if (command != null && command.canExecute()) {
- command = command.chain(FragmentsOrdererHelper.createOrderingFragmentsCommand(getHost(), request));
- }
- return command;
- }
-
- /**
- * Check that a message doesn't have its target point above its source point
- *
- * @param request
- * the ReconnectRequest
- * @return true if the target point is above the source point
- */
- protected boolean isUphillMessage(ReconnectRequest request) {
- ConnectionEditPart connectionEditPart = request.getConnectionEditPart();
- if (connectionEditPart.getModel() instanceof Edge) {
- Edge edge = (Edge) connectionEditPart.getModel();
- if (edge.getElement() instanceof Message) {
- if (connectionEditPart.getFigure() instanceof Polyline) {
- // get connection end points translated to absolute
- Polyline polyline = (Polyline) connectionEditPart.getFigure();
- Point end = polyline.getEnd().getCopy();
- Point start = polyline.getStart().getCopy();
- polyline.getParent().translateToAbsolute(end);
- polyline.getParent().translateToAbsolute(start);
- // look at the request rather than at both polyline ends which may not be up to date
- if (REQ_RECONNECT_SOURCE.equals(request.getType())) {
- return request.getLocation().y >= end.y + MARGIN;
- } else if (REQ_RECONNECT_TARGET.equals(request.getType())) {
- return start.y >= request.getLocation().y + MARGIN;
- } else {
- return start.y >= end.y + MARGIN;
- }
- }
- }
- }
- return false;
- }
-
- /**
- * Overrides to set the color of the dummyConnection to color black.
- * This allow to see the feedback of the connection when it is created.
- * By default, the color was the foreground color of the lifeline, which is always blank leading to an invisible feedback.
- *
- */
- @Override
- protected Connection createDummyConnection(Request req) {
- Connection conn = super.createDummyConnection(req);
- conn.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);
- return conn;
- }
-
- /**
- * Gets a command that pops up a menu which allows the user to select which
- * type of connection to be created and then creates the connection.
- *
- * @param content
- * The list of items making up the content of the popup menu.
- * @param request
- * The relevant create connection request.
- * @return the command to popup up the menu and create the connection
- */
- @Override
- protected ICommand getPromptAndCreateConnectionCommand(List content, CreateConnectionRequest request) {
- return new SequencePromptAndCreateConnectionCommand(content, request);
- }
-
- /**
- * Extends {@link PromptAndCreateConnectionCommand} to specify the type of message that can be selected.
- */
- protected class SequencePromptAndCreateConnectionCommand extends PromptAndCreateConnectionCommand {
-
- /**
- * @see {@link PromptAndCreateConnectionCommand#PromptAndCreateConnectionCommand(List, CreateConnectionRequest)}
- */
- public SequencePromptAndCreateConnectionCommand(List content, CreateConnectionRequest request) {
- super(content, request);
- }
-
- /**
- * Defines a specific label provider to handle message.
- */
- @Override
- protected ILabelProvider getLabelProvider() {
- return new LabelProvider() {
-
- @Override
- public String getText(Object object) {
- if (object instanceof IHintedType) {
- IHintedType elementType = (IHintedType) object;
- switch (UMLVisualIDRegistry.getVisualID(elementType.getSemanticHint())) {
- case MessageSyncEditPart.VISUAL_ID:
- return Messages.MessageSync2CreationTool_title;
- case MessageAsyncEditPart.VISUAL_ID:
- return Messages.MessageAsync3CreationTool_title;
- case MessageReplyEditPart.VISUAL_ID:
- return Messages.MessageReply4CreationTool_title;
- case MessageCreateEditPart.VISUAL_ID:
- return Messages.MessageCreate5CreationTool_title;
- case MessageDeleteEditPart.VISUAL_ID:
- return Messages.MessageDelete6CreationTool_title;
- case MessageLostEditPart.VISUAL_ID:
- return Messages.MessageLost7CreationTool_title;
- case MessageFoundEditPart.VISUAL_ID:
- return Messages.MessageFound8CreationTool_title;
- }
- }
- return super.getText(object);
- }
- };
- }
- }
-
- @Override
- public EditPart getTargetEditPart(Request request) {
- if (REQ_CONNECTION_START.equals(request.getType()) || REQ_CONNECTION_END.equals(request.getType()) || REQ_RECONNECT_SOURCE.equals(request.getType()) || REQ_RECONNECT_TARGET.equals(request.getType())) {
- EditPart host = getHost();
- if (request instanceof CreateConnectionRequest) {
- if (host instanceof InteractionEditPart) {
- if (REQ_CONNECTION_END.equals(request.getType()) && isCreateConnectionRequest(request, UMLElementTypes.Message_LostEdge)) {
- return host;
- }
- if (REQ_CONNECTION_START.equals(request.getType()) && isCreateConnectionRequest(request, UMLElementTypes.Message_FoundEdge)) {
- return host;
- }
- InteractionEditPart interactionPart = (InteractionEditPart) host;
- if (!touchesInteractionBounds(interactionPart, ((CreateConnectionRequest) request).getLocation())) {
- return null;
- }
- } else if (host instanceof InteractionOperandEditPart) {
- return null;
- } else if (host instanceof InteractionFragmentEditPart) {
- CreateConnectionRequest req = (CreateConnectionRequest) request;
- Point location = req.getLocation().getCopy();
- // if mouse location is far from border, do not handle connection event
- if (!touchesInteractionBounds((GraphicalEditPart) host, location)) {
- return null;
- }
- }
- } else if (request instanceof ReconnectRequest) {
- if (host instanceof InteractionEditPart) {
- ConnectionEditPart conn = ((ReconnectRequest) request).getConnectionEditPart();
- Object model = conn.getModel();
- if (model instanceof View) {
- if (REQ_RECONNECT_TARGET.equals(request.getType()) && UMLVisualIDRegistry.getVisualID((View) model).equals(MessageLostEditPart.VISUAL_ID)) {
- return host;
- }
- if (REQ_RECONNECT_SOURCE.equals(request.getType()) && UMLVisualIDRegistry.getVisualID((View) model).equals(MessageFoundEditPart.VISUAL_ID)) {
- return host;
- }
- }
- InteractionEditPart interactionEditPart = (InteractionEditPart) getHost();
- if (!touchesInteractionBounds(interactionEditPart, ((ReconnectRequest) request).getLocation())) {
- return null;
- }
- } else if (host instanceof InteractionOperandEditPart) {
- return null;
- } else if (host instanceof InteractionFragmentEditPart) {
- Point location = ((ReconnectRequest) request).getLocation().getCopy();
- // if mouse location is far from border, do not handle connection event
- if (!touchesInteractionBounds((GraphicalEditPart) host, location)) {
- return null;
- }
- }
- }
- return host;
- }
- return null;
- }
-
- private boolean touchesInteractionBounds(GraphicalEditPart interaction, Point location) {
- Point p = location.getCopy();
- IFigure figure = interaction.getFigure();
- figure.translateToRelative(p);
- // if mouse location is far from border, do not handle connection event
- Rectangle r = figure.getBounds().getCopy();
- Rectangle innerRetangle = r.getShrinked(20, 20);
- if (innerRetangle.contains(p)) {
- return false;
- }
- return r.getExpanded(1, 1).contains(p);
- }
-
- protected boolean isCreateConnectionRequest(Request request, IElementType type) {
- if (request instanceof CreateAspectUnspecifiedTypeConnectionRequest) {
- List types = ((CreateUnspecifiedTypeConnectionRequest) request).getElementTypes();
- if (types.contains(type)) {
- return true;
- }
- }
- if (request instanceof CreateConnectionViewRequest) {
- String requestHint = ((CreateConnectionViewRequest) request).getConnectionViewDescriptor().getSemanticHint();
- if (((IHintedType) type).getSemanticHint().equals(requestHint)) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- protected ConnectionRouter getDummyConnectionRouter(CreateConnectionRequest req) {
- if (req.getSourceEditPart() instanceof InteractionEditPart || req.getSourceEditPart() instanceof CombinedFragmentEditPart) {
- return ConnectionRouter.NULL;
- }
- return super.getDummyConnectionRouter(req);
- }
-
- /**
- * A new point class which can hold the location of the viewpoint. The user can use adjustToFitNewViewport() service to get the correctly point in
- * given viewport.
- *
- * @author Jin Liu
- */
- private static class PointEx extends Point {
-
- private static final long serialVersionUID = -3049675238350676816L;
-
- private Point viewportLocation;
-
- public PointEx(Point pt) {
- super(pt);
- }
-
- public void setViewportLocation(Point p) {
- if (p != null) {
- viewportLocation = p.getCopy();
- }
- }
-
- public Point adjustToFitNewViewport(Point newViewportLoc) {
- Point pt = getCopy();
- if (newViewportLoc != null && viewportLocation != null && !newViewportLoc.equals(viewportLocation)) {
- pt.x += (viewportLocation.x - newViewportLoc.x);
- pt.y += (viewportLocation.y - newViewportLoc.y);
- }
- return pt;
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomActionExecutionSpecificationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomActionExecutionSpecificationItemSemanticEditPolicy.java
deleted file mode 100644
index 80034b625b9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomActionExecutionSpecificationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-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.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomGeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ActionExecutionSpecificationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomActionExecutionSpecificationItemSemanticEditPolicy extends ActionExecutionSpecificationItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- CompoundCommand deleteElementsCommand = new CompoundCommand();
- 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) {
- deleteElementsCommand.add(new ICommandProxy(deleteCommand));
- if (selectedEObject instanceof ExecutionSpecification && getHost() instanceof ShapeNodeEditPart) {
- SequenceDeleteHelper.destroyExecutionOccurrenceSpecification(req, deleteElementsCommand, (ShapeNodeEditPart) getHost(), (ExecutionSpecification) selectedEObject);
- }
- }
- }
- if (deleteElementsCommand.size() > 0) {
- return deleteElementsCommand;
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @Override
- */
- @Override
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteExecutionSpecificationViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- ExecutionSpecificationComponentEditPolicy.addDeleteViewChildrenCommand(deleteViewsCommand, getEditingDomain(), (ShapeNodeEditPart) getHost());
- if (mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- // add general ordering
- if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new CustomGeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- // add general ordering
- if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new CustomGeneralOrderingCreateCommand(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.
- *
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(req));
- // add general ordering
- case GeneralOrderingEditPart.VISUAL_ID:
- if (req.getNewRelationshipEnd() instanceof OccurrenceSpecification) {
- return getGEFWrapper(new GeneralOrderingReorientCommand(req));
- } else {
- return null;
- }
- }
- 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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomBehaviorExecutionSpecificationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomBehaviorExecutionSpecificationItemSemanticEditPolicy.java
deleted file mode 100644
index 19d025652ce..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomBehaviorExecutionSpecificationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-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.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomGeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.BehaviorExecutionSpecificationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomBehaviorExecutionSpecificationItemSemanticEditPolicy extends BehaviorExecutionSpecificationItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- CompoundCommand deleteElementsCommand = new CompoundCommand();
- 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) {
- deleteElementsCommand.add(new ICommandProxy(deleteCommand));
- if (selectedEObject instanceof ExecutionSpecification && getHost() instanceof ShapeNodeEditPart) {
- SequenceDeleteHelper.destroyExecutionOccurrenceSpecification(req, deleteElementsCommand, (ShapeNodeEditPart) getHost(), (ExecutionSpecification) selectedEObject);
- }
- }
- }
- if (deleteElementsCommand.size() > 0) {
- return deleteElementsCommand;
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @Override
- */
- @Override
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteExecutionSpecificationViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- ExecutionSpecificationComponentEditPolicy.addDeleteViewChildrenCommand(deleteViewsCommand, getEditingDomain(), (ShapeNodeEditPart) getHost());
- if (mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- // add general ordering
- if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new CustomGeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- // add general ordering
- if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new CustomGeneralOrderingCreateCommand(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.
- *
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(req));
- // add general ordering
- case GeneralOrderingEditPart.VISUAL_ID:
- if (req.getNewRelationshipEnd() instanceof OccurrenceSpecification) {
- return getGEFWrapper(new GeneralOrderingReorientCommand(req));
- } else {
- return null;
- }
- }
- 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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragment2ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragment2ItemSemanticEditPolicy.java
deleted file mode 100644
index 884d36a1069..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragment2ItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-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.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomGeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragment2ItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomCombinedFragment2ItemSemanticEditPolicy extends CombinedFragment2ItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- // add general ordering
- if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new CustomGeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- // add general ordering
- if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new CustomGeneralOrderingCreateCommand(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.
- *
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(req));
- // add general ordering
- case GeneralOrderingEditPart.VISUAL_ID:
- if (req.getNewRelationshipEnd() instanceof OccurrenceSpecification) {
- return getGEFWrapper(new GeneralOrderingReorientCommand(req));
- } else {
- return null;
- }
- }
- 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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 6aed6fe1f3f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-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.sequence.command.CustomInteractionOperandCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.InteractionOperatorKind;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy extends CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy {
-
- /**
- * Generated not for limit InteractionOperand number. {@inheritDoc}
- *
- * @Override
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.InteractionOperand_Shape == req.getElementType()) {
- CombinedFragment combinedFragment = getAssociatedCombinedFragment(req.getContainer());
- if (combinedFragment == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Set the container of the request to the combinedFragment.
- req.setContainer(combinedFragment);
- InteractionOperatorKind interactionOperator = combinedFragment.getInteractionOperator();
- EList<InteractionOperand> operands = combinedFragment.getOperands();
- if (interactionOperator != null
- && !operands.isEmpty()
- && (InteractionOperatorKind.OPT_LITERAL.equals(interactionOperator) || InteractionOperatorKind.LOOP_LITERAL.equals(interactionOperator) || InteractionOperatorKind.BREAK_LITERAL.equals(interactionOperator) || InteractionOperatorKind.NEG_LITERAL
- .equals(interactionOperator))) {
- return UnexecutableCommand.INSTANCE;
- }
- // make compound command
- CompoundCommand result = new CompoundCommand();
- Command cmd = getGEFWrapper(new CustomInteractionOperandCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- result.add(cmd);
- // append a command which notifies
- // Fixed bug: remove the notify dialog, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=402977
- // Command notifyCmd = new Command() {
- //
- // @Override
- // public void execute() {
- // NotificationBuilder warning = NotificationBuilder.createAsyncPopup(CustomMessages.Warning_ResizeInteractionOperandTitle, NLS.bind(CustomMessages.Warning_ResizeInteractionOperandTxt, System.getProperty("line.separator")));
- // warning.run();
- // }
- //
- // @Override
- // public void undo() {
- // execute();
- // }
- // };
- // if(notifyCmd.canExecute()) {
- // result.add(notifyCmd);
- // }
- return result;
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * Retrieve the combined fragment associated with the request.
- */
- private CombinedFragment getAssociatedCombinedFragment(EObject eObject) {
- CombinedFragment combinedFragment = null;
- if (eObject instanceof CombinedFragment) {
- return (CombinedFragment) eObject;
- } else if (eObject != null) {
- combinedFragment = getAssociatedCombinedFragment(eObject.eContainer());
- }
- return combinedFragment;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentItemSemanticEditPolicy.java
deleted file mode 100644
index 84bbea76a9e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-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.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CombinedFragmentDeleteHelper;
-import org.eclipse.uml2.uml.CombinedFragment;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomCombinedFragmentItemSemanticEditPolicy extends CombinedFragmentItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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) {
- if (selectedEObject instanceof CombinedFragment) {
- ICommand selectCmd = CombinedFragmentDeleteHelper.createDestroyElementCommand((CombinedFragment) selectedEObject, getEditingDomain(), provider, req, deleteCommand, (CombinedFragmentEditPart) getHost());
- return new ICommandProxy(selectCmd);
- } else {
- return new ICommandProxy(deleteCommand);
- }
- }
- return null;
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCommentAnnotatedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCommentAnnotatedElementItemSemanticEditPolicy.java
deleted file mode 100644
index 78371180289..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCommentAnnotatedElementItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-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.sequence.edit.parts.MessageEndHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CommentAnnotatedElementItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.MessageEnd;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomCommentAnnotatedElementItemSemanticEditPolicy extends CommentAnnotatedElementItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @Override
- protected Command getDestroyReferenceCommand(final DestroyReferenceRequest req) {
- if (req.getReferencedObject() instanceof MessageEnd) {
- return getGEFWrapper(new DestroyReferenceCommand(req) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CommandResult res = super.doExecuteWithResult(monitor, info);
- if (res.getStatus().isOK()) {
- MessageEndHelper.removeConnectionSourceFromMessageEnd((MessageEnd) req.getReferencedObject(), req.getContainer());
- }
- return res;
- }
- });
- }
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCommentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCommentItemSemanticEditPolicy.java
deleted file mode 100644
index 56ad5817673..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCommentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CommentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomCommentItemSemanticEditPolicy extends CommentItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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 org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConsiderIgnoreFragmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConsiderIgnoreFragmentItemSemanticEditPolicy.java
deleted file mode 100644
index e94613afc87..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConsiderIgnoreFragmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-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.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ConsiderIgnoreFragmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CombinedFragmentDeleteHelper;
-import org.eclipse.uml2.uml.CombinedFragment;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomConsiderIgnoreFragmentItemSemanticEditPolicy extends ConsiderIgnoreFragmentItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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) {
- if (selectedEObject instanceof CombinedFragment) {
- ICommand selectCmd = CombinedFragmentDeleteHelper.createDestroyElementCommand((CombinedFragment) selectedEObject, getEditingDomain(), provider, req, deleteCommand, (CombinedFragmentEditPart) getHost());
- return new ICommandProxy(selectCmd);
- } else {
- return new ICommandProxy(deleteCommand);
- }
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConstraintConstrainedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConstraintConstrainedElementItemSemanticEditPolicy.java
deleted file mode 100644
index 2e93d6bc877..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConstraintConstrainedElementItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-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.sequence.edit.parts.MessageEndHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ConstraintConstrainedElementItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.MessageEnd;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomConstraintConstrainedElementItemSemanticEditPolicy extends ConstraintConstrainedElementItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @Override
- protected Command getDestroyReferenceCommand(final DestroyReferenceRequest req) {
- if (req.getReferencedObject() instanceof MessageEnd) {
- return getGEFWrapper(new DestroyReferenceCommand(req) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CommandResult res = super.doExecuteWithResult(monitor, info);
- if (res.getStatus().isOK()) {
- MessageEndHelper.removeConnectionSourceFromMessageEnd((MessageEnd) req.getReferencedObject(), req.getContainer());
- }
- return res;
- }
- });
- }
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 0dcb091b62b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomContextLinkCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ConstraintItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomConstraintItemSemanticEditPolicy extends ConstraintItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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 org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == req.getElementType()) {
- return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == req.getElementType()) {
- return getGEFWrapper(new CustomContextLinkCreateCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomContinuationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomContinuationItemSemanticEditPolicy.java
deleted file mode 100644
index eec95757a86..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomContinuationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ContinuationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomContinuationItemSemanticEditPolicy extends ContinuationItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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 org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDestructionOccurrenceSpecificationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDestructionOccurrenceSpecificationItemSemanticEditPolicy.java
deleted file mode 100644
index a67cad6e95c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDestructionOccurrenceSpecificationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-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.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomGeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DestructionOccurrenceSpecificationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomDestructionOccurrenceSpecificationItemSemanticEditPolicy extends DestructionOccurrenceSpecificationItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new CustomGeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new CustomGeneralOrderingCreateCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(req));
- case GeneralOrderingEditPart.VISUAL_ID:
- return getGEFWrapper(new GeneralOrderingReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @Override
- */
- @Override
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteDestructionOccurenceViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if (mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationConstraintInMessageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationConstraintInMessageItemSemanticEditPolicy.java
deleted file mode 100644
index d8a9e4b80d9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationConstraintInMessageItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DurationConstraintInMessageItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomDurationConstraintInMessageItemSemanticEditPolicy extends DurationConstraintInMessageItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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 org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 0478f02d96f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DurationConstraintItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomDurationConstraintItemSemanticEditPolicy extends DurationConstraintItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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 org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationObservationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationObservationItemSemanticEditPolicy.java
deleted file mode 100644
index 6c79e7b60af..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomDurationObservationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DurationObservationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomDurationObservationItemSemanticEditPolicy extends DurationObservationItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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 org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomGeneralOrderingItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomGeneralOrderingItemSemanticEditPolicy.java
deleted file mode 100644
index e2456b5e9c4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomGeneralOrderingItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.GeneralOrderingItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomGeneralOrderingItemSemanticEditPolicy extends GeneralOrderingItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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));
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionContextLinkSemanticEditPolicy.java
deleted file mode 100644
index 9686bf53eb1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionContextLinkSemanticEditPolicy.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boutheina Bannour (CEA LIST) boutheina.bannour@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomContextLinkCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * This class is used to manage the the creation of a contextLink
- */
-public class CustomInteractionContextLinkSemanticEditPolicy extends CustomInteractionItemSemanticEditPolicy {
-
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Constraint_ContextEdge == req.getElementType()) {
- return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return super.getCompleteCreateRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 784312c38c8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-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.sequence.command.CustomCombinedFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConsiderIgnoreFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomInteractionUseCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomLifelineCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomTimeObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionInteractionCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomInteractionInteractionCompartmentItemSemanticEditPolicy extends InteractionInteractionCompartmentItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.ConsiderIgnoreFragment_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomConsiderIgnoreFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.CombinedFragment_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomCombinedFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.Lifeline_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomLifelineCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.InteractionUse_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomInteractionUseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.Constraint_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.Comment_Shape == req.getElementType()) {
- return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.TimeObservation_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomTimeObservationCreateCommand(req));
- }
- if (UMLElementTypes.DurationObservation_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DurationConstraint_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java
deleted file mode 100644
index 33be1093635..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-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.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.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.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintInMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomInteractionItemSemanticEditPolicy extends InteractionItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.DurationConstraint_Shape_CN == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintInMessageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DurationObservation_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @Override
- */
- @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;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandContextLinkSemanticEditPolicy.java
deleted file mode 100644
index 69b90716490..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandContextLinkSemanticEditPolicy.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boutheina Bannour (CEA LIST) boutheina.bannour@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
-import org.eclipse.gef.requests.DropRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomContextLinkCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * This class is used to manage the the creation of a contextLink
- */
-public class CustomInteractionOperandContextLinkSemanticEditPolicy extends CustomInteractionOperandItemSemanticEditPolicy {
-
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Constraint_ContextEdge == req.getElementType()) {
- return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return super.getCompleteCreateRelationshipCommand(req);
- }
-
- @Override
- public EditPart getTargetEditPart(Request request) {
- if (request instanceof CreateUnspecifiedTypeConnectionRequest) {
- CreateUnspecifiedTypeConnectionRequest createRequest = (CreateUnspecifiedTypeConnectionRequest) request;
- List<?> relationshipTypes = createRequest.getElementTypes();
- for (Object obj : relationshipTypes) {
- if (UMLElementTypes.Constraint_ContextEdge.equals(obj)) {
- Point location = ((DropRequest) request).getLocation();
- EditPart host = getHost();
- if (isEnterAnchorArea(host, location)) {
- return host;
- }
- }
- }
- }
- if (request instanceof ReconnectRequest) {
- ReconnectRequest reconnectRequest = (ReconnectRequest) request;
- ConnectionEditPart connectionEditPart = reconnectRequest.getConnectionEditPart();
- if (connectionEditPart instanceof ContextLinkEditPart) {
- Point location = ((DropRequest) request).getLocation();
- EditPart host = getHost();
- if (isEnterAnchorArea(host, location)) {
- return host;
- }
- }
- }
- return super.getTargetEditPart(request);
- }
-
- private boolean isEnterAnchorArea(EditPart editPart, Point location) {
- Point p = location.getCopy();
- if (editPart instanceof InteractionEditPart || editPart instanceof CombinedFragmentEditPart || editPart instanceof InteractionOperandEditPart) {
- IFigure figure = ((AbstractGraphicalEditPart) editPart).getFigure();
- figure.translateToRelative(p);
- // if mouse location is far from border, do not handle connection event
- Rectangle innerRetangle = figure.getBounds().getCopy().shrink(10, 10);
- if (innerRetangle.contains(p)) {
- return false;
- }
- }
- return true;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java
deleted file mode 100644
index c81df941ded..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.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.sequence.command.CustomCombinedFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConsiderIgnoreFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomContinuationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomInteractionUseCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OperandBoundsComputeHelper;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomInteractionOperandItemSemanticEditPolicy extends InteractionOperandItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.InteractionUse_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomInteractionUseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.ConsiderIgnoreFragment_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomConsiderIgnoreFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.CombinedFragment_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomCombinedFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.Continuation_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomContinuationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.InteractionOperand_Shape == req.getElementType()) {
- // delegate to parent
- return UnexecutableCommand.INSTANCE;
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- public Command getCommand(Request request) {
- if (request instanceof ReconnectRequest) {
- ReconnectRequest reconnectRequest = (ReconnectRequest) request;
- ConnectionEditPart connectionEditPart = reconnectRequest.getConnectionEditPart();
- if (connectionEditPart instanceof ContextLinkEditPart) {
- return super.getCommand(request);
- }
- }
- if (request instanceof ReconnectRequest) {
- EditPart combinedFragment = getHost().getParent().getParent();
- ((ReconnectRequest) request).setTargetEditPart(combinedFragment);
- return combinedFragment.getCommand(request);
- }
- return super.getCommand(request);
- }
-
- /**
- * @Override
- */
- @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) {
- if (deleteCommand instanceof ICompositeCommand) {
- OperandBoundsComputeHelper.addUpdateBoundsCommandForOperandDelelete(this.getHost(), (ICompositeCommand) deleteCommand);
- }
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override redirect message creation to CF
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart) combinedFragmentPart).resolveSemanticElement();
- if (((IGraphicalEditPart) getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;// return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart) combinedFragmentPart).resolveSemanticElement();
- if (((IGraphicalEditPart) getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;// return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart) combinedFragmentPart).resolveSemanticElement();
- if (((IGraphicalEditPart) getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;// return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart) combinedFragmentPart).resolveSemanticElement();
- if (((IGraphicalEditPart) getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;// return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart) combinedFragmentPart).resolveSemanticElement();
- if (((IGraphicalEditPart) getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;// return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart) combinedFragmentPart).resolveSemanticElement();
- if (((IGraphicalEditPart) getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;// return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart) combinedFragmentPart).resolveSemanticElement();
- if (((IGraphicalEditPart) getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;// return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override let InteractionOperandLayoutEditPolicy redirect messages
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;// return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;// return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;// return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;// return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;// return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;// return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;// return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionUseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionUseItemSemanticEditPolicy.java
deleted file mode 100644
index 8cfb73a8ae2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionUseItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionUseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomInteractionUseItemSemanticEditPolicy extends InteractionUseItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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 org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java
deleted file mode 100644
index 2f42b85ae1d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-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.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.sequence.command.CustomActionExecutionSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomBehaviorExecutionSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCombinedFragment2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDestructionOccurrenceSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomGeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomLifelineCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomStateInvariantCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomTimeConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomLifelineItemSemanticEditPolicy extends LifelineItemSemanticEditPolicy {
-
- /**
- * Generated not for add lifelines on lifeline
- *
- * @Override
- * (update at each lifeline modification) add lifelines, add DurationObservation/Constraint
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.ActionExecutionSpecification_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomActionExecutionSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.BehaviorExecutionSpecification_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomBehaviorExecutionSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.StateInvariant_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomStateInvariantCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.CombinedFragment_CoRegionShape == req.getElementType()) {
- return getGEFWrapper(new CustomCombinedFragment2CreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.TimeConstraint_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomTimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- // Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364826
- // if(UMLElementTypes.TimeObservation_Shape == req.getElementType()) {
- // return getGEFWrapper(new TimeObservationCreateCommand(req));
- // }
- if (UMLElementTypes.DurationConstraint_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DestructionOccurrenceSpecification_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDestructionOccurrenceSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- // add lifelines
- if (UMLElementTypes.Lifeline_Shape == req.getElementType()) {
- CustomLifelineEditPart lifelineEditPart = (CustomLifelineEditPart) getHost();
- if (lifelineEditPart.isInlineCapability()) {
- CustomLifelineCreateCommand cmd = new CustomLifelineCreateCommand(req, DiagramUtils.getDiagramFrom(getHost()));
- cmd.setAvailableProperties(lifelineEditPart.getAvailableProperties());
- return getGEFWrapper(cmd);
- }
- }
- // add DurationObservation/Constraint
- if (UMLElementTypes.DurationConstraint_Shape_CN == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- // Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364826
- // if(UMLElementTypes.DurationObservation_Shape == req.getElementType()) {
- // return getGEFWrapper(new DurationObservationCreateCommand(req));
- // }
- return super.getCreateCommand(req);
- }
-
- /**
- * @Override
- */
- @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) {
- Command command = new ICommandProxy(deleteCommand);
- command = LifelineMessageCreateHelper.restoreLifelineOnDelete(command, (LifelineEditPart) getHost());
- CompoundCommand deleteElementsCommand = new CompoundCommand();
- deleteElementsCommand.add(command);
- if (getHost() instanceof LifelineEditPart) {
- LifelineEditPart ep = (LifelineEditPart) getHost();
- SequenceDeleteHelper.destroyMessageEvents(deleteElementsCommand, ep, req.getEditingDomain());
- List children = ep.getChildren();
- for (Object obj : children) {
- if (obj instanceof AbstractExecutionSpecificationEditPart) {
- SequenceDeleteHelper.destroyMessageEvents(deleteElementsCommand, (AbstractExecutionSpecificationEditPart) obj, req.getEditingDomain());
- }
- if (obj instanceof DestructionOccurrenceSpecificationEditPart) {
- SequenceDeleteHelper.destroyMessageEvents(deleteElementsCommand, (DestructionOccurrenceSpecificationEditPart) obj, req.getEditingDomain());
- }
- }
- }
- return deleteElementsCommand;
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- // add general ordering
- if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new CustomGeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- // add general ordering
- if (UMLElementTypes.GeneralOrdering_Edge == req.getElementType()) {
- return getGEFWrapper(new CustomGeneralOrderingCreateCommand(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.
- *
- * @Override
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(req));
- // add general ordering
- case GeneralOrderingEditPart.VISUAL_ID:
- if (req.getNewRelationshipEnd() instanceof OccurrenceSpecification) {
- return getGEFWrapper(new GeneralOrderingReorientCommand(req));
- } else {
- return null;
- }
- }
- 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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
- /**
- * Fixed bugs about reconnect Message Found/Lost on a PartDecomposition.
- */
- @Override
- public boolean understandsRequest(Request request) {
- if (REQ_RECONNECT_SOURCE.equals(request.getType())) {
- ReconnectRequest reconnReq = (ReconnectRequest) request;
- Object model = reconnReq.getConnectionEditPart().getModel();
- // Source of Message Found should be always located on Interaction.
- if (model instanceof View && UMLVisualIDRegistry.getVisualID((View) model).equals(MessageFoundEditPart.VISUAL_ID)) {
- return false;
- }
- } else if (REQ_RECONNECT_TARGET.equals(request.getType())) {
- ReconnectRequest reconnReq = (ReconnectRequest) request;
- Object model = reconnReq.getConnectionEditPart().getModel();
- // Target of Message Lost should be always located on Interaction.
- if (model instanceof View && UMLVisualIDRegistry.getVisualID((View) model).equals(MessageLostEditPart.VISUAL_ID)) {
- return false;
- }
- }
- return super.understandsRequest(request);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageASyncItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageASyncItemSemanticEditPolicy.java
deleted file mode 100644
index 62a95723266..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageASyncItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.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.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageAsyncItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageAsync;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessageASyncItemSemanticEditPolicy extends MessageAsyncItemSemanticEditPolicy {
-
- /**
- * Added to add duration constraint
- *
- * @Override
- * add Duration Constraint
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.DurationConstraint_Shape_CN == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DurationObservation_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return null;
- }
-
- /**
- * the added code to delete the messageoccurencespecification when the message is deleted
- *
- * @Override
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req, getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @Override
- */
- @Override
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if (mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageCreateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageCreateItemSemanticEditPolicy.java
deleted file mode 100644
index 0a8fc7a913b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageCreateItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.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.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageCreateItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessageCreateItemSemanticEditPolicy extends MessageCreateItemSemanticEditPolicy {
-
- /**
- * Added to add duration constraint
- *
- * @Override
- * add Duration Constraint
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.DurationConstraint_Shape_CN == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DurationObservation_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- CompoundCommand destroyElementCommand = new CompoundCommand();
- Command deleteCommand = SequenceDeleteHelper.completeDeleteMessageCommand(req, getHost());
- destroyElementCommand.add(deleteCommand);
- return LifelineMessageCreateHelper.restoreLifelineOnMessageDelete(destroyElementCommand, getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @Override
- */
- @Override
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if (mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageDeleteItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageDeleteItemSemanticEditPolicy.java
deleted file mode 100644
index f59cd40f9ff..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageDeleteItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.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.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageDeleteItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessageDeleteItemSemanticEditPolicy extends MessageDeleteItemSemanticEditPolicy {
-
- /**
- * Added to add duration constraint
- *
- * @Override
- * add Duration Constraint
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.DurationConstraint_Shape_CN == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DurationObservation_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req, getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @Override
- */
- @Override
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if (mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageFoundItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageFoundItemSemanticEditPolicy.java
deleted file mode 100644
index fc8015a39cb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageFoundItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.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.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageFoundItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessageFoundItemSemanticEditPolicy extends MessageFoundItemSemanticEditPolicy {
-
- /**
- * Added to add duration constraint
- *
- * @Override
- * add Duration Constraint
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.DurationConstraint_Shape_CN == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DurationObservation_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req, getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @Override
- */
- @Override
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if (mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageLostItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageLostItemSemanticEditPolicy.java
deleted file mode 100644
index 92bc33816ff..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageLostItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.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.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageLostItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessageLostItemSemanticEditPolicy extends MessageLostItemSemanticEditPolicy {
-
- /**
- * Added to add duration constraint
- *
- * @Override
- * add Duration Constraint
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.DurationConstraint_Shape_CN == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DurationObservation_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req, getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @Override
- */
- @Override
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if (mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageReplyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageReplyItemSemanticEditPolicy.java
deleted file mode 100644
index 1fa84a276c5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageReplyItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.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.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageReplyItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessageReplyItemSemanticEditPolicy extends MessageReplyItemSemanticEditPolicy {
-
- /**
- * Added to add duration constraint
- *
- * @Override
- * add Duration Constraint
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.DurationConstraint_Shape_CN == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DurationObservation_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req, getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @Override
- */
- @Override
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if (mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageSyncItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageSyncItemSemanticEditPolicy.java
deleted file mode 100644
index 41c47deff85..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageSyncItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.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.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageSyncItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomMessageSyncItemSemanticEditPolicy extends MessageSyncItemSemanticEditPolicy {
-
- /**
- * Added to add duration constraint
- *
- * @Override
- * add Duration Constraint
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.DurationConstraint_Shape_CN == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DurationObservation_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req, getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @Override
- */
- @Override
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if (mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java
deleted file mode 100644
index 01cbb1794e6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-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.sequence.command.CustomInteractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.PackageItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomPackageItemSemanticEditPolicy extends PackageItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- if (UMLElementTypes.Interaction_Shape == req.getElementType()) {
- return getGEFWrapper(new CustomInteractionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomStateInvariantItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomStateInvariantItemSemanticEditPolicy.java
deleted file mode 100644
index 39e59a0ce69..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomStateInvariantItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.StateInvariantItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomStateInvariantItemSemanticEditPolicy extends StateInvariantItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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 org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomTimeConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomTimeConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 56c91f2883b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomTimeConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeConstraintItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomTimeConstraintItemSemanticEditPolicy extends TimeConstraintItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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 org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomTimeObservationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomTimeObservationItemSemanticEditPolicy.java
deleted file mode 100644
index 71a8afa48e7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomTimeObservationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeObservationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class CustomTimeObservationItemSemanticEditPolicy extends TimeObservationItemSemanticEditPolicy {
-
- /**
- * @Override
- */
- @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 org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @Override
- */
- @Override
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return getGEFWrapper(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @Override
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(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.
- *
- * @Override
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomCommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/GateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/GateItemSemanticEditPolicy.java
deleted file mode 100644
index 7dd212bb3e2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/GateItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
-
-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.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessage7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomMessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.Gate;
-
-/**
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * Constructor.
- *
- * @param elementType
- */
- public GateItemSemanticEditPolicy() {
- super(null);
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy#getSemanticCommand(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
- *
- * @param request
- * @return
- */
- @Override
- protected Command getSemanticCommand(IEditCommandRequest request) {
- if (request instanceof CreateRelationshipRequest) {
- return getCreateRelationshipCommand((CreateRelationshipRequest) request);
- } else if (request instanceof ReorientReferenceRelationshipRequest) {
- return getReorientReferenceRelationshipCommand((ReorientReferenceRelationshipRequest) request);
- } else if (request instanceof ReorientRelationshipRequest) {
- return getReorientRelationshipCommand((ReorientRelationshipRequest) request);
- }
- IEditCommandRequest completedRequest = completeRequest(request);
- Command semanticCommand = getSemanticCommandSwitch(completedRequest);
- if (completedRequest instanceof DestroyRequest) {
- DestroyRequest destroyRequest = (DestroyRequest) completedRequest;
- return shouldProceed(destroyRequest) ? addDeleteViewCommand(semanticCommand, destroyRequest) : null;
- }
- return semanticCommand;
- }
-
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- if (selectedEObject instanceof Gate && ((Gate) selectedEObject).getMessage() != null) {
- return UnexecutableCommand.INSTANCE;
- }
- 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;
- }
-
- /**
- * @param request
- * @return
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new CustomMessage7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * @param request
- * @return
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest request) {
- return super.getReorientReferenceRelationshipCommand(request);
- }
-
- /**
- * @param request
- * @return
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- if (UMLElementTypes.Message_SynchEdge == req.getElementType()) {
- return new ICommandProxy(new CustomMessageCreateCommand(req, req.getSource(), req.getTarget()));
- } else if (UMLElementTypes.Message_AsynchEdge == req.getElementType()) {
- return new ICommandProxy(new CustomMessage2CreateCommand(req, req.getSource(), req.getTarget()));
- } else if (UMLElementTypes.Message_ReplyEdge == req.getElementType()) {
- return new ICommandProxy(new CustomMessage3CreateCommand(req, req.getSource(), req.getTarget()));
- } else if (UMLElementTypes.Message_LostEdge == req.getElementType()) {
- return new ICommandProxy(new CustomMessage6CreateCommand(req, req.getSource(), req.getTarget()));
- } else if (UMLElementTypes.Message_FoundEdge == req.getElementType()) {
- return new ICommandProxy(new CustomMessage7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- return super.getCreateRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java
index f51fa0e6a9f..09c47f824f8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java
@@ -23,7 +23,7 @@ import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDLifelineXYLayoutEditPolicy;
public class CoRegionCombinedFragmentFigure extends RoundedCompartmentFigure {
@@ -117,7 +117,7 @@ public class CoRegionCombinedFragmentFigure extends RoundedCompartmentFigure {
@Override
public Dimension getMinimumSize(int wHint, int hHint) {
Rectangle bounds = new Rectangle();
- bounds.height = BRACKET_HEIGHT * 2 + LifelineXYLayoutEditPolicy.SPACING_HEIGHT;
+ bounds.height = BRACKET_HEIGHT * 2 + OLDLifelineXYLayoutEditPolicy.SPACING_HEIGHT;
bounds.width = -1;
return bounds.getSize();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java
index 9ec921c891c..eaac9b014ef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java
@@ -9,7 +9,7 @@
*
* Contributors:
* Atos Origin - Initial API and implementation
- * Céline Janssens (ALL4TEC) celine.janssens@all4tec.net - Bug 440230 : Label Margin
+ * C�line Janssens (ALL4TEC) celine.janssens@all4tec.net - Bug 440230 : Label Margin
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.figures;
@@ -33,25 +33,25 @@ public class CombinedFragmentFigure extends StereotypeInteractionFigure {
private WrappingLabel titleLabel;
private RectangleFigure header;
- @Override
- protected void createContents() {
- super.createContents();
- setShadow(false);
- interactionContentPane.setOutline(false);
- interactionContentPane.setOpaque(false);
- interactionContentPane.setBorder(null);
- }
+// @Override
+// protected void createContents() {
+// super.createContents();
+// setShadow(false);
+// interactionContentPane.setOutline(false);
+// interactionContentPane.setOpaque(false);
+// interactionContentPane.setBorder(null);
+// }
- @Override
- protected RectangleFigure createHeader() {
- header = super.createHeader();
- titleLabel = new PapyrusWrappingLabel();
- titleLabel.setAlignment(PositionConstants.RIGHT);
- titleLabel.setBorder(new MarginBorder(3, 0, 0, 3));
- titleLabel.setTextWrap(false);
- header.add(titleLabel, BorderLayout.RIGHT);
- return header;
- }
+// @Override
+// protected RectangleFigure createHeader() {
+// header = super.createHeader();
+// titleLabel = new PapyrusWrappingLabel();
+// titleLabel.setAlignment(PositionConstants.RIGHT);
+// titleLabel.setBorder(new MarginBorder(3, 0, 0, 3));
+// titleLabel.setTextWrap(false);
+// header.add(titleLabel, BorderLayout.RIGHT);
+// return header;
+// }
public WrappingLabel getTitleLabel() {
return titleLabel;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DestructionEventFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DestructionEventFigure.java
index 40e65fea04c..6d0e8df220e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DestructionEventFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DestructionEventFigure.java
@@ -13,6 +13,7 @@
package org.eclipse.papyrus.uml.diagram.sequence.figures;
import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Dimension;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -29,7 +30,14 @@ public class DestructionEventFigure extends org.eclipse.draw2d.Figure {
public DestructionEventFigure() {
super();
}
-
+ /**
+ * @return a <code>Dimension</code> that represents the minimum or default size of
+ * this figure.
+ * @since 3.0
+ */
+ public Dimension getDefaultSize() {
+ return new Dimension(40,40);
+ }
/**
* The stop is a cross
*
@@ -39,18 +47,9 @@ public class DestructionEventFigure extends org.eclipse.draw2d.Figure {
protected void paintFigure(Graphics graphics) {
super.paintFigure(graphics);
graphics.pushState();
- int width = bounds.width;
- int height = bounds.height;
- if (width > height) {
- width = height;
- } else if (width < height) {
- height = width;
- }
- int x = bounds.x + bounds.width / 2 - width / 2;
- int y = bounds.y + bounds.height / 2 - height / 2;
- graphics.setLineWidth(lineWidth);
- graphics.drawLine(x, y, x + width, y + height);
- graphics.drawLine(x + width, y, x, y + height);
+ graphics.setLineWidth(2);
+ graphics.drawLine(bounds.x, bounds.y, bounds.x + bounds.width, bounds.y + bounds.height);
+ graphics.drawLine(bounds.x, bounds.y+ bounds.height, bounds.x + bounds.width, bounds.y);
graphics.popState();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/ExecutionSpecificationNodePlate.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/ExecutionSpecificationNodePlate.java
new file mode 100644
index 00000000000..b05f8f1ff01
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/ExecutionSpecificationNodePlate.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.figures;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.LinkLFSVGNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
+
+/**
+ * @author PT202707
+ *
+ */
+public class ExecutionSpecificationNodePlate extends LinkLFSVGNodePlateFigure implements ILifelineInternalFigure {
+ /**
+ * Constructor.
+ *
+ * @param hostEP
+ * @param width
+ * @param height
+ */
+ public ExecutionSpecificationNodePlate(GraphicalEditPart hostEP, int width, int height) {
+ super(hostEP, width,height);
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#isDefaultAnchorArea(org.eclipse.draw2d.geometry.PrecisionPoint)
+ */
+ @Override
+ protected boolean isDefaultAnchorArea(PrecisionPoint p) {
+ return false;
+ }
+
+ @Override
+ public ConnectionAnchor getConnectionAnchor(String terminal) {
+ // Use FixedAnchorEx for MessageSync, this will be invoked by mapConnectionAnchor(termial) operation.
+ if (terminal != null && terminal.indexOf("{") != -1 && terminal.indexOf("}") != -1) {
+ int position = AnchorHelper.FixedAnchorEx.parsePosition(terminal);
+ if (PositionConstants.TOP == position || PositionConstants.BOTTOM == position) {
+ return new AnchorHelper.FixedAnchorEx(this, position);
+ }
+ }
+ return super.getConnectionAnchor(terminal);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CombinedFragmentEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/ILifelineInternalFigure.java
index 163db250ae6..7ae1dce14da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CombinedFragmentEditHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/ILifelineInternalFigure.java
@@ -1,20 +1,23 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class CombinedFragmentEditHelper extends UMLBaseEditHelper {
-}
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.figures;
+
+/**
+ * This a specific kind of figure that are internal to the lifeline and must must managed especially in the {@link LifeLineLayoutManager}
+ * @since 3.0
+ *
+ */
+public interface ILifelineInternalFigure {
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionOperandFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionOperandFigure.java
index 4bdc846c357..eb9f908f255 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionOperandFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionOperandFigure.java
@@ -69,6 +69,6 @@ public class InteractionOperandFigure extends RoundedCompartmentFigure {
IMapMode mapMode = SequenceMapModeUtil.getMapModel(this);
fInteractionConstraintLabel = new WrappingLabel();
fInteractionConstraintLabel.setText("");
- this.add(fInteractionConstraintLabel, new Rectangle(mapMode.DPtoLP(10), mapMode.DPtoLP(10), mapMode.DPtoLP(200), mapMode.DPtoLP(20)));
+ this.add(fInteractionConstraintLabel, new Rectangle(10,10,200,20));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionUseRectangleFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionUseRectangleFigure.java
index 8bd8e8a51e3..16f71760591 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionUseRectangleFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionUseRectangleFigure.java
@@ -34,20 +34,20 @@ public class InteractionUseRectangleFigure extends StereotypeInteractionFigure {
* @see
* org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionRectangleFigure#createContentPane()
*/
- @Override
- protected RectangleFigure createContentPane() {
- // Create the ContentPane
- RectangleFigure contentPane = new RectangleFigure();
- contentPane.setOutline(false);
- contentPane.setFill(false);
- contentPane.setLayoutManager(new StackLayout());
- // Create the centered label
- centerLabel = new WrappingLabel();
- centerLabel.setAlignment(PositionConstants.CENTER);
- // Add the label to the contentPane
- contentPane.add(centerLabel);
- return contentPane;
- }
+// @Override
+// protected RectangleFigure createContentPane() {
+// // Create the ContentPane
+// RectangleFigure contentPane = new RectangleFigure();
+// contentPane.setOutline(false);
+// contentPane.setFill(false);
+// contentPane.setLayoutManager(new StackLayout());
+// // Create the centered label
+// centerLabel = new WrappingLabel();
+// centerLabel.setAlignment(PositionConstants.CENTER);
+// // Add the label to the contentPane
+// contentPane.add(centerLabel);
+// return contentPane;
+// }
public WrappingLabel getCenterLabel() {
return centerLabel;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifeLineLayoutManager.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifeLineLayoutManager.java
new file mode 100644
index 00000000000..b38ee3c1f93
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifeLineLayoutManager.java
@@ -0,0 +1,210 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.figures;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.ScalableCompartmentFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager;
+
+/**
+ * @since 3.0
+ * This class manage as {@link AutomaticCompartmentLayoutManager} but layout figure as XY layout if there are {@link ILifelineInternalFigure}
+ */
+public class LifeLineLayoutManager extends AutomaticCompartmentLayoutManager {
+ private int bottomHeaderY=0;
+ /** The layout contraints */
+ protected Map<IFigure, Rectangle> constraints = new HashMap<IFigure, Rectangle>();
+
+ public int getBottomHeader(){
+ return bottomHeaderY;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager#layout(org.eclipse.draw2d.IFigure)
+ *
+ * @param container
+ */
+ @Override
+ public void layout(IFigure container) {
+ // TODO Auto-generated method stub
+ super.layout(container);
+ layoutXYFigure(container);
+ }
+
+ /* Fills the given bound data as a non-compartment child
+ *
+ * @param container
+ * The container to layout
+ * @param bound
+ * The bound to fill
+ * @param previous
+ * The previously filled bound
+ */
+ protected void fillBoundsForOther(IFigure container, Rectangle bound, Rectangle previous) {
+ bound.x = container.getBounds().x + 1; //+1, see bug 490318, restore +1 to fix shift from Papyrus Luna to Papyrus Mars
+ bound.width = container.getBounds().width;
+ if (previous == null) {
+ bound.y = container.getBounds().y + 3;
+ } else {
+ bound.y = previous.getBottomLeft().y + 1;
+ }
+ }
+
+ /**
+ * @see org.eclipse.draw2d.AbstractLayout#setConstraint(org.eclipse.draw2d.IFigure, java.lang.Object)
+ *
+ * @param child
+ * @param constraint
+ */
+ @Override
+ public void setConstraint(IFigure child, Object constraint) {
+ if(child instanceof SelectableBorderedNodeFigure){
+ if(((SelectableBorderedNodeFigure)child).getMainFigure() instanceof ILifelineInternalFigure){
+ if( constraint instanceof Rectangle){
+ constraints.put(child, (Rectangle)constraint);
+ }
+ }
+ }
+ super.setConstraint(child, constraint);
+ }
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager#fillBoundsForCompartment(org.eclipse.draw2d.IFigure, org.eclipse.draw2d.geometry.Rectangle, org.eclipse.draw2d.geometry.Rectangle, double)
+ *
+ * @param container
+ * @param bound
+ * @param previous
+ * @param ratio
+ */
+ @Override
+ protected void fillBoundsForCompartment(IFigure container, Rectangle bound, Rectangle previous, double ratio) {
+ fillBoundsForOther(container, bound, previous);
+ //bound.height = (int) (bound.height / ratio);
+ if (previous == null) {
+ bound.y = container.getBounds().y;
+ }
+ }
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager#layoutDefault(org.eclipse.draw2d.IFigure)
+ *
+ * @param container
+ */
+ @Override
+ protected void layoutDefault(IFigure container) {
+ ScalableCompartmentFigure symbolFigure=null;
+ int i=0;
+ while (symbolFigure==null&&i<container.getChildren().size() ){
+ if (container.getChildren().get(i) instanceof ScalableCompartmentFigure){
+ symbolFigure=(ScalableCompartmentFigure)container.getChildren().get(i);
+ }
+ i++;
+ }
+ super.layoutDefault(container);
+
+ //change coordinate to set the symbol at the top
+ if( symbolFigure!=null){
+ symbolFigure.getBounds().setY(container.getBounds().getTop().y);
+ }
+ Rectangle containerBounds= container.getBounds();
+ IFigure previous = null;
+ for (IFigure child : visibleOthers) {
+ Rectangle bound = new Rectangle();
+ if (previous != null) {
+ if( child.equals(symbolFigure)){
+ bound.y = containerBounds.y+3;
+ }
+ else{
+ bound.y = previous.getBounds().getBottomLeft().y + 1;
+ bound.x = containerBounds.x + 1;
+ bound.width = containerBounds.width;
+ bound.height=child.getBounds().height;
+ bottomHeaderY=bound.y+bound.height;
+ }
+ } else {
+ bound.x = containerBounds.x + 1;
+ //here the symbo may be present
+ if( symbolFigure!=null){
+ bound.y = containerBounds.y+3+symbolFigure.getBounds().height;
+ }
+ else{
+ bound.y = containerBounds.y+3;
+ }
+
+ bound.width = containerBounds.width;
+ bound.height=child.getBounds().height;
+ }
+ child.setBounds(bound);
+ previous = child;
+ }
+
+
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager#layoutOthers(org.eclipse.draw2d.geometry.Rectangle)
+ *
+ * @param container
+ */
+ @Override
+ protected void layoutOthers(Rectangle container) {
+ super.layoutOthers(container);
+
+ IFigure previous = null;
+ for (IFigure child : visibleOthers) {
+ Rectangle bound = new Rectangle();
+ if (previous != null) {
+ bound.y = previous.getBounds().getBottomLeft().y + 1;
+ bound.x = container.x + 1;
+ bound.width = container.width;
+ bound.height=child.getBounds().height;
+ bottomHeaderY=bound.y+bound.height;
+ } else {
+ bound.x = container.x + 1;
+ // in the case where the content is grater than the container
+ // it is forbidden to change the y coordinate
+ bound.y = container.y+3;
+ bound.width = container.width;
+ bound.height=child.getBounds().height;
+ bottomHeaderY=bound.y+bound.height;
+ }
+ child.setBounds(bound);
+ previous = child;
+ }
+ }
+
+
+ /**
+ * all {@link ILifelineInternalFigure} must be managed as XY layout by respecting their position and size
+ * @param container
+ */
+ protected void layoutXYFigure(IFigure container) {
+ for (Object child : container.getChildren()) {
+ if(child instanceof BorderedNodeFigure){
+ if(((BorderedNodeFigure)child).getMainFigure() instanceof ILifelineInternalFigure){
+ Rectangle theConstraint=constraints.get(child).getCopy();
+ if(theConstraint!=null){
+ theConstraint.translate(container.getBounds().getTopLeft());
+ ((BorderedNodeFigure) child).setBounds(theConstraint);
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifelineFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifelineFigure.java
index 14dcd898223..96964e7fbf3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifelineFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifelineFigure.java
@@ -20,29 +20,36 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.LayoutManager;
import org.eclipse.draw2d.MarginBorder;
import org.eclipse.draw2d.OrderedLayout;
+import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.RectangleFigure;
import org.eclipse.draw2d.StackLayout;
import org.eclipse.draw2d.ToolbarLayout;
import org.eclipse.draw2d.TreeSearch;
+import org.eclipse.draw2d.XYLayout;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;
import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.SashWindowsEventsProvider.SashWindowsContainerChangedListeners;
import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.RectangularShadowBorder;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.swt.graphics.Color;
/**
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class LifelineFigure extends NodeNamedElementFigure {
-
+public class LifelineFigure extends RoundedCompartmentFigure {
+ @Deprecated
protected RectangleFigure fFigureLifelineNameContainerFigure;
-
+ @Deprecated
protected RectangleFigure fFigureExecutionsContainerFigure;
-
+ @Deprecated
protected LifelineDotLineCustomFigure fFigureLifelineDotLineFigure;
/**
@@ -50,22 +57,85 @@ public class LifelineFigure extends NodeNamedElementFigure {
*
*/
public LifelineFigure() {
+ super();
+ setLayoutManager(new LifeLineLayoutManager());
+ // This line has been used in order to display combinedFragment
+ setTransparency(100);
}
- public int getNameContainerPreferredHeight(int wHint) {
- return fFigureLifelineNameContainerFigure.getPreferredSize(wHint, -1).height;
+ /**
+ * This method has been used in order to display combinedFragment
+ * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#setTransparency(int)
+ */
+ @Override
+ public void setTransparency(int transparency) {
+ super.setTransparency(100);
+ }
+ /**
+ * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#getPolygonPoints()
+ */
+ @Override
+ public PointList getPolygonPoints() {
+ PointList points = new PointList(8);
+ points.addPoint(new Point(this.getBounds().x, this.getBounds().y));
+ points.addPoint(new Point(this.getBounds().x+this.getBounds().width, this.getBounds().y));
+ points.addPoint(new Point(this.getBounds().x+this.getBounds().width,((LifeLineLayoutManager)this.getLifeLineLayoutManager()).getBottomHeader()));
+ points.addPoint(new Point(this.getBounds().x+this.getBounds().width/2,((LifeLineLayoutManager)this.getLifeLineLayoutManager()).getBottomHeader()));
+ points.addPoint(new Point(this.getBounds().x+this.getBounds().width/2, this.getBounds().y+this.getBounds().height));
+ points.addPoint(new Point(this.getBounds().x+this.getBounds().width/2,((LifeLineLayoutManager)this.getLifeLineLayoutManager()).getBottomHeader()));
+ points.addPoint(new Point(this.getBounds().x,((LifeLineLayoutManager)this.getLifeLineLayoutManager()).getBottomHeader()));
+ points.addPoint(new Point(this.getBounds().x, this.getBounds().y));
+ return points;
+ }
+ /**
+ * {@inheritDoc}
+ */
+ public void paint(Graphics graphics) {
+ super.paint(graphics);
+ Rectangle rect = this.getBounds();
+ graphics.pushState();
+ graphics.setForegroundColor(getForegroundColor());
+ // do not forget to set line width to 1, if not the color will
+ // change because of the anti-aliasing
+ graphics.setLineWidth(1);
+
+ //graphics.setLineStyle(Graphics.LINE_DASH);
+ graphics.drawRectangle(rect.x,rect.y, rect.width-1,((LifeLineLayoutManager)this.getLifeLineLayoutManager()).getBottomHeader()- rect.y);
+ graphics.setLineDash(new int[] { 5, 5 });
+ graphics.drawLine(new Point(rect.x + rect.width/2,((LifeLineLayoutManager)this.getLifeLineLayoutManager()).getBottomHeader()), new Point(rect.x + rect.width/2, rect.y + rect.height - 1));
+ graphics.popState();
}
/**
- * Get the rectangle which contains all labels
+ * @see org.eclipse.draw2d.Figure#getLayoutManager()
*
- * @see org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure#getDefaultLabelsContainer()
- * @return lifeline labels rectangle
+ * @return
*/
@Override
- protected IFigure getDefaultLabelsContainer() {
- return getFigureLifelineNameContainerFigure();
+ public LayoutManager getLayoutManager() {
+
+ // TODO Auto-generated method stub
+ return new XYLayout();
+ }
+
+ public LayoutManager getLifeLineLayoutManager() {
+ // TODO Auto-generated method stub
+ return super.getLayoutManager();
}
+ // public int getNameContainerPreferredHeight(int wHint) {
+ // return fFigureLifelineNameContainerFigure.getPreferredSize(wHint, -1).height;
+ // }
+
+ // /**
+ // * Get the rectangle which contains all labels
+ // *
+ // * @see org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure#getDefaultLabelsContainer()
+ // * @return lifeline labels rectangle
+ // */
+ // @Override
+ // protected IFigure getDefaultLabelsContainer() {
+ // return getFigureLifelineNameContainerFigure();
+ // }
/**
* Create the composite structure.
@@ -74,11 +144,12 @@ public class LifelineFigure extends NodeNamedElementFigure {
*/
@Override
protected void createCompositeFigureStructure() {
- BorderLayout layoutThis = new BorderLayout();
- this.setLayoutManager(layoutThis);
- this.setOpaque(false);
- this.setPreferredSize(new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(200)));
- createContents();
+ super.createCompositeFigureStructure();
+ // BorderLayout layoutThis = new BorderLayout();
+ // this.setLayoutManager(layoutThis);
+ // this.setOpaque(false);
+ // this.setPreferredSize(new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(200)));
+ // createContents();
}
/**
@@ -128,73 +199,74 @@ public class LifelineFigure extends NodeNamedElementFigure {
*/
@Override
protected LayoutManager getPropertiesCompartmentLayout() {
- ToolbarLayout layout = new ToolbarLayout(false);
- layout.setStretchMinorAxis(true);
- return layout;
+ // ToolbarLayout layout = new ToolbarLayout(false);
+ // layout.setStretchMinorAxis(true);
+ // return layout;
+ return super.getPropertiesCompartmentLayout();
}
- /**
- * Create the name label with width wrap
- *
- * @see org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure#createNameLabel()
- */
- @Override
- protected void createNameLabel() {
- super.createNameLabel();
- }
+ // /**
+ // * Create the name label with width wrap
+ // *
+ // * @see org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure#createNameLabel()
+ // */
+ // @Override
+ // protected void createNameLabel() {
+ // super.createNameLabel();
+ // }
/**
* remove label creation, change layout
*/
private void createContents() {
- fFigureLifelineNameContainerFigure = new RectangleFigure() {
-
- @Override
- protected void fillShape(Graphics graphics) {
- graphics.pushState();
- applyTransparency(graphics);
- graphics.fillRectangle(getBounds());
- graphics.popState();
- }
- };
- // do not fill to enable gradient
- fFigureLifelineNameContainerFigure.setFill(false);
- fFigureLifelineNameContainerFigure.setBorder(new MarginBorder(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7)));
- fFigureLifelineNameContainerFigure.setPreferredSize(new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(30)));
- this.add(fFigureLifelineNameContainerFigure, BorderLayout.TOP);
- // change layout
- ToolbarLayout layout = new ToolbarLayout(false);
- layout.setMinorAlignment(OrderedLayout.ALIGN_CENTER);
- fFigureLifelineNameContainerFigure.setLayoutManager(layout);
- // remove label creation (created by parent figure)
- // fFigureLifelineLabelFigure = new WrappingLabel();
- //
- //
- //
- //
- // fFigureLifelineLabelFigure.setText("<...>");
- //
+ // fFigureLifelineNameContainerFigure = new RectangleFigure() {
//
- //
- //
- // fFigureLifelineLabelFigure.setTextWrap(true);
- //
- //
- //
- //
- // fFigureLifelineLabelFigure.setAlignment(PositionConstants.CENTER);
- //
- //
- //
- // fFigureLifelineNameContainerFigure.add(fFigureLifelineLabelFigure);
- fFigureExecutionsContainerFigure = new RectangleFigure();
- fFigureExecutionsContainerFigure.setFill(false);
- fFigureExecutionsContainerFigure.setOutline(false);
- fFigureExecutionsContainerFigure.setLineWidth(1);
- this.add(fFigureExecutionsContainerFigure, BorderLayout.CENTER);
- fFigureExecutionsContainerFigure.setLayoutManager(new StackLayout());
- fFigureLifelineDotLineFigure = new LifelineDotLineCustomFigure();
- fFigureExecutionsContainerFigure.add(fFigureLifelineDotLineFigure);
+ // @Override
+ // protected void fillShape(Graphics graphics) {
+ // graphics.pushState();
+ // applyTransparency(graphics);
+ // graphics.fillRectangle(getBounds());
+ // graphics.popState();
+ // }
+ // };
+ // // do not fill to enable gradient
+ // fFigureLifelineNameContainerFigure.setFill(false);
+ // fFigureLifelineNameContainerFigure.setBorder(new MarginBorder(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7)));
+ // fFigureLifelineNameContainerFigure.setPreferredSize(new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(30)));
+ // //this.add(fFigureLifelineNameContainerFigure, BorderLayout.TOP);
+ // // change layout
+ // ToolbarLayout layout = new ToolbarLayout(false);
+ // layout.setMinorAlignment(OrderedLayout.ALIGN_CENTER);
+ // fFigureLifelineNameContainerFigure.setLayoutManager(layout);
+ // // remove label creation (created by parent figure)
+ // // fFigureLifelineLabelFigure = new WrappingLabel();
+ // //
+ // //
+ // //
+ // //
+ // // fFigureLifelineLabelFigure.setText("<...>");
+ // //
+ // //
+ // //
+ // //
+ // // fFigureLifelineLabelFigure.setTextWrap(true);
+ // //
+ // //
+ // //
+ // //
+ // // fFigureLifelineLabelFigure.setAlignment(PositionConstants.CENTER);
+ // //
+ // //
+ // //
+ // // fFigureLifelineNameContainerFigure.add(fFigureLifelineLabelFigure);
+ // fFigureExecutionsContainerFigure = new RectangleFigure();
+ // fFigureExecutionsContainerFigure.setFill(false);
+ // fFigureExecutionsContainerFigure.setOutline(false);
+ // fFigureExecutionsContainerFigure.setLineWidth(1);
+ // //this.add(fFigureExecutionsContainerFigure, BorderLayout.CENTER);
+ // fFigureExecutionsContainerFigure.setLayoutManager(new StackLayout());
+ // fFigureLifelineDotLineFigure = new LifelineDotLineCustomFigure();
+ // fFigureExecutionsContainerFigure.add(fFigureLifelineDotLineFigure);
}
protected IMapMode getMapMode() {
@@ -207,15 +279,15 @@ public class LifelineFigure extends NodeNamedElementFigure {
public WrappingLabel getFigureLifelineLabelFigure() {
return getNameLabel();
}
-
+ @Deprecated
public RectangleFigure getFigureLifelineNameContainerFigure() {
return fFigureLifelineNameContainerFigure;
}
-
+ @Deprecated
public RectangleFigure getFigureExecutionsContainerFigure() {
return fFigureExecutionsContainerFigure;
}
-
+ @Deprecated
public LifelineDotLineCustomFigure getFigureLifelineDotLineFigure() {
return fFigureLifelineDotLineFigure;
}
@@ -226,60 +298,7 @@ public class LifelineFigure extends NodeNamedElementFigure {
return;
}
super.setLineWidth(w);
- fFigureLifelineNameContainerFigure.setLineWidth(w);
- fFigureLifelineDotLineFigure.setLineWidth(w);
}
- @Override
- public void setShadow(boolean shadow) {
- if (!shadow) {
- fFigureLifelineNameContainerFigure.setBorder(new MarginBorder(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7)));
- } else {
- RectangularShadowBorder b = new RectangularShadowBorder(3, getForegroundColor()) {
-
- @Override
- public Insets getInsets(IFigure figure) {
- Insets insetsNew = new Insets(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7));
- insetsNew.bottom = MapModeUtil.getMapMode(figure).DPtoLP(insetsNew.bottom + 3);
- insetsNew.right = MapModeUtil.getMapMode(figure).DPtoLP(insetsNew.right + 3);
- return insetsNew;
- }
- };
- fFigureLifelineNameContainerFigure.setBorder(b);
- }
- }
-
- @Override
- public IFigure findMouseEventTargetAt(int x, int y) {
- // check children first instead of self
- IFigure f = findMouseEventTargetInDescendantsAt(x, y);
- if (f != null) {
- return f;
- }
- if (!containsPoint(x, y)) {
- return null;
- }
- if (isMouseEventTarget()) {
- return this;
- }
- return null;
- }
-
- @Override
- public IFigure findFigureAt(int x, int y, TreeSearch search) {
- if (search.prune(this)) {
- return null;
- }
- IFigure child = findDescendantAtExcluding(x, y, search);
- if (child != null) {
- return child;
- }
- if (!containsPoint(x, y)) {
- return null;
- }
- if (search.accept(this)) {
- return this;
- }
- return null;
- }
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageAsync.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageAsync.java
index 152a2280159..00bd5200662 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageAsync.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageAsync.java
@@ -27,13 +27,23 @@ public class MessageAsync extends MessageFigure {
@Override
protected RotatableDecoration createTargetDecoration() {
PolylineDecoration df = new PolylineDecoration();
- df.setForegroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
+// df.setForegroundColor(getForegroundColor());
+// PointList pl = new PointList();
+// pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
+// pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
+// pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
+// df.setTemplate(pl);
+// df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
return df;
}
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.sequence.figures.MessageFigure#createSourceDecoration()
+ *
+ * @return
+ */
+ @Override
+ protected RotatableDecoration createSourceDecoration() {
+ return null;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageCreate.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageCreate.java
index d82c038359e..bcd668383ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageCreate.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageCreate.java
@@ -53,11 +53,21 @@ public class MessageCreate extends MessageFigure {
PolylineDecoration df = new PolylineDecoration();
df.setForegroundColor(getForegroundColor());
PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
+// pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
+// pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
+// pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
+// df.setTemplate(pl);
+// df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
return df;
}
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.sequence.figures.MessageFigure#createSourceDecoration()
+ *
+ * @return
+ */
+ @Override
+ protected RotatableDecoration createSourceDecoration() {
+ return null;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageDelete.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageDelete.java
index d53e06483cd..6736def82d4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageDelete.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageDelete.java
@@ -52,13 +52,16 @@ public class MessageDelete extends MessageFigure {
df.setFill(true);
df.setForegroundColor(getForegroundColor());
df.setBackgroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
return df;
}
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.sequence.figures.MessageFigure#createSourceDecoration()
+ *
+ * @return
+ */
+ @Override
+ protected RotatableDecoration createSourceDecoration() {
+ return null;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageFigure.java
index e3927c65b90..a525156695f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageFigure.java
@@ -53,13 +53,23 @@ public abstract class MessageFigure extends UMLEdgeFigure {
public MessageFigure(IMapMode mapMode) {
this.mapMode = mapMode;
createContents();
- setTargetDecoration(createTargetDecoration());
+ if(createTargetDecoration()!=null){
+ setTargetDecoration(createTargetDecoration());
+ }
+ if(createSourceDecoration()!=null){
+ setSourceDecoration(createSourceDecoration());
+ }
}
@Override
public void resetStyle() {
super.resetStyle();
- setTargetDecoration(createTargetDecoration());
+ if(createTargetDecoration()!=null){
+ setTargetDecoration(createTargetDecoration());
+ }
+ if(createSourceDecoration()!=null){
+ setSourceDecoration(createSourceDecoration());
+ }
}
@Override
@@ -87,6 +97,7 @@ public abstract class MessageFigure extends UMLEdgeFigure {
}
protected abstract RotatableDecoration createTargetDecoration();
+ protected abstract RotatableDecoration createSourceDecoration();
@Override
protected void createContents() {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageFound.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageFound.java
index ea0036bb42a..4f87686143f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageFound.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageFound.java
@@ -43,10 +43,12 @@ public class MessageFound extends MessageFigure {
setSourceDecoration(createSourceDecoration());
}
- private RotatableDecoration createSourceDecoration() {
+ /**
+ * @since 3.0
+ */
+ protected RotatableDecoration createSourceDecoration() {
EllipseDecoration df = new EllipseDecoration();
df.setAlwaysFill(true);
- df.setPreferredSize(new Dimension(10, 10));
return df;
}
@@ -59,12 +61,6 @@ public class MessageFound extends MessageFigure {
protected RotatableDecoration createTargetDecoration() {
PolylineDecoration df = new PolylineDecoration();
df.setForegroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
return df;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageLost.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageLost.java
index 1640bdda598..c4fb4849aa3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageLost.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageLost.java
@@ -53,16 +53,26 @@ public class MessageLost extends MessageFigure {
protected RotatableDecoration createTargetDecoration() {
EllipseDecoration df = new EllipseDecoration();
df.setAlwaysFill(true);
- df.setPreferredSize(new Dimension(10, 10));
+ //df.setPreferredSize(new Dimension(10, 10));
add(df, new ArrowLocator(this, ConnectionLocator.TARGET)); // child figure
PolylineDecoration arrow = new PolylineDecoration();
arrow.setForegroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- arrow.setTemplate(pl);
- arrow.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
+// PointList pl = new PointList();
+// pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
+// pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
+// pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
+// arrow.setTemplate(pl);
+// arrow.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
return arrow;
}
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.sequence.figures.MessageFigure#createSourceDecoration()
+ *
+ * @return
+ */
+ @Override
+ protected RotatableDecoration createSourceDecoration() {
+ return null;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageReply.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageReply.java
index 5661b187f62..59918ecdea1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageReply.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageReply.java
@@ -52,12 +52,22 @@ public class MessageReply extends MessageFigure {
protected RotatableDecoration createTargetDecoration() {
PolylineDecoration df = new PolylineDecoration();
df.setForegroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
+// PointList pl = new PointList();
+// pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
+// pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
+// pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
+// df.setTemplate(pl);
+// df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
return df;
}
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.sequence.figures.MessageFigure#createSourceDecoration()
+ *
+ * @return
+ */
+ @Override
+ protected RotatableDecoration createSourceDecoration() {
+ return null;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageSync.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageSync.java
index 07199d45942..12d62af7820 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageSync.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/MessageSync.java
@@ -52,13 +52,16 @@ public class MessageSync extends MessageFigure {
df.setFill(true);
df.setForegroundColor(getForegroundColor());
df.setBackgroundColor(ColorConstants.black);
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
return df;
}
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.sequence.figures.MessageFigure#createSourceDecoration()
+ *
+ * @return
+ */
+ @Override
+ protected RotatableDecoration createSourceDecoration() {
+ return null;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/SquareFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/SquareFigure.java
new file mode 100644
index 00000000000..ea02a161397
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/SquareFigure.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.figures;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.LineBorder;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.gef.ui.figures.SlidableAnchor;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+
+/**
+ * @author PT202707
+ *
+ */
+public class SquareFigure extends RoundedCompartmentFigure {
+ static Dimension DEFAULT_SIZE=new Dimension(10,10);
+ /**
+ * Constructor.
+ *
+ */
+ public SquareFigure() {
+ setBorder(new LineBorder(ColorConstants.black));
+ setPreferredSize(DEFAULT_SIZE);
+ }
+
+ @Override
+ protected ConnectionAnchor createDefaultAnchor() {
+ return new SlidableAnchor(this) {
+
+ @Override
+ public Point getLocation(Point reference) {
+ Point location = getLocation(new PrecisionPoint(getBox().getCenter()), reference);
+ if (location == null) {
+ location = getBox().getCenter();
+ }
+ return location;
+ }
+ };
+ }
+
+ @Override
+ protected ConnectionAnchor createAnchor(PrecisionPoint p) {
+ if (p == null) {
+ return createDefaultAnchor();
+ }
+ return new SlidableAnchor(this, p) {
+
+ @Override
+ public Point getLocation(Point reference) {
+ Rectangle box = getBox();
+ Point location = getLocation(new PrecisionPoint(box.getCenter()), reference);
+ if (location == null) {
+ location = getBox().getCenter();
+ }
+ return location;
+ }
+ };
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/StereotypeInteractionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/StereotypeInteractionFigure.java
index d214680a106..6c2a9b865a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/StereotypeInteractionFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/StereotypeInteractionFigure.java
@@ -47,140 +47,140 @@ public class StereotypeInteractionFigure extends InteractionRectangleFigure {
public StereotypeInteractionFigure() {
}
- /**
- * Display stereotype on top of the name.
- *
- * Return a RectangleFigure has BorderLayout.
- */
- @Override
- protected RectangleFigure createHeader() {
- interactionLabel = new PapyrusWrappingLabel() {
-
- public void setFont(Font f) {
- super.setFont(f);
- if (stereotypesLabel != null) {
- stereotypesLabel.setFont(f);
- }
- if (stereotypePropertiesInBraceContent != null) {
- stereotypePropertiesInBraceContent.setFont(f);
- }
- }
- };
- interactionLabel.setAlignment(PositionConstants.CENTER);
- interactionLabel.setBorder(new MarginBorder(1, 1, 3, 3));
-
- interactionLabelContainer = new InteractionFigure() {
-
- @Override
- protected void outlineShape(Graphics graphics) {
- Rectangle r = getBounds();
-
- int labelWidth = -1;
-
- for (Object obj : getChildren()) {
- if (obj instanceof Label) {// Stereotype labels
- labelWidth = Math.max(labelWidth, ((Label) obj).getPreferredSize().width);
- } else if (obj instanceof WrappingLabel) {
- WrappingLabel wLabel = (WrappingLabel) obj;
- labelWidth = Math.max(labelWidth, wLabel.getPreferredSize().width);
- }
- }
-
- // case the size of the label is 0 or -1 (no label)
- if (labelWidth <= 0) {
- labelWidth = r.width / 4;
- } else if (labelWidth > r.width) {
- labelWidth = r.width;
- }
-
- PointList points = new PointList();
-
- Point verticalStart = new Point();
- Point verticalEnd = new Point();
- Point diagonalStart = new Point();
- Point diagonalEnd = new Point();
- Point horizontalStart = new Point();
- Point horizontalEnd = new Point();
-
- verticalStart.x = r.x + labelWidth + 15;
- verticalStart.y = r.y;
- points.addPoint(verticalStart);
-
- verticalEnd.x = verticalStart.x;
- verticalEnd.y = verticalStart.y + r.height / 2 + 3;
- points.addPoint(verticalEnd);
-
- diagonalStart.x = verticalEnd.x;
- diagonalStart.y = verticalEnd.y;
- points.addPoint(diagonalStart);
-
- diagonalEnd.x = diagonalStart.x - r.height / 2 + 3;
- diagonalEnd.y = r.y + r.height - 1;
- points.addPoint(diagonalEnd);
-
- horizontalStart.x = diagonalEnd.x;
- horizontalStart.y = diagonalEnd.y;
- points.addPoint(horizontalStart);
-
- horizontalEnd.x = r.x;
- horizontalEnd.y = horizontalStart.y;
- points.addPoint(horizontalEnd);
-
- graphics.drawPolyline(points);
- }
- };
- interactionLabelContainer.setBorder(new MarginBorder(3, 3, 3, 15));
- interactionLabelContainer.setLayoutManager(new LeftToolbarLayout());
-
- interactionLabelContainer.add(interactionLabel);
-
- Figure header = new Figure();
- // header.setBorder(new MarginBorder(1, 1, 0, 3));
- header.setLayoutManager(new ToolbarLayout(false));
- header.add(interactionLabelContainer);
-
- RectangleFigure container = new RectangleFigure();
- container.setOutline(false);
- container.setFill(false);
- container.setLayoutManager(new BorderLayout());
- container.add(header, BorderLayout.LEFT);
- return container;
- }
-
- @Override
- public void setStereotypes(String stereotypes) {
- if (stereotypes == null || stereotypes.trim().equals("")) {
- // Remove label if any
- if (this.stereotypesLabel != null) {
- getStereotypeLabelContainer().remove(this.stereotypesLabel);
- this.stereotypesLabel = null;
- }
- return;
- }
- super.setStereotypes(stereotypes);
- }
-
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- if (stereotypeProperties == null || stereotypeProperties.trim().equals("")) {
- // Remove label if any
- if (this.stereotypePropertiesInBraceContent != null) {
- getStereotypePropertiesInBraceLabelContainer().remove(this.stereotypePropertiesInBraceContent);
- this.stereotypePropertiesInBraceContent = null;
- }
- return;
- }
- super.setStereotypePropertiesInBrace(stereotypeProperties);
- }
-
- @Override
- protected IFigure getStereotypeLabelContainer() {
- return interactionLabelContainer;
- }
-
- @Override
- protected IFigure getStereotypePropertiesInBraceLabelContainer() {
- return interactionLabelContainer;
- }
+// /**
+// * Display stereotype on top of the name.
+// *
+// * Return a RectangleFigure has BorderLayout.
+// */
+// @Override
+// protected RectangleFigure createHeader() {
+// interactionLabel = new PapyrusWrappingLabel() {
+//
+// public void setFont(Font f) {
+// super.setFont(f);
+// if (stereotypesLabel != null) {
+// stereotypesLabel.setFont(f);
+// }
+// if (stereotypePropertiesInBraceContent != null) {
+// stereotypePropertiesInBraceContent.setFont(f);
+// }
+// }
+// };
+// interactionLabel.setAlignment(PositionConstants.CENTER);
+// interactionLabel.setBorder(new MarginBorder(1, 1, 3, 3));
+//
+// interactionLabelContainer = new InteractionFigure() {
+//
+// @Override
+// protected void outlineShape(Graphics graphics) {
+// Rectangle r = getBounds();
+//
+// int labelWidth = -1;
+//
+// for (Object obj : getChildren()) {
+// if (obj instanceof Label) {// Stereotype labels
+// labelWidth = Math.max(labelWidth, ((Label) obj).getPreferredSize().width);
+// } else if (obj instanceof WrappingLabel) {
+// WrappingLabel wLabel = (WrappingLabel) obj;
+// labelWidth = Math.max(labelWidth, wLabel.getPreferredSize().width);
+// }
+// }
+//
+// // case the size of the label is 0 or -1 (no label)
+// if (labelWidth <= 0) {
+// labelWidth = r.width / 4;
+// } else if (labelWidth > r.width) {
+// labelWidth = r.width;
+// }
+//
+// PointList points = new PointList();
+//
+// Point verticalStart = new Point();
+// Point verticalEnd = new Point();
+// Point diagonalStart = new Point();
+// Point diagonalEnd = new Point();
+// Point horizontalStart = new Point();
+// Point horizontalEnd = new Point();
+//
+// verticalStart.x = r.x + labelWidth + 15;
+// verticalStart.y = r.y;
+// points.addPoint(verticalStart);
+//
+// verticalEnd.x = verticalStart.x;
+// verticalEnd.y = verticalStart.y + r.height / 2 + 3;
+// points.addPoint(verticalEnd);
+//
+// diagonalStart.x = verticalEnd.x;
+// diagonalStart.y = verticalEnd.y;
+// points.addPoint(diagonalStart);
+//
+// diagonalEnd.x = diagonalStart.x - r.height / 2 + 3;
+// diagonalEnd.y = r.y + r.height - 1;
+// points.addPoint(diagonalEnd);
+//
+// horizontalStart.x = diagonalEnd.x;
+// horizontalStart.y = diagonalEnd.y;
+// points.addPoint(horizontalStart);
+//
+// horizontalEnd.x = r.x;
+// horizontalEnd.y = horizontalStart.y;
+// points.addPoint(horizontalEnd);
+//
+// graphics.drawPolyline(points);
+// }
+// };
+// interactionLabelContainer.setBorder(new MarginBorder(3, 3, 3, 15));
+// interactionLabelContainer.setLayoutManager(new LeftToolbarLayout());
+//
+// interactionLabelContainer.add(interactionLabel);
+//
+// Figure header = new Figure();
+// // header.setBorder(new MarginBorder(1, 1, 0, 3));
+// header.setLayoutManager(new ToolbarLayout(false));
+// header.add(interactionLabelContainer);
+//
+// RectangleFigure container = new RectangleFigure();
+// container.setOutline(false);
+// container.setFill(false);
+// container.setLayoutManager(new BorderLayout());
+// container.add(header, BorderLayout.LEFT);
+// return container;
+// }
+//
+// @Override
+// public void setStereotypes(String stereotypes) {
+// if (stereotypes == null || stereotypes.trim().equals("")) {
+// // Remove label if any
+// if (this.stereotypesLabel != null) {
+// getStereotypeLabelContainer().remove(this.stereotypesLabel);
+// this.stereotypesLabel = null;
+// }
+// return;
+// }
+// super.setStereotypes(stereotypes);
+// }
+//
+// @Override
+// public void setStereotypePropertiesInBrace(String stereotypeProperties) {
+// if (stereotypeProperties == null || stereotypeProperties.trim().equals("")) {
+// // Remove label if any
+// if (this.stereotypePropertiesInBraceContent != null) {
+// getStereotypePropertiesInBraceLabelContainer().remove(this.stereotypePropertiesInBraceContent);
+// this.stereotypePropertiesInBraceContent = null;
+// }
+// return;
+// }
+// super.setStereotypePropertiesInBrace(stereotypeProperties);
+// }
+//
+// @Override
+// protected IFigure getStereotypeLabelContainer() {
+// return interactionLabelContainer;
+// }
+//
+// @Override
+// protected IFigure getStereotypePropertiesInBraceLabelContainer() {
+// return interactionLabelContainer;
+// }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/TimeMarkElementFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/TimeMarkElementFigure.java
index 52013f3a0d6..bbf6490a2f7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/TimeMarkElementFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/TimeMarkElementFigure.java
@@ -19,8 +19,8 @@ import org.eclipse.gmf.runtime.notation.LayoutConstraint;
import org.eclipse.gmf.runtime.notation.Location;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.papyrus.infra.core.Activator;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
public class TimeMarkElementFigure extends SequencePolylineShape {
@@ -82,10 +82,10 @@ public class TimeMarkElementFigure extends SequencePolylineShape {
locator.relocate(label.getFigure());
} catch (InterruptedException e) {
// log and skip update
- UMLDiagramEditorPlugin.log.error(e);
+ Activator.log.error(e);
} catch (RollbackException e) {
// log and skip update
- UMLDiagramEditorPlugin.log.error(e);
+ Activator.log.error(e);
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/CenterLocator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/CenterLocator.java
index 2251aaa8133..8dbc3ff7688 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/CenterLocator.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/CenterLocator.java
@@ -20,28 +20,17 @@ import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.internal.figures.BorderItemContainerFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.AdvancedBorderItemLocator;
import org.eclipse.papyrus.uml.diagram.sequence.figures.DestructionEventFigure;
import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure;
import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineFigure;
-public class CenterLocator extends BorderItemLocator {
+/**
+ * This class is used to place all BorderItem node in the middle of the figure for the X but let the position Y
+ *
+ */
+public class CenterLocator extends AdvancedBorderItemLocator {
- /**
- * The LifelineDotLineFigure. It must be access through the method {@link #getLifelineDotLineFigure()}
- */
- private LifelineDotLineCustomFigure lifelineDotLineFigure = null;
-
- /**
- * The BorderItemContainerFigure. It must be access through the method {@link #getBorderItemContainerFigure()}
- */
- private BorderItemContainerFigure borderItemContainerFigure = null;
-
- /**
- * The DestructionEventFigure.
- *
- * It must be access through the method {@link #getDestructionEventFigure()}
- */
- private DestructionEventFigure destructionEventFigure = null;
/**
* Constructor
@@ -55,64 +44,6 @@ public class CenterLocator extends BorderItemLocator {
super(parentFigure, location);
}
- /**
- * Get the LifelineDotLineFigure
- *
- * @return the lifelineDotLineFigure or null
- */
- private LifelineDotLineCustomFigure getLifelineDotLineFigure() {
- if (lifelineDotLineFigure == null) {
- for (Object childFig : getParentFigure().getChildren()) {
- if (childFig instanceof LifelineFigure) {
- lifelineDotLineFigure = ((LifelineFigure) childFig).getFigureLifelineDotLineFigure();
- return lifelineDotLineFigure;
- }
- }
- }
- return lifelineDotLineFigure;
- }
-
- /**
- * Get the BorderItemContainerFigure
- *
- * @return the borderItemContainerFigure or null
- */
- private BorderItemContainerFigure getBorderItemContainerFigure() {
- if (borderItemContainerFigure == null) {
- IFigure figure = getParentFigure().getParent();
- for (Object object : figure.getChildren()) {
- if (object instanceof BorderItemContainerFigure) {
- borderItemContainerFigure = (BorderItemContainerFigure) object;
- return borderItemContainerFigure;
- }
- }
- }
- return borderItemContainerFigure;
- }
-
- /**
- * Get the DestructionEventFigure of the lifeline, if it is drawn.
- *
- * @return the DestructionEventFigure or null
- */
- private DestructionEventFigure getDestructionEventFigure() {
- if (destructionEventFigure == null) {
- BorderItemContainerFigure borderItemContainerFigure = getBorderItemContainerFigure();
- if (borderItemContainerFigure != null) {
- for (Object child : borderItemContainerFigure.getChildren()) {
- if (child instanceof DefaultSizeNodeFigure) {
- for (Object figure : ((DefaultSizeNodeFigure) child).getChildren()) {
- if (figure instanceof DestructionEventFigure) {
- destructionEventFigure = (DestructionEventFigure) figure;
- return destructionEventFigure;
- }
- }
- }
- }
- }
- }
- return destructionEventFigure;
- }
/**
* Overrides :
@@ -122,100 +53,45 @@ public class CenterLocator extends BorderItemLocator {
*/
@Override
public void relocate(IFigure borderItem) {
- if (getDestructionEventFigure() != null) {
- if (borderItem.equals(getDestructionEventFigure().getParent())) {
- borderItem.setLocation(new Point(getHorizontalPosition(borderItem), getParentBorder().y + getParentBorder().height - borderItem.getBounds().height / 2));
- return;
- }
- }
- super.relocate(borderItem);
+ Dimension size = getSize(borderItem);
+ //get constraint is relative
+ Rectangle rectSuggested = getConstraint();
+ rectSuggested.setSize(size);
+ //GetValid constraint is absolute
+ Rectangle suggestedRectIndiagram=rectSuggested.getCopy();
+ suggestedRectIndiagram.x=suggestedRectIndiagram.x+getParentFigure().getBounds().x;
+ suggestedRectIndiagram.y=suggestedRectIndiagram.y+getParentFigure().getBounds().y;
+ suggestedRectIndiagram=getValidLocation(suggestedRectIndiagram, borderItem);
+ borderItem.setBounds(suggestedRectIndiagram.getCopy());
+ suggestedRectIndiagram.x=suggestedRectIndiagram.x-getParentFigure().getBounds().x;
+ suggestedRectIndiagram.y=suggestedRectIndiagram.y-getParentFigure().getBounds().y;
+ setConstraint(suggestedRectIndiagram);
+
}
@Override
public Rectangle getValidLocation(Rectangle proposedLocation, IFigure borderItem) {
- if (getDestructionEventFigure() != null) {
- if (borderItem.equals(getDestructionEventFigure().getParent())) {
- Rectangle realLocation = new Rectangle(proposedLocation);
- Point point = new Point(getParentBorder().getCenter().x - realLocation.getSize().width / 2, getParentBorder().y + getParentBorder().height - realLocation.height / 2);
- realLocation.setLocation(point);
- return realLocation;
- }
+ proposedLocation.setX(getParentFigure().getBounds().x+getParentFigure().getBounds().width/2-borderItem.getBounds().width()/2);
+
+ if( proposedLocation.y-proposedLocation.height/2<=getParentFigure().getBounds().y){
+ proposedLocation.setY(getParentFigure().getBounds().y);
}
- return super.getValidLocation(proposedLocation, borderItem);
- }
-
- /**
- * Get the parent dotLine border
- *
- * @return <code>Rectangle</code> that is the bounds of the parent dot line.
- */
- protected Rectangle getParentDotLineBorder() {
- LifelineDotLineCustomFigure dotline = getLifelineDotLineFigure();
- if (dotline != null) {
- return dotline.getBounds().getCopy();
+ if(proposedLocation.y-proposedLocation.height/2 >= getParentFigure().getBounds().getBottomLeft().y){
+ proposedLocation.setY(getParentFigure().getBounds().getBottomLeft().y);
}
- return super.getParentBorder();
+
+ return super.getValidLocation(proposedLocation, borderItem);
}
-
/**
- * Locate the figure on its parent
+ * @see org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator#getConstraint()
*
- * @param suggestedLocation
- * @param suggestedSide
- * @return point
+ * @return
*/
@Override
- protected Point locateOnParent(Point suggestedLocation, int suggestedSide, IFigure borderItem) {
- Dimension borderItemSize = getSize(borderItem);
- int y = getVerticalPosition(suggestedLocation.y, borderItemSize.height);
- int x = getHorizontalPosition(borderItem);
- return new Point(x, y);
- }
-
- /**
- * Get the vertical position of the itemBorder
- *
- * @param y
- * the suggested location
- * @param height
- * the border item height
- * @return the vertical position of the item border on the lifeline
- */
- private int getVerticalPosition(int y, int height) {
- int validY = y;
- Rectangle parentDotLineBorder = getParentDotLineBorder();
- int maxY = parentDotLineBorder.y + parentDotLineBorder.height - getSouthInsets();
- if (y + height > maxY) {
- validY = maxY - height;
- } else if (y < parentDotLineBorder.y) {
- validY = parentDotLineBorder.y;
- }
- return validY;
+ protected Rectangle getConstraint() {
+ // TODO Auto-generated method stub
+ return super.getConstraint();
}
+
- /**
- * Get the horizontal position of the borderItem drawn on a lifeline.
- * Those elements are drawn at the center of the lifeline, ie on the dot line.
- *
- * @param borderItem
- * the borderItem
- * @return the horizontal position of the border item
- */
- private int getHorizontalPosition(IFigure borderItem) {
- return getParentBorder().getCenter().x - borderItem.getSize().width / 2;
- }
-
- /**
- * Get the insets to use at the bottom of the figure.
- * It is used to prevent others borderItems to be drawn on or below the destructionEventFigure
- *
- * @return If a destructionEventFigure is drawn, it returns the height of its figure, otherwise it returns 0
- */
- private int getSouthInsets() {
- DestructionEventFigure destructionEventFigure = getDestructionEventFigure();
- if (destructionEventFigure != null) {
- return destructionEventFigure.getBounds().height;
- }
- return 0;
- }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/migration/SequenceDiagramLunaToMarsReconciler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/migration/SequenceDiagramLunaToMarsReconciler.java
index 9f09968151f..729951ca7f0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/migration/SequenceDiagramLunaToMarsReconciler.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/migration/SequenceDiagramLunaToMarsReconciler.java
@@ -27,7 +27,7 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Shape;
import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomInteractionEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OldCustomInteractionEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineResizeHelper;
import org.eclipse.uml2.uml.ActionExecutionSpecification;
import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
@@ -44,8 +44,8 @@ import org.eclipse.uml2.uml.Lifeline;
* </ul>
* <li>the height of the Lifeline changed to take the whole available height in the Interaction</li>
* <ul>
- * <li>the method {@link CustomInteractionEditPart#refreshBounds()} changes the Lifeline height and tries to repears the anchors executing commands outside of the stack on each refresh
- * (calling {@link CustomInteractionEditPart#synchronizeSize()}), unfortunately some sizes of elements are not serialized (default values) and some size seems not set in the figure, so the calculus of anchors locations was wrong and all messages were displayed
+ * <li>the method {@link OldCustomInteractionEditPart#refreshBounds()} changes the Lifeline height and tries to repears the anchors executing commands outside of the stack on each refresh
+ * (calling {@link OldCustomInteractionEditPart#synchronizeSize()}), unfortunately some sizes of elements are not serialized (default values) and some size seems not set in the figure, so the calculus of anchors locations was wrong and all messages were displayed
* just under the name of the lifeline. + recalculate the anchors location with this new size.
* </li>
* </ul>
@@ -54,7 +54,7 @@ import org.eclipse.uml2.uml.Lifeline;
* <ul>
* <li>bad solution: To fix the bug we tried to determine the futur height of the lifeline, to reset them to the good location in order to keep alignment between Lifeline and {@link ActionExecutionSpecification} and {@link BehaviorExecutionSpecification},
* and to set the default sizes used in Luna to Lifeline shape when required. This first trial improved a lot the display of the diagram, but was not correct.</li>
- * <li>good solution: just add the good EAnnotation to the lifeline avoid all the problems described by the bug and the first solution. Nevertheless, the method {@link CustomInteractionEditPart#refreshBounds()} should be rewritten (bug 493999)</li>
+ * <li>good solution: just add the good EAnnotation to the lifeline avoid all the problems described by the bug and the first solution. Nevertheless, the method {@link OldCustomInteractionEditPart#refreshBounds()} should be rewritten (bug 493999)</li>
* </ul>
*/
public class SequenceDiagramLunaToMarsReconciler extends DiagramReconciler {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomCombinedFragmentPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomCombinedFragmentPreferencePage.java
index e1a6b6b94d3..d54def2cf8b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomCombinedFragmentPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomCombinedFragmentPreferencePage.java
@@ -21,13 +21,15 @@ import org.eclipse.gmf.runtime.common.ui.preferences.CheckBoxFieldEditor;
import org.eclipse.jface.dialogs.DialogPage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup;
import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.BackgroundColor;
import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.DecorationGroup;
import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.LabelGroup;
import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.NodeColorGroup;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
@@ -41,7 +43,7 @@ import org.eclipse.swt.widgets.Group;
/**
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class CustomCombinedFragmentPreferencePage extends CombinedFragmentPreferencePage {
+public class CustomCombinedFragmentPreferencePage extends AbstractPapyrusNodePreferencePage {
public static final String compartments[] = { Messages.CombinedFragmentCombinedFragmentCompartmentEditPart_title };
@@ -57,7 +59,7 @@ public class CustomCombinedFragmentPreferencePage extends CombinedFragmentPrefer
* @Override
*/
public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_CombinedFragment";
+ String key = SequenceDiagramEditPart.MODEL_ID + "_CombinedFragment";
store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
for (String name : compartments) {
@@ -200,4 +202,14 @@ public class CustomCombinedFragmentPreferencePage extends CombinedFragmentPrefer
master.addSelectionListener(dependencyListener);
}
}
+
+ /**
+ * @see org.eclipse.papyrus.infra.ui.preferences.AbstractPapyrusPreferencePage#getBundleId()
+ *
+ * @return
+ */
+ @Override
+ protected String getBundleId() {
+ return UMLDiagramEditorPlugin.ID;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomConsiderIgnoreFragmentPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomConsiderIgnoreFragmentPreferencePage.java
index 6beb770871f..142117f22b5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomConsiderIgnoreFragmentPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomConsiderIgnoreFragmentPreferencePage.java
@@ -17,19 +17,21 @@ import java.util.TreeMap;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.BackgroundColor;
import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.DecorationGroup;
import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.LabelGroup;
import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.NodeColorGroup;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.preferences.CustomCombinedFragmentPreferencePage.NodeCompartmentGroupEx;
import org.eclipse.swt.widgets.Composite;
/**
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class CustomConsiderIgnoreFragmentPreferencePage extends ConsiderIgnoreFragmentPreferencePage {
+public class CustomConsiderIgnoreFragmentPreferencePage extends AbstractPapyrusNodePreferencePage {
public static final String compartments[] = { Messages.CombinedFragmentCombinedFragmentCompartmentEditPart_title };
@@ -39,14 +41,14 @@ public class CustomConsiderIgnoreFragmentPreferencePage extends ConsiderIgnoreFr
*/
public CustomConsiderIgnoreFragmentPreferencePage() {
super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_ConsiderIgnoreFragment");
+ setPreferenceKey(SequenceDiagramEditPart.MODEL_ID + "_ConsiderIgnoreFragment");
}
/**
* @Override
*/
public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_ConsiderIgnoreFragment";
+ String key = SequenceDiagramEditPart.MODEL_ID + "_ConsiderIgnoreFragment";
store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
for (String name : compartments) {
@@ -95,4 +97,14 @@ public class CustomConsiderIgnoreFragmentPreferencePage extends ConsiderIgnoreFr
addPreferenceGroup(compartmentGroup);
}
}
+
+ /**
+ * @see org.eclipse.papyrus.infra.ui.preferences.AbstractPapyrusPreferencePage#getBundleId()
+ *
+ * @return
+ */
+ @Override
+ protected String getBundleId() {
+ return UMLDiagramEditorPlugin.ID;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomDestructionOccurrenceSpecificationPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomDestructionOccurrenceSpecificationPreferencePage.java
index f4ac5ef3215..f5b9a33f10c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomDestructionOccurrenceSpecificationPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomDestructionOccurrenceSpecificationPreferencePage.java
@@ -15,19 +15,31 @@ package org.eclipse.papyrus.uml.diagram.sequence.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
/**
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class CustomDestructionOccurrenceSpecificationPreferencePage extends DestructionOccurrenceSpecificationPreferencePage {
+public class CustomDestructionOccurrenceSpecificationPreferencePage extends AbstractPapyrusNodePreferencePage {
/**
* @Override
*/
public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_DestructionOccurrenceSpecification";
+ String key = SequenceDiagramEditPart.MODEL_ID + "_DestructionOccurrenceSpecification";
store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 20);
store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 20);
}
+
+ /**
+ * @see org.eclipse.papyrus.infra.ui.preferences.AbstractPapyrusPreferencePage#getBundleId()
+ *
+ * @return
+ */
+ @Override
+ protected String getBundleId() {
+ return UMLDiagramEditorPlugin.ID;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomDiagramPreferenceInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomDiagramPreferenceInitializer.java
index 53aabcb2562..9427f63bcff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomDiagramPreferenceInitializer.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomDiagramPreferenceInitializer.java
@@ -30,28 +30,10 @@ public class CustomDiagramPreferenceInitializer extends DiagramPreferenceInitial
public void initializeDefaultPreferences() {
super.initializeDefaultPreferences();
IPreferenceStore store = getPreferenceStore();
- TimeObservationPreferencePage.initDefaults(store);
- CommentPreferencePage.initDefaults(store);
- StateInvariantPreferencePage.initDefaults(store);
- CombinedFragmentPreferencePage.initDefaults(store);
- ConstraintPreferencePage.initDefaults(store);
- ActionExecutionSpecificationPreferencePage.initDefaults(store);
- InteractionOperandPreferencePage.initDefaults(store);
- DestructionEventPreferencePage.initDefaults(store);
- InteractionPreferencePage.initDefaults(store);
- DurationConstraintPreferencePage.initDefaults(store);
- InteractionUsePreferencePage.initDefaults(store);
- ContinuationPreferencePage.initDefaults(store);
- ConsiderIgnoreFragmentPreferencePage.initDefaults(store);
- DurationObservationPreferencePage.initDefaults(store);
- TimeConstraintPreferencePage.initDefaults(store);
- LifelinePreferencePage.initDefaults(store);
- BehaviorExecutionSpecificationPreferencePage.initDefaults(store);
- MessagePreferencePage.initDefaults(store);
- GeneralOrderingPreferencePage.initDefaults(store);
+
// diagram preference page
DiagramsPreferencePage.initDefaults(store);
- DestructionOccurrenceSpecificationPreferencePage.initDefaults(store);
+
// Custom preference pages.
CustomCombinedFragmentPreferencePage.initDefaults(store);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomInteractionOperandPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomInteractionOperandPreferencePage.java
index b2c18913c2d..26e54b9eaad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomInteractionOperandPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CustomInteractionOperandPreferencePage.java
@@ -14,7 +14,10 @@
package org.eclipse.papyrus.uml.diagram.sequence.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -28,12 +31,14 @@ import org.eclipse.swt.widgets.Group;
*
* @author Jin Liu (jin.liu@soyatec.com)
*/
-public class CustomInteractionOperandPreferencePage extends InteractionOperandPreferencePage {
+public class CustomInteractionOperandPreferencePage extends AbstractPapyrusNodePreferencePage {
- public static final String GUARD_VISIBILITY = PackageEditPart.MODEL_ID + "_InteractionOperand.guard.visibility";
+ public static final String GUARD_VISIBILITY = SequenceDiagramEditPart.MODEL_ID + "_InteractionOperand.guard.visibility";
public static void initDefaults(IPreferenceStore store) {
- InteractionOperandPreferencePage.initDefaults(store);
+ String key = SequenceDiagramEditPart.MODEL_ID + "_InteractionOperand";
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
store.setDefault(GUARD_VISIBILITY, Boolean.TRUE);
}
@@ -86,4 +91,14 @@ public class CustomInteractionOperandPreferencePage extends InteractionOperandPr
getPreferenceStore().setValue(GUARD_VISIBILITY, guardVisibleButton.getSelection());
}
}
+
+ /**
+ * @see org.eclipse.papyrus.infra.ui.preferences.AbstractPapyrusPreferencePage#getBundleId()
+ *
+ * @return
+ */
+ @Override
+ protected String getBundleId() {
+ return UMLDiagramEditorPlugin.ID;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionEventPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionEventPreferencePage.java
index 448f93f78c5..1e6e3b2d7a1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionEventPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionEventPreferencePage.java
@@ -16,7 +16,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
/**
@@ -29,7 +29,7 @@ public class DestructionEventPreferencePage extends AbstractPapyrusNodePreferenc
*/
public DestructionEventPreferencePage() {
super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_DestructionEvent");
+ setPreferenceKey(SequenceDiagramEditPart.MODEL_ID + "_DestructionEvent");
}
/**
@@ -44,7 +44,7 @@ public class DestructionEventPreferencePage extends AbstractPapyrusNodePreferenc
* @generated
*/
public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_DestructionEvent";
+ String key = SequenceDiagramEditPart.MODEL_ID + "_DestructionEvent";
store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
// org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPartProvider.java
index 9fd1d8cc52e..4461c75d6cb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPartProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPartProvider.java
@@ -14,10 +14,12 @@
package org.eclipse.papyrus.uml.diagram.sequence.providers;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.internal.editparts.DummyEditPart;
import org.eclipse.gmf.runtime.notation.Connector;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.*;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.GrillingEditpart;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
/**
@@ -50,116 +52,119 @@ public class CustomEditPartProvider extends UMLEditPartProvider {
}
}
switch (UMLVisualIDRegistry.getVisualID(view)) {
- case PackageEditPart.VISUAL_ID:
- return new CustomPackageEditPart(view);
+// case SequenceDiagramEditPart.VISUAL_ID:
+// return new OLDPackageEditPart(view);
case InteractionEditPart.VISUAL_ID:
- return new CustomInteractionEditPart(view);
- case InteractionNameEditPart.VISUAL_ID:
- return new CustomInteractionNameEditPart(view);
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- return new CustomConsiderIgnoreFragmentEditPart(view);
+ return new CInteractionEditPart(view);
+ case GrillingEditpart.VISUAL_ID:
+ return new GrillingEditpart(view);
+// case InteractionNameEditPart.VISUAL_ID:
+// return new CustomInteractionNameEditPart(view);
+// case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
+// return new CustomConsiderIgnoreFragmentEditPart(view);
case CombinedFragmentEditPart.VISUAL_ID:
- return new CustomCombinedFragmentEditPart(view);
- case InteractionOperandEditPart.VISUAL_ID:
- return new CustomInteractionOperandEditPart(view);
- case InteractionUseEditPart.VISUAL_ID:
- return new CustomInteractionUseEditPart(view);
- case InteractionUseNameEditPart.VISUAL_ID:
- return new CustomInteractionUseNameEditPart(view);
- case InteractionUseName2EditPart.VISUAL_ID:
- return new CustomInteractionUseName2EditPart(view);
- case ContinuationEditPart.VISUAL_ID:
- return new CustomContinuationEditPart(view);
+ return new CCombinedFragmentEditPart(view);
+ // case CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID:
+ // return new CCombinedCompartmentEditPart(view);
+
+// case InteractionOperandEditPart.VISUAL_ID:
+// return new CustomInteractionOperandEditPart(view);
+// case InteractionUseEditPart.VISUAL_ID:
+// return new CustomInteractionUseEditPart(view);
+// case InteractionUseNameEditPart.VISUAL_ID:
+// return new CustomInteractionUseNameEditPart(view);
+// case InteractionUseName2EditPart.VISUAL_ID:
+// return new CustomInteractionUseName2EditPart(view);
+// case ContinuationEditPart.VISUAL_ID:
+// return new CustomContinuationEditPart(view);
case LifelineEditPart.VISUAL_ID:
- return new CustomLifelineEditPart(view);
- case LifelineNameEditPart.VISUAL_ID:
- return new CustomLifelineNameEditPart(view);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- return new CustomActionExecutionSpecificationEditPart(view);
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- return new CustomBehaviorExecutionSpecificationEditPart(view);
- case StateInvariantEditPart.VISUAL_ID:
- return new CustomStateInvariantEditPart(view);
- case CombinedFragment2EditPart.VISUAL_ID:
- return new CustomCombinedFragment2EditPart(view);
- case TimeConstraintEditPart.VISUAL_ID:
- return new CustomTimeConstraintEditPart(view);
- case TimeConstraintAppliedStereotypeEditPart.VISUAL_ID:
- return new CustomTimeConstraintAppliedStereotypeEditPart(view);
- case TimeConstraintLabelEditPart.VISUAL_ID:
- return new CustomTimeConstraintLabelEditPart(view);
- case TimeObservationEditPart.VISUAL_ID:
- return new CustomTimeObservationEditPart(view);
- case TimeObservationLabelEditPart.VISUAL_ID:
- return new CustomTimeObservationLabelEditPart(view);
- case TimeObservationAppliedStereotypeEditPart.VISUAL_ID:
- return new CustomTimeObservationAppliedStereotypeEditPart(view);
- case DurationConstraintEditPart.VISUAL_ID:
- return new CustomDurationConstraintEditPart(view);
- case DurationConstraintAppliedStereotypeEditPart.VISUAL_ID:
- return new CustomDurationConstraintAppliedStereotypeEditPart(view);
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return new CustomDestructionOccurrenceSpecificationEditPart(view);
- case ConstraintEditPart.VISUAL_ID:
- return new CustomConstraintEditPart(view);
- case Constraint2EditPart.VISUAL_ID:
- return new CustomConstraint2EditPart(view);
- case CommentEditPart.VISUAL_ID:
- return new CustomCommentEditPart(view);
- case CommentBodyEditPart.VISUAL_ID:
- return new CustomCommentBodyEditPart(view);
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return new CustomDurationConstraintInMessageEditPart(view);
- case DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID:
- return new CustomDurationConstraintInMessageAppliedStereotypeEditPart(view);
- case DurationObservationEditPart.VISUAL_ID:
- return new CustomDurationObservationEditPart(view);
- case DurationObservationAppliedStereotypeEditPart.VISUAL_ID:
- return new CustomDurationObservationAppliedStereotypeEditPart(view);
- case InteractionInteractionCompartmentEditPart.VISUAL_ID:
- return new CustomInteractionInteractionCompartmentEditPart(view);
- case CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID:
- return new CustomCombinedFragmentCombinedFragmentCompartmentEditPart(view);
- case MessageSyncEditPart.VISUAL_ID:
- return new CustomMessageSyncEditPart(view);
- case MessageSyncNameEditPart.VISUAL_ID:
- return new CustomMessageNameEditPart(view);
- case MessageAsyncEditPart.VISUAL_ID:
- return new CustomMessageAsyncEditPart(view);
- case MessageAsyncNameEditPart.VISUAL_ID:
- return new CustomMessageName2EditPart(view);
- case MessageReplyEditPart.VISUAL_ID:
- return new CustomMessageReplyEditPart(view);
- case MessageReplyNameEditPart.VISUAL_ID:
- return new CustomMessageName3EditPart(view);
- case MessageCreateEditPart.VISUAL_ID:
- return new CustomMessageCreateEditPart(view);
- case MessageCreateNameEditPart.VISUAL_ID:
- return new CustomMessageName4EditPart(view);
- case MessageDeleteEditPart.VISUAL_ID:
- return new CustomMessageDeleteEditPart(view);
- case MessageDeleteNameEditPart.VISUAL_ID:
- return new CustomMessageName5EditPart(view);
- case MessageLostEditPart.VISUAL_ID:
- return new CustomMessageLostEditPart(view);
- case MessageLostNameEditPart.VISUAL_ID:
- return new CustomMessageName6EditPart(view);
- case MessageFoundEditPart.VISUAL_ID:
- return new CustomMessageFoundEditPart(view);
- case MessageFoundNameEditPart.VISUAL_ID:
- return new CustomMessageName7EditPart(view);
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return new CustomCommentAnnotatedElementEditPart(view);
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return new CustomConstraintConstrainedElementEditPart(view);
- case GeneralOrderingEditPart.VISUAL_ID:
- return new CustomGeneralOrderingEditPart(view);
- case ExecutionSpecificationEndEditPart.VISUAL_ID:
- return new ExecutionSpecificationEndEditPart(view);
- case MessageEndEditPart.VISUAL_ID:
- return new MessageEndEditPart(view);
- case StateInvariantLabelEditPart.VISUAL_ID:
- return new CustomStateInvariantLabelEditPart(view);
+ return new CLifeLineEditPart(view);
+// case LifelineNameEditPart.VISUAL_ID:
+// return new CustomLifelineNameEditPart(view);
+// case ActionExecutionSpecificationEditPart.VISUAL_ID:
+// return new CustomActionExecutionSpecificationEditPart(view);
+// case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
+// return new CustomBehaviorExecutionSpecificationEditPart(view);
+// case StateInvariantEditPart.VISUAL_ID:
+// return new CustomStateInvariantEditPart(view);
+// case CombinedFragment2EditPart.VISUAL_ID:
+// return new CustomCombinedFragment2EditPart(view);
+// case TimeConstraintEditPart.VISUAL_ID:
+// return new CustomTimeConstraintEditPart(view);
+// case TimeConstraintAppliedStereotypeEditPart.VISUAL_ID:
+// return new CustomTimeConstraintAppliedStereotypeEditPart(view);
+// case TimeConstraintLabelEditPart.VISUAL_ID:
+// return new CustomTimeConstraintLabelEditPart(view);
+// case TimeObservationEditPart.VISUAL_ID:
+// return new CustomTimeObservationEditPart(view);
+// case TimeObservationLabelEditPart.VISUAL_ID:
+// return new CustomTimeObservationLabelEditPart(view);
+// case TimeObservationAppliedStereotypeEditPart.VISUAL_ID:
+// return new CustomTimeObservationAppliedStereotypeEditPart(view);
+// case DurationConstraintEditPart.VISUAL_ID:
+// return new CustomDurationConstraintEditPart(view);
+// case DurationConstraintAppliedStereotypeEditPart.VISUAL_ID:
+// return new CustomDurationConstraintAppliedStereotypeEditPart(view);
+// case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
+// return new CustomDestructionOccurrenceSpecificationEditPart(view);
+// case ConstraintEditPart.VISUAL_ID:
+// return new CustomConstraintEditPart(view);
+// case Constraint2EditPart.VISUAL_ID:
+// return new CustomConstraint2EditPart(view);
+// case CommentEditPart.VISUAL_ID:
+// return new CustomCommentEditPart(view);
+// case CommentBodyEditPart.VISUAL_ID:
+// return new CustomCommentBodyEditPart(view);
+// case DurationConstraintInMessageEditPart.VISUAL_ID:
+// return new CustomDurationConstraintInMessageEditPart(view);
+// case DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID:
+// return new CustomDurationConstraintInMessageAppliedStereotypeEditPart(view);
+// case DurationObservationEditPart.VISUAL_ID:
+// return new CustomDurationObservationEditPart(view);
+// case DurationObservationAppliedStereotypeEditPart.VISUAL_ID:
+// return new CustomDurationObservationAppliedStereotypeEditPart(view);
+// case InteractionInteractionCompartmentEditPart.VISUAL_ID:
+// return new CustomInteractionInteractionCompartmentEditPart(view);
+// case CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID:
+// return new CustomCombinedFragmentCombinedFragmentCompartmentEditPart(view);
+// case MessageSyncEditPart.VISUAL_ID:
+// return new CustomMessageSyncEditPart(view);
+// case MessageSyncNameEditPart.VISUAL_ID:
+// return new CustomMessageNameEditPart(view);
+// case MessageAsyncEditPart.VISUAL_ID:
+// return new CustomMessageAsyncEditPart(view);
+// case MessageAsyncNameEditPart.VISUAL_ID:
+// return new CustomMessageName2EditPart(view);
+// case MessageReplyEditPart.VISUAL_ID:
+// return new CustomMessageReplyEditPart(view);
+// case MessageReplyNameEditPart.VISUAL_ID:
+// return new CustomMessageName3EditPart(view);
+// case MessageCreateEditPart.VISUAL_ID:
+// return new CustomMessageCreateEditPart(view);
+// case MessageCreateNameEditPart.VISUAL_ID:
+// return new CustomMessageName4EditPart(view);
+// case MessageDeleteEditPart.VISUAL_ID:
+// return new CustomMessageDeleteEditPart(view);
+// case MessageDeleteNameEditPart.VISUAL_ID:
+// return new CustomMessageName5EditPart(view);
+// case MessageLostEditPart.VISUAL_ID:
+// return new CustomMessageLostEditPart(view);
+// case MessageLostNameEditPart.VISUAL_ID:
+// return new CustomMessageName6EditPart(view);
+// case MessageFoundEditPart.VISUAL_ID:
+// return new CustomMessageFoundEditPart(view);
+// case MessageFoundNameEditPart.VISUAL_ID:
+// return new CustomMessageName7EditPart(view);
+// case CommentAnnotatedElementEditPart.VISUAL_ID:
+// return new CustomCommentAnnotatedElementEditPart(view);
+// case GeneralOrderingEditPart.VISUAL_ID:
+// return new CustomGeneralOrderingEditPart(view);
+// case ExecutionSpecificationEndEditPart.VISUAL_ID:
+// return new ExecutionSpecificationEndEditPart(view);
+// case MessageEndEditPart.VISUAL_ID:
+// return new MessageEndEditPart(view);
+// case StateInvariantLabelEditPart.VISUAL_ID:
+// return new CustomStateInvariantLabelEditPart(view);
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPolicyProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPolicyProvider.java
index d283657e5f1..692db1fc52e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPolicyProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPolicyProvider.java
@@ -27,11 +27,10 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AnnotatedConnectionHandleEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AnnotatedLinkEndEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AnnotatedLinkStartEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.HighlightEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionFragmentsOrderingEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceConnectionHandleEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
@@ -112,7 +111,7 @@ public class CustomEditPolicyProvider implements IEditPolicyProvider {
}
private void installHighlightPolicy(EditPart editPart) {
- installEditPolicy(editPart, new HighlightEditPolicy(), HighlightEditPolicy.HIGHLIGHT_ROLE);
+ // installEditPolicy(editPart, new HighlightEditPolicy(), HighlightEditPolicy.HIGHLIGHT_ROLE);
}
/**
@@ -127,7 +126,7 @@ public class CustomEditPolicyProvider implements IEditPolicyProvider {
}
EditPart gep = epOperation.getEditPart();
String diagramType = ((View) gep.getModel()).getDiagram().getType();
- if (PackageEditPart.MODEL_ID.equals(diagramType)) {
+ if (SequenceDiagramEditPart.MODEL_ID.equals(diagramType)) {
return true;
}
return false;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomNamespaceEditPolicyProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomNamespaceEditPolicyProvider.java
deleted file mode 100644
index 7be06f6a964..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomNamespaceEditPolicyProvider.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boutheina Bannour (boutheina.bannour@cea.fr) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomInteractionContextLinkSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomInteractionOperandContextLinkSemanticEditPolicy;
-import org.eclipse.uml2.uml.Namespace;
-
-/**
- * An edit policy provider to install
- *
- * @author Boutheina Bannour
- *
- */
-public class CustomNamespaceEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
-
- @Override
- public boolean provides(IOperation operation) {
- CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
- EditPart editPart = epOperation.getEditPart();
- if (editPart == null) {
- return false;
- }
- EObject eElement = EMFHelper.getEObject(editPart);
- if (!(eElement instanceof Namespace)) {
- return false;
- }
- try {
- // check whether the element is a papyrus element.
- ServicesRegistry registry = ServiceUtilsForEObject.getInstance().getServiceRegistry(eElement);
- if (registry == null) {
- return false;
- }
- } catch (Exception ex) {
- return false;
- }
- // primary edit part is the toplevel (main) editpart
- return (editPart instanceof IPrimaryEditPart);
- }
-
- @Override
- public void createEditPolicies(EditPart editPart) {
- // install policy for InteractionEditPart
- if (editPart instanceof InteractionEditPart) {
- editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInteractionContextLinkSemanticEditPolicy());
- }
- // install policy for InteractionOperandEditPart
- if (editPart instanceof InteractionOperandEditPart) {
- editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInteractionOperandContextLinkSemanticEditPolicy());
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomValidationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomValidationProvider.java
index 06064e667c4..b0e4ee6260b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomValidationProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomValidationProvider.java
@@ -20,7 +20,7 @@ import org.eclipse.emf.validation.IValidationContext;
import org.eclipse.emf.validation.model.IClientSelector;
import org.eclipse.gmf.runtime.notation.Bounds;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
@@ -33,7 +33,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.sequence.validation.UMLValidationHelper;
@@ -53,13 +53,13 @@ public class CustomValidationProvider extends UMLValidationProvider {
// validate on resize or move
object = ((Bounds) object).eContainer();
}
- if (object instanceof View && PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID((View) object))) {
+ if (object instanceof View && SequenceDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID((View) object))) {
final String id = UMLVisualIDRegistry.getVisualID((View) object);
boolean result = false;
// Lifeline
result = result || LifelineEditPart.VISUAL_ID.equals(id);
// ES
- result = result || ActionExecutionSpecificationEditPart.VISUAL_ID.equals(id);
+ result = result || CCombinedCompartmentEditPart.VISUAL_ID.equals(id);
result = result || BehaviorExecutionSpecificationEditPart.VISUAL_ID.equals(id);
// CF and Interaction operands
result = result || CombinedFragmentEditPart.VISUAL_ID.equals(id);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomViewProvider.java
index a9e54c263b0..8dfd5a56d79 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomViewProvider.java
@@ -14,6 +14,7 @@
package org.eclipse.papyrus.uml.diagram.sequence.providers;
import java.util.ArrayList;
+import java.util.List;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EObject;
@@ -49,6 +50,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEd
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLabelEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandGuardEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
@@ -56,6 +58,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.uml2.uml.CombinedFragment;
import org.eclipse.uml2.uml.InteractionOperand;
+import org.eclipse.uml2.uml.Lifeline;
/**
* @author Jin Liu (jin.liu@soyatec.com)
@@ -68,10 +71,11 @@ public class CustomViewProvider extends UMLViewProvider {
return false;
}
String visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint());
- if (DurationConstraintEditPart.VISUAL_ID.equals(visualID)) { // avoid to
- // modify
- // UMLVisualIDRegistry.getNodeVisualID(View,
- // EObject)
+ if (DurationConstraintEditPart.VISUAL_ID.equals(visualID)) {
+ // avoid to
+ // modify
+ // UMLVisualIDRegistry.getNodeVisualID(View,
+ // EObject)
if (InteractionInteractionCompartmentEditPart.VISUAL_ID.equals(UMLVisualIDRegistry
.getVisualID(op.getContainerView()))) {
return true;
@@ -202,41 +206,54 @@ public class CustomViewProvider extends UMLViewProvider {
return node;
}
+ /**
+ * This class has bee overloaded in order to set the combined fragment under the lifelines
+ * @see org.eclipse.papyrus.uml.diagram.sequence.providers.UMLViewProvider#createCombinedFragment_Shape(org.eclipse.emf.ecore.EObject, org.eclipse.gmf.runtime.notation.View, int, boolean, org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint)
+ */
@Override
- public Node createCombinedFragment_Shape(EObject domainElement,
- View containerView, int index, boolean persisted,
- PreferencesHint preferencesHint) {
+ public Node createCombinedFragment_Shape(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ int position=LifelinePosition(containerView);
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry
- .getType(CombinedFragmentEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setType(UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, position, persisted);
node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node,
- prefStore, "CombinedFragment");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node,
- prefStore, "CombinedFragment");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node,
- prefStore, "CombinedFragment");
- Node compartment = createCompartment(
- node,
- UMLVisualIDRegistry
- .getType(CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID),
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CombinedFragment");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CombinedFragment");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CombinedFragment");
+ Node compartment = createCompartment(node,UMLVisualIDRegistry.getType(CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID),
false, false, true, true);
// Add by default InteractionOperand
- for (InteractionOperand interactionOperand : ((CombinedFragment) domainElement)
- .getOperands()) {
- createInteractionOperand_Shape(interactionOperand, compartment, -1,
- true, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ for (InteractionOperand interactionOperand : ((CombinedFragment) domainElement).getOperands()) {
+ createInteractionOperand_Shape(interactionOperand, compartment, -1, true, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
}
// initialization for the compartment visibility
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(
node, prefStore, "CombinedFragment");
return node;
}
+ /**
+ * @param containerView the view that can contains lifeline representation
+ * @return the position of the first lifeline in the notation
+ *
+ */
+ protected int LifelinePosition(View containerView){
+ @SuppressWarnings("unchecked")
+ List<Object> children= containerView.getChildren();
+ int i=0;
+ while (i<children.size()){
+ if(children.get(i) instanceof View){
+ if( ((View)children.get(i)).getElement() instanceof Lifeline){
+ return i;}
+ }
+ i++;
+ }
+ return i;
+ }
+
@Override
public Node createDurationConstraint_Shape_CN(EObject domainElement,
@@ -415,4 +432,7 @@ public class CustomViewProvider extends UMLViewProvider {
label.setLayoutConstraint(location);
return node;
}
+
+
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/PostEditPolicyProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/PostEditPolicyProvider.java
index 8b44affbac0..50e32f84fd0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/PostEditPolicyProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/PostEditPolicyProvider.java
@@ -32,7 +32,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomTimeConstraintL
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomTimeObservationLabelEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.AppliedStereotypeCommentCreationEditPolicyEx;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpolicies.AppliedStereotypeCommentEditPolicy;
@@ -70,7 +70,7 @@ public class PostEditPolicyProvider implements IEditPolicyProvider {
}
EditPart gep = epOperation.getEditPart();
String diagramType = ((View) gep.getModel()).getDiagram().getType();
- if (PackageEditPart.MODEL_ID.equals(diagramType)) {
+ if (SequenceDiagramEditPart.MODEL_ID.equals(diagramType)) {
return true;
}
return false;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/BoundForEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/BoundForEditPart.java
new file mode 100644
index 00000000000..68def20213e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/BoundForEditPart.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.referencialgrilling;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
+
+/**
+ * @author PT202707
+ *
+ */
+public class BoundForEditPart {
+
+ protected static Bounds getBounds(Node node){
+ return (Bounds) node.getLayoutConstraint();
+ }
+ public static int getHeightFromView(Node node){
+ Bounds bounds=BoundForEditPart.getBounds(node);
+ if( bounds.getHeight()!=-1){
+ return bounds.getHeight();
+ }
+ else{
+ if (node.getType().equals(CombinedFragmentEditPart.VISUAL_ID)){
+ return 40;
+ }
+ return 100;
+ }
+
+ }
+ public static int getWidthFromView(Node node){
+ Bounds bounds=BoundForEditPart.getBounds(node);
+ if( bounds.getWidth()!=-1){
+ return bounds.getHeight();
+ }
+ else{
+ if (node.getType().equals(CombinedFragmentEditPart.VISUAL_ID)){
+ return 40;
+ }
+ return 100;
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectCombinedFragmentToGrillingEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectCombinedFragmentToGrillingEditPolicy.java
new file mode 100644
index 00000000000..a80b9b0e5c7
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectCombinedFragmentToGrillingEditPolicy.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.IdentityAnchor;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AutomaticNotationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.IdentityAnchorHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedFragmentEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CLifeLineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomActionExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
+import org.eclipse.uml2.uml.CombinedFragment;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+
+/**
+ * @author PT202707
+ *
+ */
+public class ConnectCombinedFragmentToGrillingEditPolicy extends GraphicalEditPolicyEx implements AutomaticNotationEditPolicy, NotificationListener, IGrillingEditpolicy {
+
+ protected GrillingEditpart grillingCompartment=null;
+
+ public static String CONNECT_TO_GRILLING_MANAGEMENT="CONNECT_TO_GRILLING_MANAGEMENT";
+
+ protected View rowStart=null;
+ protected View rowFinish=null;
+ protected View columnStart=null;
+ protected View columnFinish=null;
+
+ /**
+ * Constructor.
+ *
+ */
+ public ConnectCombinedFragmentToGrillingEditPolicy() {
+ }
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#activate()
+ *
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ getDiagramEventBroker().addNotificationListener(((EObject)getHost().getModel()), this);
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ Bounds bounds=(Bounds) ((Node)((GraphicalEditPart)getHost()).getNotationView()).getLayoutConstraint();
+ try{
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ grilling.cleanUnusedRowAndColumn();
+ CombinedFragment combined=(CombinedFragment) ((GraphicalEditPart)getHost()).resolveSemanticElement();
+ if (grilling!=null){
+ PrecisionRectangle p=NotationHelper.getAbsoluteBounds((Node)((GraphicalEditPart)getHost()).getNotationView());
+ rowStart=grilling.getRowTolisten(p.y(), combined);
+ columnStart=grilling.getColumnTolisten(p.y(), combined);
+ getDiagramEventBroker().addNotificationListener(rowStart, this);
+ getDiagramEventBroker().addNotificationListener(columnStart, this);
+ if( bounds.getHeight()!=-1){
+ rowFinish=grilling.getRowTolisten(p.y()+bounds.getHeight(), combined);
+ }
+ else{
+ rowFinish=grilling.getRowTolisten(p.y()+CCombinedFragmentEditPart.DEFAULT_HEIGHT, combined);
+ }
+
+ if( bounds.getWidth()!=-1){
+ rowFinish=grilling.getColumnTolisten(p.x()+bounds.getWidth(), combined);
+ }
+ else{
+ rowFinish=grilling.getColumnTolisten(p.x()+CCombinedFragmentEditPart.DEFAULT_WIDTH, combined);
+ }
+ getDiagramEventBroker().addNotificationListener(rowStart, this);
+
+
+
+ }
+ }catch (NoGrillElementFound e) {
+ UMLDiagramEditorPlugin.log.error(e);
+ }
+
+ }
+
+ /* Gets the diagram event broker from the editing domain.
+ *
+ * @return the diagram event broker
+ */
+ protected DiagramEventBroker getDiagramEventBroker() {
+ TransactionalEditingDomain theEditingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ if (null != theEditingDomain) {
+ return DiagramEventBroker.getInstance(theEditingDomain);
+ }
+ return null;
+ }
+
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#deactivate()
+ *
+ */
+ @Override
+ public void deactivate() {
+ getDiagramEventBroker().removeNotificationListener(((EObject)getHost().getModel()), this);
+ super.deactivate();
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ //Display imprecision
+ int displayImprecision=2;
+ GrillingManagementEditPolicy grilling=null;
+ getDiagramEventBroker().addNotificationListener(((EObject)getHost().getModel()), this);
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ try{
+ grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ }catch (Exception e) {
+ }
+
+ Node nodeContainer=(Node)(((GraphicalEditPart)getHost()).getNotationView()).eContainer();
+ PrecisionRectangle originPosition= NotationHelper.getAbsoluteBounds(nodeContainer);
+ Bounds bounds=(Bounds) ((Node)((GraphicalEditPart)getHost()).getNotationView()).getLayoutConstraint();
+
+
+ //the ROW has changed so we must update the position of the combined fragment
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Location && (((EObject)notification.getNotifier()).eContainer().equals(rowStart))){
+ //The grill is in absolute
+ Location boundsRow=(Location) ((Node)rowStart).getLayoutConstraint();
+ execute(new GMFtoEMFCommandWrapper(new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update Row", new EObjectAdapter( ((GraphicalEditPart)getHost()).getNotationView()),
+ new Point(bounds.getX(),boundsRow.getY()-originPosition.y()+displayImprecision ))));
+ }
+ //the COLUMN has changed so we must update the postion of the combined fragment
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Location && (((EObject)notification.getNotifier()).eContainer().equals(columnStart))){
+ //The grill is in absolute
+ Location boundsRow=(Location) ((Node)columnStart).getLayoutConstraint();
+ execute(new GMFtoEMFCommandWrapper(new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update Column", new EObjectAdapter( ((GraphicalEditPart)getHost()).getNotationView()),
+ new Point(bounds.getX(),boundsRow.getY()-originPosition.y()+displayImprecision ))));
+ }
+ //the size has change
+ // we must update all links.
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Bounds && (((EObject)notification.getNotifier()).eContainer().equals(((EObject)getHost().getModel())))){
+ PrecisionRectangle p=NotationHelper.getAbsoluteBounds((Node)((GraphicalEditPart)getHost()).getNotationView());
+
+
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getSize_Height())){
+ grilling.setRespectMargin(true);
+ int newPosition=p.y()+notification.getNewIntValue()-displayImprecision;
+ grilling.updateYpositionForRow((DecorationNode) rowFinish, p.y()+notification.getNewIntValue()-displayImprecision);
+ // execute(new GMFtoEMFCommandWrapper(new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update Row finish", new EObjectAdapter( rowFinish),
+ // new Point(0,p.y()+notification.getNewIntValue()-displayImprecision))));
+
+
+ }
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getLocation_Y())){
+
+ ExecutionSpecification exec=(ExecutionSpecification) ((GraphicalEditPart)getHost()).resolveSemanticElement();
+ getDiagramEventBroker().removeNotificationListener(rowStart, this);
+ grilling.dissociateViewToGrill(rowStart, exec.getStart());
+ //Set the coordinate in absolute
+ try {
+ rowStart=grilling.getRowTolisten(p.y(), exec.getStart());
+ getDiagramEventBroker().addNotificationListener(rowStart, this);
+ grilling.updateYpositionForRow((DecorationNode) rowFinish, p.y()+p.height-displayImprecision);
+ } catch (Exception e) {
+ // TODO: handle exception
+ }
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectEdgeToGrillingEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectEdgeToGrillingEditPolicy.java
new file mode 100644
index 00000000000..a523c35bea1
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectEdgeToGrillingEditPolicy.java
@@ -0,0 +1,313 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.IdentityAnchor;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AutomaticNotationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.IdentityAnchorHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CLifeLineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ *
+ */
+public class ConnectEdgeToGrillingEditPolicy extends GraphicalEditPolicyEx implements AutomaticNotationEditPolicy, NotificationListener, IGrillingEditpolicy {
+
+ protected GrillingEditpart grillingCompartment=null;
+
+ public static String CONNECT_TO_GRILLING_MANAGEMENT="CONNECT_TO_GRILLING_MANAGEMENT";
+
+
+ private View rowSource;
+
+ private View rowTarget;
+ private boolean canUpdateGrill=true;
+ /**
+ * Constructor.
+ *
+ */
+ public ConnectEdgeToGrillingEditPolicy() {
+ }
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#activate()
+ *
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ getDiagramEventBroker().addNotificationListener(((EObject)getHost().getModel()), this);
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ try{
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ if (grilling!=null){
+ ConnectionEditPart connectionEditPart= (ConnectionEditPart)getHost();
+ Edge edge=(Edge)connectionEditPart.getModel();
+ IdentityAnchor sourceAnchor=(IdentityAnchor)edge.getSourceAnchor();
+ IdentityAnchor targetAnchor=(IdentityAnchor)edge.getSourceAnchor();
+ if( sourceAnchor!=null && targetAnchor!=null){
+
+ //source
+ View viewsr=edge.getSource();
+ Message m= (Message)connectionEditPart.resolveSemanticElement();
+ double ypercent=IdentityAnchorHelper.getYPercentage(sourceAnchor);
+ PrecisionRectangle bounds= NotationHelper.getAbsoluteBounds((Node)viewsr);
+ double localY=(bounds.preciseHeight()*ypercent);
+ double absoluteY=localY+bounds.preciseY();
+ rowSource=grilling.getRowTolisten((int)absoluteY,m.getSendEvent());
+ getDiagramEventBroker().addNotificationListener(rowTarget, this);
+
+ //target
+ View viewtg=edge.getTarget();
+ ypercent=IdentityAnchorHelper.getYPercentage(targetAnchor);
+ bounds= NotationHelper.getAbsoluteBounds((Node)viewtg);
+ localY=(bounds.preciseHeight()*ypercent);
+ absoluteY=localY+bounds.preciseY();
+ rowTarget=grilling.getRowTolisten((int)absoluteY,m.getReceiveEvent());
+ getDiagramEventBroker().addNotificationListener(rowTarget, this);
+ }
+
+ }
+ }catch (NoGrillElementFound e) {
+ UMLDiagramEditorPlugin.log.error(e);
+ }
+ }
+
+ /* Gets the diagram event broker from the editing domain.
+ *
+ * @return the diagram event broker
+ */
+ protected DiagramEventBroker getDiagramEventBroker() {
+ TransactionalEditingDomain theEditingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ if (null != theEditingDomain) {
+ return DiagramEventBroker.getInstance(theEditingDomain);
+ }
+ return null;
+ }
+
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#deactivate()
+ *
+ */
+ @Override
+ public void deactivate() {
+ getDiagramEventBroker().removeNotificationListener(((EObject)getHost().getModel()), this);
+ super.deactivate();
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ if( diagramEditPart!=null){
+ //CREATION
+ if( notification.getNotifier().equals(((EObject)getHost().getModel())) && NotationPackage.eINSTANCE.getEdge_SourceAnchor().equals(notification.getFeature())){
+ IdentityAnchor anchor=(IdentityAnchor)notification.getNewValue();
+ ConnectionEditPart connectionEditPart= (ConnectionEditPart)getHost();
+ Message m= (Message)connectionEditPart.resolveSemanticElement();
+ CLifeLineEditPart sourceEditpart=(CLifeLineEditPart)connectionEditPart.getSource();
+ int anchorY=computeAnchorPositionNotation(anchor, sourceEditpart);
+ try{
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ if (grilling!=null){
+ rowSource=grilling.getRowTolisten(anchorY,m.getSendEvent());
+ getDiagramEventBroker().addNotificationListener(rowSource, this);
+
+ }
+ }catch (NoGrillElementFound e) {
+ UMLDiagramEditorPlugin.log.error(e);
+ }
+ }
+
+ //CREATION
+ if( notification.getNotifier().equals(((EObject)getHost().getModel())) && NotationPackage.eINSTANCE.getEdge_TargetAnchor().equals(notification.getFeature())){
+ IdentityAnchor anchor=(IdentityAnchor)notification.getNewValue();
+ ConnectionEditPart connectionEditPart= (ConnectionEditPart)getHost();
+ CLifeLineEditPart editpart=(CLifeLineEditPart)connectionEditPart.getTarget();
+ Message m= (Message)connectionEditPart.resolveSemanticElement();
+ int anchorY=computeAnchorPositionNotation(anchor, editpart);
+ try{
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ if (grilling!=null){
+ rowTarget=grilling.getRowTolisten(anchorY, m.getReceiveEvent());
+ getDiagramEventBroker().addNotificationListener(rowTarget, this);
+ }
+ }catch (NoGrillElementFound e) {
+ UMLDiagramEditorPlugin.log.error(e);
+ }
+ }
+ //A move has been done by the user
+ if( notification.getEventType()==Notification.SET&& notification.getNotifier() instanceof IdentityAnchor ){
+ ConnectionEditPart connectionEditPart= (ConnectionEditPart)getHost();
+ Edge edge= (Edge)connectionEditPart.getNotationView();
+ if( notification.getNotifier().equals(edge.getSourceAnchor())&& rowSource!=null){
+ IdentityAnchor anchor=(IdentityAnchor)edge.getSourceAnchor();
+ CLifeLineEditPart sourceEditpart=(CLifeLineEditPart)connectionEditPart.getSource();
+ int anchorY=computeAnchorPositionNotation(anchor, sourceEditpart);
+ /////////////////////////////////////////////////////
+ System.out.println("A mouve done for "+((NamedElement)connectionEditPart.resolveSemanticElement()).getName()+" by the user to source "+anchorY);
+ /////////////////////////////////////////////////////
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ if (grilling!=null){
+ grilling.updateYpositionForRow((DecorationNode)rowSource, anchorY);
+ }
+ }
+ if( notification.getNotifier().equals(edge.getTargetAnchor())&& rowTarget!=null){
+ IdentityAnchor anchor=(IdentityAnchor)edge.getTargetAnchor();
+ CLifeLineEditPart editpart=(CLifeLineEditPart)connectionEditPart.getTarget();
+ int anchorY=computeAnchorPositionNotation(anchor, editpart);
+ /////////////////////////////////////////////////////
+ System.out.println("A mouve done for "+((NamedElement)connectionEditPart.resolveSemanticElement()).getName()+" by the user to target "+anchorY);
+ /////////////////////////////////////////////////////
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ if (grilling!=null){
+ grilling.updateYpositionForRow((DecorationNode)rowTarget, anchorY);
+ }
+ }
+
+ }
+
+
+ //a ROW has changed at Source
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Location &&(((EObject)notification.getNotifier()).eContainer().equals(rowSource)) ){
+
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ if (grilling!=null){
+ if(Math.abs(notification.getOldIntValue()-notification.getNewIntValue())>grilling.threshold){
+ ConnectionEditPart connectionEditPart= (ConnectionEditPart)getHost();
+
+ Edge edge=(Edge)connectionEditPart.getModel();
+ IdentityAnchor sourceAchor=(IdentityAnchor)edge.getSourceAnchor();
+ View viewsr=edge.getSource();
+ double xpercent=IdentityAnchorHelper.getXPercentage(sourceAchor);
+
+ //calculate bounds from notation
+ PrecisionRectangle bounds= NotationHelper.getAbsoluteBounds((Node)viewsr);
+ Location boundsRow=(Location) ((Node)rowSource).getLayoutConstraint();
+ if( bounds.height==-1.0){
+ //it is very bad , because this is a default valued given by the figure...
+ if(connectionEditPart.getSource() instanceof CLifeLineEditPart){
+ bounds.height=CLifeLineEditPart.DEFAUT_HEIGHT;
+ }
+ }
+ Integer intergerY= new Integer(boundsRow.getY());
+ double newY= intergerY.doubleValue();
+ double localY=(newY-bounds.preciseY());
+
+ double newPercentY = localY/bounds.preciseHeight();
+
+ ///////////////////////////////////////////////////////////
+ System.out.println("A row change done for the source"+((NamedElement)connectionEditPart.resolveSemanticElement()).getName()+" by the user to "+newY+"-->"+localY+" percent : old: "+ sourceAchor+" new "+newPercentY);
+ /////////////////////////////////////////////////////////////////////////////////////////
+ if(newPercentY>1){
+ newPercentY=0.99;
+ }
+ if(newPercentY<0){
+ newPercentY=0.01;
+ }
+ if (newPercentY <= 1 && newPercentY >= 0 && newPercentY <= 1 && newPercentY >= 0) {
+ final String newIdValue = IdentityAnchorHelper.createNewAnchorIdValue(xpercent, newPercentY);
+ execute(new SetCommand(getDiagramEditPart(getHost()).getEditingDomain(), sourceAchor, NotationPackage.eINSTANCE.getIdentityAnchor_Id(), newIdValue));
+ }
+ }
+ }
+ }
+ }
+ //a ROW has changed at target
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Location &&(((EObject)notification.getNotifier()).eContainer().equals(rowTarget)) ){
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ if (grilling!=null){
+ if(Math.abs(notification.getOldIntValue()-notification.getNewIntValue())>grilling.threshold){
+ ConnectionEditPart connectionEditPart= (ConnectionEditPart)getHost();
+ Edge edge=(Edge)connectionEditPart.getModel();
+ IdentityAnchor targetAchor=(IdentityAnchor)edge.getTargetAnchor();
+ View viewtg=edge.getTarget();
+ double xpercent=IdentityAnchorHelper.getXPercentage(targetAchor);
+ //margin calculus
+ PrecisionRectangle bounds= NotationHelper.getAbsoluteBounds((Node)viewtg);
+ if( bounds.height==-1.0){
+ //it is very bad , because this is a default valued given by the figure...
+ if(connectionEditPart.getTarget() instanceof CLifeLineEditPart){
+ bounds.height=CLifeLineEditPart.DEFAUT_HEIGHT;
+ }
+ }
+ Location boundsRow=(Location) ((Node)rowTarget).getLayoutConstraint();
+
+ Integer intergerY= new Integer(boundsRow.getY());
+ double newY= intergerY.doubleValue();
+ double localY=(newY-bounds.preciseY());
+ double newPercentY = localY/bounds.preciseHeight();
+ ///////////////////////////////////////////////////////////
+ System.out.println("A row change done for the target"+((NamedElement)connectionEditPart.resolveSemanticElement()).getName()+" by the user to "+newY+"-->"+localY+" percent : old: "+ targetAchor+" new "+newPercentY);
+ /////////////////////////////////////////////////////////////////////////////////////////
+
+ if(newPercentY>1){
+ newPercentY=0.99;
+ }
+ if(newPercentY<0){
+ newPercentY=0.01;
+ }
+ if (newPercentY <= 1 && newPercentY >= 0 && newPercentY <= 1 && newPercentY >= 0) {
+ final String newIdValue = IdentityAnchorHelper.createNewAnchorIdValue(xpercent, newPercentY);
+ execute(new SetCommand(getDiagramEditPart(getHost()).getEditingDomain(), targetAchor, NotationPackage.eINSTANCE.getIdentityAnchor_Id(), newIdValue));
+ }
+ }
+ }
+ }
+ }
+
+ public static int computeAnchorPositionNotation(IdentityAnchor anchor,GraphicalEditPart nodeEditPart){
+ double yPercent=IdentityAnchorHelper.getYPercentage(anchor);
+ Node node=(Node)nodeEditPart.getNotationView();
+ PrecisionRectangle bounds= NotationHelper.getAbsoluteBounds(node);
+ double height=bounds.preciseHeight();
+ if( height==-1.0){
+ //it is very bad , because this is a default valued given by the figure...
+ if(nodeEditPart instanceof CLifeLineEditPart){
+ height=CLifeLineEditPart.DEFAUT_HEIGHT;
+ }
+ }
+ int anchorY= (int) (height*yPercent)+bounds.y;
+ return anchorY;
+ }
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectExecutionNodeToGrillingEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectExecutionNodeToGrillingEditPolicy.java
new file mode 100644
index 00000000000..30cd6f1554f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectExecutionNodeToGrillingEditPolicy.java
@@ -0,0 +1,284 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.IdentityAnchor;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AutomaticNotationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.IdentityAnchorHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CLifeLineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomActionExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+
+/**
+ * @author PT202707
+ *
+ */
+public class ConnectExecutionNodeToGrillingEditPolicy extends GraphicalEditPolicyEx implements AutomaticNotationEditPolicy, NotificationListener, IGrillingEditpolicy {
+
+ protected GrillingEditpart grillingCompartment=null;
+
+ public static String CONNECT_TO_GRILLING_MANAGEMENT="CONNECT_TO_GRILLING_MANAGEMENT";
+
+ protected View rowStart=null;
+ protected View rowFinish=null;
+
+ /**
+ * Constructor.
+ *
+ */
+ public ConnectExecutionNodeToGrillingEditPolicy() {
+ }
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#activate()
+ *
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ getDiagramEventBroker().addNotificationListener(((EObject)getHost().getModel()), this);
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ Bounds bounds=(Bounds) ((Node)((GraphicalEditPart)getHost()).getNotationView()).getLayoutConstraint();
+ try{
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ grilling.cleanUnusedRowAndColumn();
+ ExecutionSpecification exec=(ExecutionSpecification) ((GraphicalEditPart)getHost()).resolveSemanticElement();
+ if (grilling!=null){
+ PrecisionRectangle p=NotationHelper.getAbsoluteBounds((Node)((GraphicalEditPart)getHost()).getNotationView());
+ rowStart=grilling.getRowTolisten(p.y(), exec.getStart());
+ getDiagramEventBroker().addNotificationListener(rowStart, this);
+ if( bounds.getHeight()!=-1){
+ rowFinish=grilling.getRowTolisten(p.y()+bounds.getHeight(), exec.getFinish());
+ }
+ else{
+ rowFinish=grilling.getRowTolisten(p.y()+CustomActionExecutionSpecificationEditPart.DEFAULT_HEIGHT, exec.getFinish());
+ }
+ getDiagramEventBroker().addNotificationListener(rowStart, this);
+
+
+
+ }
+ }catch (NoGrillElementFound e) {
+ UMLDiagramEditorPlugin.log.error(e);
+ }
+
+ }
+
+ /* Gets the diagram event broker from the editing domain.
+ *
+ * @return the diagram event broker
+ */
+ protected DiagramEventBroker getDiagramEventBroker() {
+ TransactionalEditingDomain theEditingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ if (null != theEditingDomain) {
+ return DiagramEventBroker.getInstance(theEditingDomain);
+ }
+ return null;
+ }
+
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#deactivate()
+ *
+ */
+ @Override
+ public void deactivate() {
+ getDiagramEventBroker().removeNotificationListener(((EObject)getHost().getModel()), this);
+ super.deactivate();
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ //Display imprecision
+ int displayImprecision=2;
+ GrillingManagementEditPolicy grilling=null;
+ getDiagramEventBroker().addNotificationListener(((EObject)getHost().getModel()), this);
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ try{
+ grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ }catch (Exception e) {
+ }
+
+ Node nodeContainer=(Node)(((GraphicalEditPart)getHost()).getNotationView()).eContainer();
+ PrecisionRectangle originPosition= NotationHelper.getAbsoluteBounds(nodeContainer);
+ Bounds bounds=(Bounds) ((Node)((GraphicalEditPart)getHost()).getNotationView()).getLayoutConstraint();
+
+
+ //the ROW has changed
+ if( notification.getEventType()==notification.SET && notification.getNotifier() instanceof Location && (((EObject)notification.getNotifier()).eContainer().equals(rowStart))){
+
+ //The grill is in absolute
+ Location boundsRow=(Location) ((Node)rowStart).getLayoutConstraint();
+ execute(new GMFtoEMFCommandWrapper(new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update Row", new EObjectAdapter( ((GraphicalEditPart)getHost()).getNotationView()),
+ new Point(bounds.getX(),boundsRow.getY()-originPosition.y()+displayImprecision ))));
+
+ }
+
+ //the size has change
+ // we must update all links.
+ if( notification.getEventType()==notification.SET && notification.getNotifier() instanceof Bounds && (((EObject)notification.getNotifier()).eContainer().equals(((EObject)getHost().getModel())))){
+ PrecisionRectangle p=NotationHelper.getAbsoluteBounds((Node)((GraphicalEditPart)getHost()).getNotationView());
+
+
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getSize_Height())){
+ grilling.setRespectMargin(true);
+ int newPosition=p.y()+notification.getNewIntValue()-displayImprecision;
+ grilling.updateYpositionForRow((DecorationNode) rowFinish, p.y()+notification.getNewIntValue()-displayImprecision);
+ // execute(new GMFtoEMFCommandWrapper(new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update Row finish", new EObjectAdapter( rowFinish),
+ // new Point(0,p.y()+notification.getNewIntValue()-displayImprecision))));
+ Node node=(Node)this.getHost().getModel();
+ java.util.List<Edge> sourceEdge= node.getSourceEdges();
+ for (Edge edge : sourceEdge) {
+ updateAnchorFromHeight(edge,((Node)getHost().getModel()),notification.getNewIntValue()- notification.getOldIntValue());
+ }
+ java.util.List<Edge> targetEdge= node.getTargetEdges();
+ for (Edge edge : targetEdge) {
+ updateAnchorFromHeight(edge,((Node)getHost().getModel()),notification.getNewIntValue()- notification.getOldIntValue());
+ }
+
+ }
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getLocation_Y())){
+
+ ExecutionSpecification exec=(ExecutionSpecification) ((GraphicalEditPart)getHost()).resolveSemanticElement();
+ getDiagramEventBroker().removeNotificationListener(rowStart, this);
+ grilling.dissociateViewToGrill(rowStart, exec.getStart());
+ //Set the coordinate in absolute
+ try {
+ rowStart=grilling.getRowTolisten(p.y(), exec.getStart());
+ getDiagramEventBroker().addNotificationListener(rowStart, this);
+ grilling.updateYpositionForRow((DecorationNode) rowFinish, p.y()+p.height-displayImprecision);
+ } catch (Exception e) {
+ // TODO: handle exception
+ }
+
+
+ //execute( new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update row", new EObjectAdapter(rowStart), new Point(0,p.y()-displayImprecision)));
+
+ Node node=(Node)this.getHost().getModel();
+ java.util.List<Edge> sourceEdge= node.getSourceEdges();
+ for (Edge edge : sourceEdge) {
+ updateAnchorFromY(edge,((Node)getHost().getModel()),notification.getOldIntValue(),notification.getNewIntValue());
+ }
+ java.util.List<Edge> targetEdge= node.getTargetEdges();
+ for (Edge edge : targetEdge) {
+ updateAnchorFromY(edge,((Node)getHost().getModel()),notification.getOldIntValue(),notification.getNewIntValue());
+ }
+
+ }
+ }
+
+ }
+
+ /**
+ * @param sourceEdge
+ * @param eObject
+ */
+ private void updateAnchorFromHeight(Edge edge, Node node, int deltaHeight) {
+ IdentityAnchor anchor=null;
+ if (edge.getSource().equals(node)){
+ anchor=(IdentityAnchor)edge.getSourceAnchor();
+ }
+ else{
+ anchor=(IdentityAnchor)edge.getTargetAnchor();
+ }
+ double yPercent=IdentityAnchorHelper.getYPercentage(anchor);
+ double xPercent=IdentityAnchorHelper.getXPercentage(anchor);
+
+ //calculate bounds from notation
+ PrecisionRectangle bounds= NotationHelper.getAbsoluteBounds(node);
+ double oldSize=bounds.preciseHeight()-deltaHeight;
+ if( oldSize==-1.0){
+ //it is very bad , because this is a default valued given by the figure...
+ if( getHost() instanceof CLifeLineEditPart){
+ oldSize=CLifeLineEditPart.DEFAUT_HEIGHT;
+ }
+ }
+
+ double newPercentY = (yPercent*oldSize)/(bounds.preciseHeight());
+ if (newPercentY <= 1 && newPercentY >= 0 && newPercentY <= 1 && newPercentY >= 0) {
+ final String newIdValue = IdentityAnchorHelper.createNewAnchorIdValue(xPercent, newPercentY);
+ execute(new SetCommand(getDiagramEditPart(getHost()).getEditingDomain(), anchor, NotationPackage.eINSTANCE.getIdentityAnchor_Id(), newIdValue));
+ }
+ }
+ /**
+ * @param sourceEdge
+ * @param eObject
+ */
+ private void updateAnchorFromY(Edge edge, Node node, int oldY, int newY) {
+ IdentityAnchor anchor=null;
+ if (edge.getSource().equals(node)){
+ anchor=(IdentityAnchor)edge.getSourceAnchor();
+ }
+ else{
+ anchor=(IdentityAnchor)edge.getTargetAnchor();
+ }
+ if(!anchor.getId().trim().equals("")){
+ double yPercent=IdentityAnchorHelper.getYPercentage(anchor);
+ double xPercent=IdentityAnchorHelper.getXPercentage(anchor);
+
+ //calculate bounds from notation
+ PrecisionRectangle bounds= NotationHelper.getAbsoluteBounds(node);
+ double height=bounds.preciseHeight();
+ if( height==-1.0){
+ //it is very bad , because this is a default valued given by the figure...
+ if( getHost() instanceof CLifeLineEditPart){
+ height=CLifeLineEditPart.DEFAUT_HEIGHT;
+ }
+ }
+
+ double newPercentY = (oldY-newY)/(height)+yPercent;
+ if(newPercentY<0){
+ newPercentY=0.1;
+ }
+ if(newPercentY>1){
+ newPercentY=0.9;
+ }
+ if (newPercentY <= 1 && newPercentY >= 0 && newPercentY <= 1 && newPercentY >= 0) {
+ final String newIdValue = IdentityAnchorHelper.createNewAnchorIdValue(xPercent, newPercentY);
+ execute(new SetCommand(getDiagramEditPart(getHost()).getEditingDomain(), anchor, NotationPackage.eINSTANCE.getIdentityAnchor_Id(), newIdValue));
+ }
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectLifeLineToGrillingEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectLifeLineToGrillingEditPolicy.java
new file mode 100644
index 00000000000..d92dd5d663e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectLifeLineToGrillingEditPolicy.java
@@ -0,0 +1,258 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.IdentityAnchor;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AutomaticNotationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.IdentityAnchorHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CLifeLineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * @author PT202707
+ *
+ */
+public class ConnectLifeLineToGrillingEditPolicy extends ConnectToGridEditPolicy implements AutomaticNotationEditPolicy, NotificationListener, IGrillingEditpolicy {
+
+ protected GrillingEditpart grillingCompartment=null;
+
+ public static String CONNECT_TO_GRILLING_MANAGEMENT="CONNECT_TO_GRILLING_MANAGEMENT";
+
+ protected DecorationNode rowStart=null;
+ protected DecorationNode columnStart=null;
+
+ /**
+ * Constructor.
+ *
+ */
+ public ConnectLifeLineToGrillingEditPolicy() {
+ }
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#activate()
+ *
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ getDiagramEventBroker().addNotificationListener(((EObject)getHost().getModel()), this);
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ try{
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ grilling.cleanUnusedRowAndColumn();
+ if (grilling!=null){
+ rowStart=(DecorationNode)grilling.getRowTolisten( (Node)((GraphicalEditPart)getHost()).getNotationView(), (Element)((GraphicalEditPart)getHost()).resolveSemanticElement());
+ getDiagramEventBroker().addNotificationListener(rowStart, this);
+
+ columnStart=(DecorationNode)grilling.getColumnTolisten((Node)((GraphicalEditPart)getHost()).getNotationView(),(Element)((GraphicalEditPart)getHost()).resolveSemanticElement());
+ getDiagramEventBroker().addNotificationListener(columnStart, this);
+
+
+ }
+ }catch (NoGrillElementFound e) {
+ UMLDiagramEditorPlugin.log.error(e);
+ }
+
+ }
+
+ /* Gets the diagram event broker from the editing domain.
+ *
+ * @return the diagram event broker
+ */
+ protected DiagramEventBroker getDiagramEventBroker() {
+ TransactionalEditingDomain theEditingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ if (null != theEditingDomain) {
+ return DiagramEventBroker.getInstance(theEditingDomain);
+ }
+ return null;
+ }
+
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#deactivate()
+ *
+ */
+ @Override
+ public void deactivate() {
+ getDiagramEventBroker().removeNotificationListener(((EObject)getHost().getModel()), this);
+ super.deactivate();
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ //the ROW has changed
+ Node nodeContainer=(Node)(((GraphicalEditPart)getHost()).getNotationView()).eContainer();
+ PrecisionRectangle originPosition= NotationHelper.getAbsoluteBounds(nodeContainer);
+ Bounds currentBounds=(Bounds) ((Node)((GraphicalEditPart)getHost()).getNotationView()).getLayoutConstraint();
+
+ //the ROW has changed so we must update the position of the combined fragment
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Location && (((EObject)notification.getNotifier()).eContainer().equals(rowStart))){
+ //The grill is in absolute
+ //compute next position for View.bound.y
+ Location boundsRow=(Location) ((Node)rowStart).getLayoutConstraint();
+ int newY=boundsRow.getY()-originPosition.y();
+ updateNodePositionOfControler(currentBounds.getX(), newY);
+ }
+ //the COLUMN has changed so we must update the postion of the combined fragment
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Location && (((EObject)notification.getNotifier()).eContainer().equals(columnStart))){
+ //The grill is in absolute
+ Location boundsColumn=(Location) ((Node)columnStart).getLayoutConstraint();
+ int newX=boundsColumn.getX()-originPosition.x();
+ updateNodePositionOfControler(newX, currentBounds.getY());
+
+ }
+
+ //the size has change
+ // we must update all links.
+ //UPDATE COLUM AND ROW of THE GRID
+ if( notification.getEventType()==notification.SET && notification.getNotifier() instanceof Bounds && (((EObject)notification.getNotifier()).eContainer().equals(((EObject)getHost().getModel())))){
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getSize_Height())){
+ Node node=(Node)this.getHost().getModel();
+ java.util.List<Edge> sourceEdge= node.getSourceEdges();
+ for (Edge edge : sourceEdge) {
+ updateAnchorFromHeight(edge,((Node)getHost().getModel()),notification.getNewIntValue()- notification.getOldIntValue());
+ }
+ java.util.List<Edge> targetEdge= node.getTargetEdges();
+ for (Edge edge : targetEdge) {
+ updateAnchorFromHeight(edge,((Node)getHost().getModel()),notification.getNewIntValue()- notification.getOldIntValue());
+ }
+
+ }
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getLocation_Y())){
+ int newY=notification.getNewIntValue()+originPosition.y();
+ updatePositionGridAxis(rowStart, 0, newY);
+ Node node=(Node)this.getHost().getModel();
+ java.util.List<Edge> sourceEdge= node.getSourceEdges();
+ for (Edge edge : sourceEdge) {
+ updateAnchorFromY(edge,((Node)getHost().getModel()),notification.getOldIntValue(),notification.getNewIntValue());
+ }
+ java.util.List<Edge> targetEdge= node.getTargetEdges();
+ for (Edge edge : targetEdge) {
+ updateAnchorFromY(edge,((Node)getHost().getModel()),notification.getOldIntValue(),notification.getNewIntValue());
+ }
+
+ }
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getLocation_X())){
+ //compute next position for RowStart
+ int newX=notification.getNewIntValue()+originPosition.x();
+ updatePositionGridAxis(columnStart, newX, 0);
+
+ }
+ }
+
+ }
+
+ /**
+ * @param sourceEdge
+ * @param eObject
+ */
+ private void updateAnchorFromHeight(Edge edge, Node node, int deltaHeight) {
+ IdentityAnchor anchor=null;
+ if (edge.getSource().equals(node)){
+ anchor=(IdentityAnchor)edge.getSourceAnchor();
+ }
+ else{
+ anchor=(IdentityAnchor)edge.getTargetAnchor();
+ }
+ double yPercent=IdentityAnchorHelper.getYPercentage(anchor);
+ double xPercent=IdentityAnchorHelper.getXPercentage(anchor);
+
+ //calculate bounds from notation
+ PrecisionRectangle bounds= NotationHelper.getAbsoluteBounds(node);
+ double oldSize=bounds.preciseHeight()-deltaHeight;
+ if( oldSize==-1.0){
+ //it is very bad , because this is a default valued given by the figure...
+ if( getHost() instanceof CLifeLineEditPart){
+ oldSize=CLifeLineEditPart.DEFAUT_HEIGHT;
+ }
+ }
+
+ double newPercentY = (yPercent*oldSize)/(bounds.preciseHeight());
+ if (newPercentY <= 1 && newPercentY >= 0 && newPercentY <= 1 && newPercentY >= 0) {
+ final String newIdValue = IdentityAnchorHelper.createNewAnchorIdValue(xPercent, newPercentY);
+ execute(new SetCommand(getDiagramEditPart(getHost()).getEditingDomain(), anchor, NotationPackage.eINSTANCE.getIdentityAnchor_Id(), newIdValue));
+ }
+ }
+ /**
+ * @param sourceEdge
+ * @param eObject
+ */
+ private void updateAnchorFromY(Edge edge, Node node, int oldY, int newY) {
+ IdentityAnchor anchor=null;
+ if (edge.getSource().equals(node)){
+ anchor=(IdentityAnchor)edge.getSourceAnchor();
+ }
+ else{
+ anchor=(IdentityAnchor)edge.getTargetAnchor();
+ }
+ if(!anchor.getId().trim().equals("")){
+ double yPercent=IdentityAnchorHelper.getYPercentage(anchor);
+ double xPercent=IdentityAnchorHelper.getXPercentage(anchor);
+
+ //calculate bounds from notation
+ PrecisionRectangle bounds= NotationHelper.getAbsoluteBounds(node);
+ double height=bounds.preciseHeight();
+ if( height==-1.0){
+ //it is very bad , because this is a default valued given by the figure...
+ if( getHost() instanceof CLifeLineEditPart){
+ height=CLifeLineEditPart.DEFAUT_HEIGHT;
+ }
+ }
+
+ double newPercentY = (oldY-newY)/(height)+yPercent;
+ if(newPercentY<0){
+ newPercentY=0.1;
+ }
+ if(newPercentY>1){
+ newPercentY=0.9;
+ }
+ if (newPercentY <= 1 && newPercentY >= 0 && newPercentY <= 1 && newPercentY >= 0) {
+ final String newIdValue = IdentityAnchorHelper.createNewAnchorIdValue(xPercent, newPercentY);
+ execute(new SetCommand(getDiagramEditPart(getHost()).getEditingDomain(), anchor, NotationPackage.eINSTANCE.getIdentityAnchor_Id(), newIdValue));
+ }
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectNodeToGridEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectNodeToGridEditPolicy.java
new file mode 100644
index 00000000000..8eb616a8e9a
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectNodeToGridEditPolicy.java
@@ -0,0 +1,188 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AutomaticNotationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * this class is used to connect a node to the grid
+ * X, Y, X+Width, Y+HEIGHT
+ *
+ */
+public class ConnectNodeToGridEditPolicy extends ConnectToGridEditPolicy implements AutomaticNotationEditPolicy, NotificationListener, IGrillingEditpolicy {
+
+ protected GrillingEditpart grillingCompartment=null;
+
+ public static String CONNECT_TO_GRILLING_MANAGEMENT="CONNECT_TO_GRILLING_MANAGEMENT";
+
+ protected DecorationNode rowStart=null;
+ protected DecorationNode rowFinish=null;
+ protected DecorationNode columnStart=null;
+ protected DecorationNode columnFinish=null;
+
+ /**
+ * Constructor.
+ *
+ */
+ public ConnectNodeToGridEditPolicy() {
+ }
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#activate()
+ *
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ getDiagramEventBroker().addNotificationListener(((EObject)getHost().getModel()), this);
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ Node node=((Node)((GraphicalEditPart)getHost()).getNotationView());
+ try{
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ grilling.cleanUnusedRowAndColumn();
+ Node nodeContainer=(Node)(((GraphicalEditPart)getHost()).getNotationView()).eContainer();
+ PrecisionRectangle originPosition= NotationHelper.getAbsoluteBounds(nodeContainer);
+ Element element=(Element) ((GraphicalEditPart)getHost()).resolveSemanticElement();
+ if (grilling!=null){
+ PrecisionRectangle p=NotationHelper.getAbsoluteBounds((Node)((GraphicalEditPart)getHost()).getNotationView());
+ rowStart=grilling.getRowTolisten(originPosition.y+p.y(), element);
+ columnStart=grilling.getColumnTolisten(originPosition.x+p.x(), element);
+ getDiagramEventBroker().addNotificationListener(rowStart, this);
+ getDiagramEventBroker().addNotificationListener(columnStart, this);
+ rowFinish=grilling.getRowTolisten(originPosition.y+p.y()+BoundForEditPart.getHeightFromView(node), element);
+ getDiagramEventBroker().addNotificationListener(rowFinish, this);
+ columnFinish=grilling.getColumnTolisten(originPosition.x+p.x()+BoundForEditPart.getWidthFromView(node), element);
+ getDiagramEventBroker().addNotificationListener(columnFinish, this);
+
+
+
+ }
+ }catch (NoGrillElementFound e) {
+ UMLDiagramEditorPlugin.log.error(e);
+ }
+
+ }
+
+ /* Gets the diagram event broker from the editing domain.
+ *
+ * @return the diagram event broker
+ */
+ protected DiagramEventBroker getDiagramEventBroker() {
+ TransactionalEditingDomain theEditingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ if (null != theEditingDomain) {
+ return DiagramEventBroker.getInstance(theEditingDomain);
+ }
+ return null;
+ }
+
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#deactivate()
+ *
+ */
+ @Override
+ public void deactivate() {
+ getDiagramEventBroker().removeNotificationListener(((EObject)getHost().getModel()), this);
+ super.deactivate();
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ //Display imprecision
+ Node nodeContainer=(Node)(((GraphicalEditPart)getHost()).getNotationView()).eContainer();
+ PrecisionRectangle originPosition= NotationHelper.getAbsoluteBounds(nodeContainer);
+ Bounds currentBounds=(Bounds) ((Node)((GraphicalEditPart)getHost()).getNotationView()).getLayoutConstraint();
+
+ //the ROW has changed so we must update the position of the combined fragment
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Location && (((EObject)notification.getNotifier()).eContainer().equals(rowStart))){
+ //The grill is in absolute
+ //compute next position for View.bound.y
+ Location boundsRow=(Location) ((Node)rowStart).getLayoutConstraint();
+ int newY=boundsRow.getY()-originPosition.y();
+ updateNodePositionOfControler(currentBounds.getX(), newY);
+ }
+ //the COLUMN has changed so we must update the postion of the combined fragment
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Location && (((EObject)notification.getNotifier()).eContainer().equals(columnStart))){
+ //The grill is in absolute
+ Location boundsColumn=(Location) ((Node)columnStart).getLayoutConstraint();
+ int newX=boundsColumn.getX()-originPosition.x();
+ updateNodePositionOfControler(newX, currentBounds.getY());
+
+ }
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Location && (((EObject)notification.getNotifier()).eContainer().equals(rowFinish))){
+ //The grill is in absolute
+ Location boundsColumn=(Location) ((Node)rowFinish).getLayoutConstraint();
+ int newHeight=boundsColumn.getY()-originPosition.y()-currentBounds.getY();
+ updateSizeOfControler(currentBounds.getWidth(), newHeight);
+
+ }
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Location && (((EObject)notification.getNotifier()).eContainer().equals(columnFinish))){
+ //The grill is in absolute
+ Location boundsColumn=(Location) ((Node)columnFinish).getLayoutConstraint();
+ int newX=boundsColumn.getX()-originPosition.x()-currentBounds.getX();
+ updateSizeOfControler(newX, currentBounds.getHeight());
+
+ }
+
+ //UPDATE COLUM AND ROW of THE GRID
+ if( notification.getEventType()==Notification.SET && notification.getNotifier() instanceof Bounds && (((EObject)notification.getNotifier()).eContainer().equals(((EObject)getHost().getModel())))){
+ PrecisionRectangle p=NotationHelper.getAbsoluteBounds((Node)((GraphicalEditPart)getHost()).getNotationView());
+
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getSize_Height())){
+ int newY=p.y+p.height;
+ updatePositionGridAxis(rowFinish, 0, newY);
+
+ }
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getSize_Width())){
+ int newX=p.x+p.width;
+ updatePositionGridAxis(columnFinish, newX,0);
+
+ }
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getLocation_Y())){
+ //compute next position for RowStart
+ int newY=notification.getNewIntValue()+originPosition.y();
+ updatePositionGridAxis(rowStart, 0, newY);
+
+ }
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getLocation_X())){
+ //compute next position for RowStart
+ int newX=notification.getNewIntValue()+originPosition.x();
+ updatePositionGridAxis(columnStart, newX, 0);
+
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectNodeToGrillingEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectNodeToGrillingEditPolicy.java
new file mode 100644
index 00000000000..3282de4971b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectNodeToGrillingEditPolicy.java
@@ -0,0 +1,245 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.IdentityAnchor;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AutomaticNotationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.IdentityAnchorHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CLifeLineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * @author PT202707
+ *
+ */
+public class ConnectNodeToGrillingEditPolicy extends GraphicalEditPolicyEx implements AutomaticNotationEditPolicy, NotificationListener, IGrillingEditpolicy {
+
+ protected GrillingEditpart grillingCompartment=null;
+
+ public static String CONNECT_TO_GRILLING_MANAGEMENT="CONNECT_TO_GRILLING_MANAGEMENT";
+
+ protected View row=null;
+ protected View column=null;
+
+ /**
+ * Constructor.
+ *
+ */
+ public ConnectNodeToGrillingEditPolicy() {
+ }
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#activate()
+ *
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ getDiagramEventBroker().addNotificationListener(((EObject)getHost().getModel()), this);
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ try{
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ grilling.cleanUnusedRowAndColumn();
+ if (grilling!=null){
+ row=grilling.getRowTolisten( (Node)((GraphicalEditPart)getHost()).getNotationView(), (Element)((GraphicalEditPart)getHost()).resolveSemanticElement());
+ getDiagramEventBroker().addNotificationListener(row, this);
+
+ column=grilling.getColumnTolisten((Node)((GraphicalEditPart)getHost()).getNotationView(),(Element)((GraphicalEditPart)getHost()).resolveSemanticElement());
+ getDiagramEventBroker().addNotificationListener(column, this);
+
+
+ }
+ }catch (NoGrillElementFound e) {
+ UMLDiagramEditorPlugin.log.error(e);
+ }
+
+ }
+
+ /* Gets the diagram event broker from the editing domain.
+ *
+ * @return the diagram event broker
+ */
+ protected DiagramEventBroker getDiagramEventBroker() {
+ TransactionalEditingDomain theEditingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ if (null != theEditingDomain) {
+ return DiagramEventBroker.getInstance(theEditingDomain);
+ }
+ return null;
+ }
+
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#deactivate()
+ *
+ */
+ @Override
+ public void deactivate() {
+ getDiagramEventBroker().removeNotificationListener(((EObject)getHost().getModel()), this);
+ super.deactivate();
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ //the ROW has changed
+ Bounds bounds=(Bounds) ((Node)((GraphicalEditPart)getHost()).getNotationView()).getLayoutConstraint();
+ if( notification.getEventType()==notification.SET && notification.getNotifier() instanceof Location && (((EObject)notification.getNotifier()).eContainer().equals(row))){
+ Location boundsRow=(Location) ((Node)row).getLayoutConstraint();
+ execute(new GMFtoEMFCommandWrapper(new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update Row", new EObjectAdapter( ((GraphicalEditPart)getHost()).getNotationView()),
+ new Point(bounds.getX(),boundsRow.getY() ))));
+ }
+ // the column has changed
+ if( notification.getEventType()==notification.SET && notification.getNotifier() instanceof Location && (((EObject)notification.getNotifier()).eContainer().equals(column))){
+ Location boundsRow=(Location) ((Node)column).getLayoutConstraint();
+ execute(new GMFtoEMFCommandWrapper(new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update column", new EObjectAdapter( ((GraphicalEditPart)getHost()).getNotationView()),
+ new Point(boundsRow.getX(),bounds.getY() ))));
+ }
+
+ //the size has change
+ // we must update all links.
+ if( notification.getEventType()==notification.SET && notification.getNotifier() instanceof Bounds && (((EObject)notification.getNotifier()).eContainer().equals(((EObject)getHost().getModel())))){
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getSize_Height())){
+ Node node=(Node)this.getHost().getModel();
+ java.util.List<Edge> sourceEdge= node.getSourceEdges();
+ for (Edge edge : sourceEdge) {
+ updateAnchorFromHeight(edge,((Node)getHost().getModel()),notification.getNewIntValue()- notification.getOldIntValue());
+ }
+ java.util.List<Edge> targetEdge= node.getTargetEdges();
+ for (Edge edge : targetEdge) {
+ updateAnchorFromHeight(edge,((Node)getHost().getModel()),notification.getNewIntValue()- notification.getOldIntValue());
+ }
+
+ }
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getLocation_Y())){
+ execute( new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update row", new EObjectAdapter(row), new Point(0,notification.getNewIntValue())));
+ Node node=(Node)this.getHost().getModel();
+ java.util.List<Edge> sourceEdge= node.getSourceEdges();
+ for (Edge edge : sourceEdge) {
+ updateAnchorFromY(edge,((Node)getHost().getModel()),notification.getOldIntValue(),notification.getNewIntValue());
+ }
+ java.util.List<Edge> targetEdge= node.getTargetEdges();
+ for (Edge edge : targetEdge) {
+ updateAnchorFromY(edge,((Node)getHost().getModel()),notification.getOldIntValue(),notification.getNewIntValue());
+ }
+
+ }
+ if( notification.getFeature().equals(NotationPackage.eINSTANCE.getLocation_X())){
+ execute( new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update column", new EObjectAdapter(column), new Point(notification.getNewIntValue(),0)));
+ }
+ }
+
+ }
+
+ /**
+ * @param sourceEdge
+ * @param eObject
+ */
+ private void updateAnchorFromHeight(Edge edge, Node node, int deltaHeight) {
+ IdentityAnchor anchor=null;
+ if (edge.getSource().equals(node)){
+ anchor=(IdentityAnchor)edge.getSourceAnchor();
+ }
+ else{
+ anchor=(IdentityAnchor)edge.getTargetAnchor();
+ }
+ double yPercent=IdentityAnchorHelper.getYPercentage(anchor);
+ double xPercent=IdentityAnchorHelper.getXPercentage(anchor);
+
+ //calculate bounds from notation
+ PrecisionRectangle bounds= NotationHelper.getAbsoluteBounds(node);
+ double oldSize=bounds.preciseHeight()-deltaHeight;
+ if( oldSize==-1.0){
+ //it is very bad , because this is a default valued given by the figure...
+ if( getHost() instanceof CLifeLineEditPart){
+ oldSize=CLifeLineEditPart.DEFAUT_HEIGHT;
+ }
+ }
+
+ double newPercentY = (yPercent*oldSize)/(bounds.preciseHeight());
+ if (newPercentY <= 1 && newPercentY >= 0 && newPercentY <= 1 && newPercentY >= 0) {
+ final String newIdValue = IdentityAnchorHelper.createNewAnchorIdValue(xPercent, newPercentY);
+ execute(new SetCommand(getDiagramEditPart(getHost()).getEditingDomain(), anchor, NotationPackage.eINSTANCE.getIdentityAnchor_Id(), newIdValue));
+ }
+ }
+ /**
+ * @param sourceEdge
+ * @param eObject
+ */
+ private void updateAnchorFromY(Edge edge, Node node, int oldY, int newY) {
+ IdentityAnchor anchor=null;
+ if (edge.getSource().equals(node)){
+ anchor=(IdentityAnchor)edge.getSourceAnchor();
+ }
+ else{
+ anchor=(IdentityAnchor)edge.getTargetAnchor();
+ }
+ if(!anchor.getId().trim().equals("")){
+ double yPercent=IdentityAnchorHelper.getYPercentage(anchor);
+ double xPercent=IdentityAnchorHelper.getXPercentage(anchor);
+
+ //calculate bounds from notation
+ PrecisionRectangle bounds= NotationHelper.getAbsoluteBounds(node);
+ double height=bounds.preciseHeight();
+ if( height==-1.0){
+ //it is very bad , because this is a default valued given by the figure...
+ if( getHost() instanceof CLifeLineEditPart){
+ height=CLifeLineEditPart.DEFAUT_HEIGHT;
+ }
+ }
+
+ double newPercentY = (oldY-newY)/(height)+yPercent;
+ if(newPercentY<0){
+ newPercentY=0.1;
+ }
+ if(newPercentY>1){
+ newPercentY=0.9;
+ }
+ if (newPercentY <= 1 && newPercentY >= 0 && newPercentY <= 1 && newPercentY >= 0) {
+ final String newIdValue = IdentityAnchorHelper.createNewAnchorIdValue(xPercent, newPercentY);
+ execute(new SetCommand(getDiagramEditPart(getHost()).getEditingDomain(), anchor, NotationPackage.eINSTANCE.getIdentityAnchor_Id(), newIdValue));
+ }
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectToGridEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectToGridEditPolicy.java
new file mode 100644
index 00000000000..69c31567f26
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ConnectToGridEditPolicy.java
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.referencialgrilling;
+
+
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AutomaticNotationEditPolicy;
+
+/**
+ * This class is a class that contains method to set position to the grid
+ *
+ */
+public abstract class ConnectToGridEditPolicy extends GraphicalEditPolicyEx implements AutomaticNotationEditPolicy, IGrillingEditpolicy {
+
+ protected int displayImprecision=2;
+ /**
+ * Update the position of the node that is displayed
+ * @param x the position X
+ * @param y the position Y
+ */
+ protected void updateNodePositionOfControler(int x, int y) {
+ Bounds currentBounds=(Bounds) ((Node)((GraphicalEditPart)getHost()).getNotationView()).getLayoutConstraint();
+ if(x<currentBounds.getX()-displayImprecision||x>currentBounds.getX()+displayImprecision){
+ execute(new GMFtoEMFCommandWrapper(new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update notation from Column", new EObjectAdapter( ((GraphicalEditPart)getHost()).getNotationView()),
+ new Point(x,y))));
+ }
+ if(y<currentBounds.getY()-displayImprecision||y>currentBounds.getY()+displayImprecision){
+ execute(new GMFtoEMFCommandWrapper(new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update notation from Row", new EObjectAdapter( ((GraphicalEditPart)getHost()).getNotationView()),
+ new Point(x,y))));
+ }
+ }
+ /**
+ * Update the size of the Node from the given data
+ * @param width the width of the node
+ * @param height the height of the node
+ */
+ protected void updateSizeOfControler(int width, int height) {
+ Bounds currentBounds=(Bounds) ((Node)((GraphicalEditPart)getHost()).getNotationView()).getLayoutConstraint();
+ if(width<currentBounds.getWidth()-displayImprecision||width>currentBounds.getWidth()+displayImprecision){
+ execute(new GMFtoEMFCommandWrapper(new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update notation from Column", new EObjectAdapter( ((GraphicalEditPart)getHost()).getNotationView()),
+ new Dimension(width,currentBounds.getHeight()))));
+ }
+ if(height<currentBounds.getHeight()-displayImprecision||height>currentBounds.getHeight()+displayImprecision){
+ execute(new GMFtoEMFCommandWrapper(new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update notation from Row", new EObjectAdapter( ((GraphicalEditPart)getHost()).getNotationView()),
+ new Dimension(currentBounds.getWidth(),height))));
+ }
+ }
+ /**
+ * update an axis of the grid from coordinate X or Y
+ * @param axis the axis to update
+ * @param x the coordinate x
+ * @param y the coordinate y
+ */
+ protected void updatePositionGridAxis(DecorationNode axis, int x, int y) {
+ Location currentBounds=(Location) axis.getLayoutConstraint();
+ if(x<currentBounds.getX()-displayImprecision||x>currentBounds.getX()+displayImprecision){
+ execute( new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update Column", new EObjectAdapter(axis), new Point(x,y)));
+
+ }
+ if(y<currentBounds.getY()-displayImprecision||y>currentBounds.getY()+displayImprecision){
+ execute( new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update row", new EObjectAdapter(axis), new Point(x,y)));
+ }
+ }
+
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ContentDiagramListener.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ContentDiagramListener.java
new file mode 100644
index 00000000000..a37f8405b30
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ContentDiagramListener.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.referencialgrilling;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+
+/**
+ *this calss is to delegate all notification in a diagram to the grill system in order to ensure consistency of rows and columns
+ *
+ */
+public class ContentDiagramListener extends EContentAdapter {
+
+ protected GrillingManagementEditPolicy grillingManagementEditPolicy;
+ /**
+ * Constructor.
+ *
+ */
+ public ContentDiagramListener(GrillingManagementEditPolicy grillingManagementEditPolicy) {
+ this.grillingManagementEditPolicy= grillingManagementEditPolicy;
+ }
+ /**
+ * @see org.eclipse.emf.ecore.util.EContentAdapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ super.notifyChanged(notification);
+ grillingManagementEditPolicy.notifyChanged(notification);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/DisplayEvent.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/DisplayEvent.java
new file mode 100644
index 00000000000..fcd0ff5336a
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/DisplayEvent.java
@@ -0,0 +1,231 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.referencialgrilling;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.Ellipse;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Viewport;
+import org.eclipse.draw2d.XYLayout;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.IdentityAnchor;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.IdentityAnchorHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CLifeLineEditPart;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+
+/**
+ * @author PT202707
+ *
+ */
+public class DisplayEvent {
+
+ private EditPart editpart;
+ /**
+ * Constructor.
+ *
+ */
+ public DisplayEvent(EditPart editpart) {
+ this.editpart= editpart;
+ }
+ public class EventFig extends Ellipse implements IEventFig{
+
+ }
+ /**
+ * if the position is the same a an event it return the event.
+ * @param container
+ * @param locationOntheScreen
+ * @return
+ */
+ public MessageOccurrenceSpecification getMessageEvent(IFigure container, Point locationOntheScreen){
+ Point LocationAbsolute= locationOntheScreen.getCopy();
+ IFigure editPartFigure=((GraphicalEditPart)editpart).getFigure();
+ editPartFigure.getParent().translateToRelative(LocationAbsolute);
+ Point locationRelativeToLifleLine= locationOntheScreen.getCopy().translate(editPartFigure.getBounds().getTopLeft().negate());
+ Rectangle recLoacal=new Rectangle(50,200,100,100);
+
+ IFigure fig=editPartFigure;
+ Point ptOnscreen=recLoacal.getTopLeft().translate(fig.getBounds().getTopLeft());
+ fig.getParent().translateToAbsolute(ptOnscreen);
+
+ //display all events from messages
+ Node node=(Node)editpart.getModel();
+ java.util.List<Edge> sourceEdge= node.getSourceEdges();
+ for (Edge edge : sourceEdge) {
+ MessageOccurrenceSpecification m=getMessageEvent((NodeEditPart)editpart, node, edge, LocationAbsolute);
+ if(m!=null){
+ return m;
+ }
+ }
+ java.util.List<Edge> targetEdge= node.getTargetEdges();
+ for (Edge edge : targetEdge) {
+ MessageOccurrenceSpecification m=getMessageEvent((NodeEditPart)editpart, node, edge, LocationAbsolute);
+ if(m!=null){
+ return m;
+ }
+ }
+
+ return null;
+
+ }
+
+ public MessageOccurrenceSpecification getMessageEvent(NodeEditPart container,Node node, Edge edge, Point currentPosition){
+ IdentityAnchor anchor=null;
+ if (edge.getSource().equals(node)){
+ anchor=(IdentityAnchor)edge.getSourceAnchor();
+ }
+ else{
+ anchor=(IdentityAnchor)edge.getTargetAnchor();
+ }
+ double yPercent=IdentityAnchorHelper.getYPercentage(anchor);
+
+ //calculate bounds from notation
+ double height=0;
+ if(node.getLayoutConstraint() instanceof Bounds){
+ height=((Bounds)node.getLayoutConstraint()).getHeight();
+ }
+ if( height==-1.0){
+ //it is very bad , because this is a default valued given by the figure...
+ if( editpart instanceof CLifeLineEditPart){
+ height=CLifeLineEditPart.DEFAUT_HEIGHT;
+ }
+ }
+ double posY=yPercent*height;
+ IFigure lifelineFigure=((GraphicalEditPart)editpart).getFigure();
+ if(lifelineFigure.getBounds().y+(int)posY-8<currentPosition.y() &&currentPosition.y()<lifelineFigure.getBounds().y+(int)posY+8){
+ if( (edge.getElement() instanceof Message)){
+ if (anchor==(IdentityAnchor)edge.getSourceAnchor()){
+ return (MessageOccurrenceSpecification)((Message)edge.getElement()).getSendEvent();
+ }
+ else{
+ return (MessageOccurrenceSpecification)((Message)edge.getElement()).getReceiveEvent();
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ *
+ * @param container
+ * @param location position on the screen
+ */
+ public void addFigureEvent(IFigure container, Point locationOntheScreen){
+ Point LocationAbsolute= locationOntheScreen.getCopy();
+ IFigure editPartFigure=((GraphicalEditPart)editpart).getFigure();
+ editPartFigure.getParent().translateToRelative(LocationAbsolute);
+ Point locationRelativeToLifleLine= locationOntheScreen.getCopy().translate(editPartFigure.getBounds().getTopLeft().negate());
+ Rectangle recLoacal=new Rectangle(50,200,100,100);
+
+ IFigure fig=editPartFigure;
+ Point ptOnscreen=recLoacal.getTopLeft().translate(fig.getBounds().getTopLeft());
+ System.out.println("Position: "+fig.getBounds()+":"+recLoacal.getTopLeft().translate(fig.getBounds().getTopLeft()));
+ fig.getParent().translateToAbsolute(ptOnscreen);
+
+
+ System.out.println("Shadow position:"+locationOntheScreen+" calulatedPostion (50,200) on screen"+ptOnscreen);
+
+ //display all events from messages
+ Node node=(Node)editpart.getModel();
+ java.util.List<Edge> sourceEdge= node.getSourceEdges();
+ for (Edge edge : sourceEdge) {
+ displayEventFromMessages((NodeEditPart)editpart, node, edge, LocationAbsolute);
+ }
+ java.util.List<Edge> targetEdge= node.getTargetEdges();
+ for (Edge edge : targetEdge) {
+ displayEventFromMessages((NodeEditPart)editpart, node, edge, LocationAbsolute);
+ }
+
+ }
+
+ public void displayEventFromMessages(NodeEditPart container,Node node, Edge edge, Point CurrentPosition){
+ IdentityAnchor anchor=null;
+ if (edge.getSource().equals(node)){
+ anchor=(IdentityAnchor)edge.getSourceAnchor();
+ }
+ else{
+ anchor=(IdentityAnchor)edge.getTargetAnchor();
+ }
+ double yPercent=IdentityAnchorHelper.getYPercentage(anchor);
+
+ //calculate bounds from notation
+ double height=0;
+ if(node.getLayoutConstraint() instanceof Bounds){
+ height=((Bounds)node.getLayoutConstraint()).getHeight();
+ }
+ if( height==-1.0){
+ //it is very bad , because this is a default valued given by the figure...
+ if( editpart instanceof CLifeLineEditPart){
+ height=CLifeLineEditPart.DEFAUT_HEIGHT;
+ }
+ }
+ double posY=yPercent*height;
+ addAnEvent(container.getFigure(), posY, ColorConstants.white, CurrentPosition);
+
+
+
+ }
+
+ /**
+ * @param container
+ * @param location
+ * @param containerBounds
+ * @param ellipseFigure
+ */
+ private void addAnEvent(IFigure container, double y, Color color, Point currentPosition) {
+ EventFig ellipseFigure= new EventFig();
+ IFigure lifelineFigure=((GraphicalEditPart)editpart).getFigure();
+ //code without grid
+
+ //calculate position of the Event in the screen references
+ PrecisionRectangle EventBoundsOnScreen= new PrecisionRectangle(lifelineFigure.getBounds().x+lifelineFigure.getBounds().width/2-8,lifelineFigure.getBounds().y+(int)y-8,16,16);
+ if(lifelineFigure.getBounds().y+(int)y-8<currentPosition.y() &&currentPosition.y()<lifelineFigure.getBounds().y+(int)y+8){
+ ellipseFigure.setBackgroundColor(ColorConstants.green);
+ }
+ else{
+ ellipseFigure.setBackgroundColor(color);
+ }
+ ellipseFigure.setLineWidth(2);
+ ellipseFigure.setBounds(EventBoundsOnScreen);
+ container.add(ellipseFigure);
+ }
+
+ public void removeFigureEvent(IFigure container){
+ ArrayList<IFigure> eventFigureList=new ArrayList<IFigure>();
+ for (Object iFigure : container.getChildren()) {
+ if( iFigure instanceof IEventFig){
+ eventFigureList.add((IFigure)iFigure);
+ }
+ }
+ for (Iterator iterator = eventFigureList.iterator(); iterator.hasNext();) {
+ IFigure iFigure = (IFigure) iterator.next();
+ container.remove(iFigure);
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingBasedResizableShapeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingBasedResizableShapeEditPolicy.java
new file mode 100644
index 00000000000..60b0d8ff118
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingBasedResizableShapeEditPolicy.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusResizableShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
+
+/**
+ * @author PT202707
+ *
+ */
+public class GrillingBasedResizableShapeEditPolicy extends PapyrusResizableShapeEditPolicy implements IGrillingEditpolicy{
+
+ protected void showChangeBoundsFeedback(ChangeBoundsRequest request) {
+ super.showChangeBoundsFeedback(request);
+// IFigure feedback = getDragSourceFeedbackFigure();
+// PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
+// getHostFigure().translateToAbsolute(rect);
+// Point left = rect.getLeft();
+// Point right = rect.getRight();
+// rect.translate(request.getMoveDelta());
+// rect.resize(request.getSizeDelta());
+// IFigure f = getHostFigure();
+// View row=null;
+// DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+// try{
+// GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+// if (grilling!=null){
+// row=grilling.getRowTolisten(((GraphicalEditPart)getHost()).resolveSemanticElement(), (Node)((GraphicalEditPart)getHost()).getNotationView());
+// }
+// }catch (NoGrillElementFound e) {
+// UMLDiagramEditorPlugin.log.error(e);
+// }
+// Location boundsRow=(Location) ((Node)row).getLayoutConstraint();
+// Point poisition = new Point(0,boundsRow.getY());
+// // IMapMode mmode = MapModeUtil.getMapMode(f);
+// // min.height = mmode.LPtoDP(min.height);
+// // min.width = mmode.LPtoDP(min.width);
+// // max.height = mmode.LPtoDP(max.height);
+// // max.width = mmode.LPtoDP(max.width);
+// getHostFigure().translateToAbsolute(poisition);
+// // In manual mode, there is no minimal width, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=383723
+// rect.y=poisition.y;
+// feedback.translateToRelative(rect);
+// feedback.setBounds(rect);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingBasedXYLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingBasedXYLayoutEditPolicy.java
new file mode 100644
index 00000000000..79e77100e03
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingBasedXYLayoutEditPolicy.java
@@ -0,0 +1,224 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest.ViewAndElementDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.XYLayoutWithConstrainedResizedEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ViewDescriptorUtil;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool.CreateAspectUnspecifiedTypeRequest;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CLifeLineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.service.types.element.UMLDIElementTypes;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * This class is used to manage node element in the compartment by using grill system.
+ *
+ */
+public class GrillingBasedXYLayoutEditPolicy extends XYLayoutWithConstrainedResizedEditPolicy implements IGrillingEditpolicy{
+
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.XYLayoutWithConstrainedResizedEditPolicy#getCreateCommand(org.eclipse.gef.requests.CreateRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ // Used during the drop from the model explorer
+ if( request instanceof CreateViewAndElementRequest){
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ if (grilling!=null){
+ grilling.setRespectMargin(false);
+
+ }
+
+ }
+ return super.getCreateCommand(request);
+ }
+ /* Override to use to deal with causes where the point is UNDERFINED
+ * we will ask the layout helper to find a location for us
+ * @see org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy#getConstraintFor(org.eclipse.gef.requests.CreateRequest)
+ */
+ protected Object getConstraintFor(CreateRequest request) {
+ // Used during the creation from the palette
+ Object constraint = super.getConstraintFor(request);
+ //// if( constraint instanceof Rectangle){
+ //// DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ //// GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ //// if( request instanceof CreateViewAndElementRequest){
+ // String semanticHint=((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getSemanticHint();
+ //// if (grilling!=null&&semanticHint!=null){
+ //// View row=null;
+ //// // do let the user place where he want the life line at the creation
+ // if(semanticHint.equals(LifelineEditPart.VISUAL_ID)){
+ //// row=grilling.getRowTolisten(grilling.firstY);
+ //// Location boundsRow=(Location) ((Node)row).getLayoutConstraint();
+ //// if( boundsRow!=null){
+ //// ((Rectangle)constraint).setY(boundsRow.getY());
+ //// if( request.isSnapToEnabled()){
+ //// snapAPoint(((Rectangle)constraint));
+ //// }
+ ////
+ //// }
+ //// }
+ ////
+ //// }
+ //// }
+ //// }
+ //
+ // if ( LayoutHelper.UNDEFINED.getLocation().equals(request.getLocation()) ){
+ // Rectangle rect = (Rectangle)constraint;
+ // rect.setLocation(10,10);
+ // return rect;
+ // }
+ return constraint;
+ }
+ /**
+ * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#showLayoutTargetFeedback(org.eclipse.gef.Request)
+ *
+ * @param request
+ */
+ @Override
+ protected void showLayoutTargetFeedback(Request request) {
+ // feed back during the creation from the palette
+ if(request instanceof CreateAspectUnspecifiedTypeRequest){
+ // if(((CreateAspectUnspecifiedTypeRequest)request).getElementTypes().contains(UMLDIElementTypes.LIFELINE_SHAPE)){
+ // DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ // GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ // if (grilling!=null){
+ // View row=null;
+ // row=grilling.getRowTolisten(grilling.firstY);
+ // Location boundsRow=(Location) ((Node)row).getLayoutConstraint();
+ // if( boundsRow!=null){
+ // PrecisionRectangle ptOnScreen=new PrecisionRectangle(0,boundsRow.getY(),0,0);
+ // if( ((CreateRequest)request).isSnapToEnabled()){
+ // SimpleSnapHelper.snapAPoint(ptOnScreen, getHost().getRoot());
+ // }
+ // getHostFigure().translateToAbsolute(ptOnScreen);
+ // //((CreateRequest)request).getLocation().setY(ptOnScreen.y);
+ //((CreateRequest)request).setSize(new Dimension(100,CLifeLineEditPart.DEFAUT_HEIGHT));
+
+ //
+ }
+
+
+ //
+ //
+ // }
+ // }
+ // }
+ super.showLayoutTargetFeedback(request);
+ }
+
+
+
+ /**
+ * Called in response to a <tt>REQ_RESIZE_CHILDREN</tt> request.
+ *
+ * This implementation creates a <tt>SetPropertyCommand</i> and sets
+ * the <tt>ID_BOUNDS</tt> property value to the supplied constraints.
+ *
+ * @param child the element being resized.
+ * @param constraint the elements new bounds.
+ * @return {@link SetBoundsCommand}
+ */
+ protected Command createChangeConstraintCommand(
+ EditPart child,
+ Object constraint) {
+ Rectangle newBounds = (Rectangle) constraint;
+ View shapeView = (View) child.getModel();
+
+
+ View row=null;
+ View column=null;
+ //test the move of a lifeline
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ if (grilling!=null){
+ //row=grilling.getRowTolisten((Node) ((org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart)child).getNotationView(),(Element) ((org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart)child).resolveSemanticElement());
+ //column=grilling.getColumnTolisten((Node)((org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart)child).getNotationView(),(Element) ((org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart)child).resolveSemanticElement());
+ // Location boundsRow=(Location) ((Node)row).getLayoutConstraint();
+ // if(child instanceof LifelineEditPart){
+ // // in the case of a life line iit is impossible to let the user move vertically
+ // //newBounds.y=boundsRow.getY();
+ // }
+
+
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+ .getEditingDomain();
+
+
+ ICommand boundsCommand =
+ new SetBoundsCommand(editingDomain,
+ DiagramUIMessages.SetLocationCommand_Label_Resize,
+ new EObjectAdapter(shapeView),
+ newBounds);
+
+ ICommand boundsrowsCommand =
+ new SetBoundsCommand(editingDomain,
+ DiagramUIMessages.SetLocationCommand_Label_Resize,
+ new EObjectAdapter(row),
+ new Point(0,newBounds.y));
+ //update columns
+ ICommand boundsColumnsCommand =
+ new SetBoundsCommand(editingDomain,
+ DiagramUIMessages.SetLocationCommand_Label_Resize,
+ new EObjectAdapter(column),
+ new Point(newBounds.x,0));
+ CompoundCommand compoundCommand= new CompoundCommand();
+ compoundCommand.add( new ICommandProxy(boundsCommand));
+ compoundCommand.add( new ICommandProxy(boundsrowsCommand));
+ compoundCommand.add( new ICommandProxy(boundsColumnsCommand));
+ return compoundCommand;
+ }
+
+ return super.createChangeConstraintCommand(child, constraint);
+ }
+
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingEditpart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingEditpart.java
new file mode 100644
index 00000000000..08dca69149c
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingEditpart.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+
+/**
+ * @author PT202707
+ * @since 3.0
+ *
+ */
+public class GrillingEditpart extends GraphicalEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param model
+ */
+ public GrillingEditpart(EObject model) {
+ super(model);
+ }
+
+ public static final String VISUAL_ID="GRILLING";
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#setVisibility(boolean)
+ *
+ * @param vis
+ */
+ @Override
+ protected void setVisibility(boolean vis) {
+ // TODO Auto-generated method stub
+ super.setVisibility(false);
+ }
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#createFigure()
+ *
+ * @return
+ */
+ @Override
+ protected IFigure createFigure() {
+ // TODO Auto-generated method stub
+ return new RectangleFigure();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingManagementEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingManagementEditPolicy.java
new file mode 100644
index 00000000000..f0c6a05d6ed
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/GrillingManagementEditPolicy.java
@@ -0,0 +1,615 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.TreeSet;
+
+import org.eclipse.draw2d.geometry.Point;
+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.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.RootEditPart;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx;
+import org.eclipse.gmf.runtime.notation.BasicCompartment;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.IdentityAnchor;
+import org.eclipse.gmf.runtime.notation.LayoutConstraint;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AutomaticNotationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.uml.diagram.sequence.command.CreateCoordinateCommand;
+import org.eclipse.papyrus.uml.diagram.sequence.command.CreateGrillingStructureCommand;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.InteractionFragment;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @author PT202707
+ *
+ */
+public class GrillingManagementEditPolicy extends GraphicalEditPolicyEx implements AutomaticNotationEditPolicy, NotificationListener, IGrillingEditpolicy{
+
+
+ public static final String GRILL_CONNECTION = "Grill Connection";
+
+
+ protected GrillingEditpart grillingCompartment=null;
+
+
+ public static String GRILLING_MANAGEMENT="GRILLING_MANAGEMENT";
+ public static String COLUMN="COLUMN_";
+ public static String ROW="ROW_";
+
+ public int threshold=10;
+ public int margin=50;
+ public int firstY=30;
+ public int firstX=100;
+ public boolean respectMargin=true;
+ /**
+ * @return the respectMargin
+ */
+ public boolean isRespectMargin() {
+ return respectMargin;
+ }
+
+ /**
+ * @param respectMargin the respectMargin to set
+ */
+ public void setRespectMargin(boolean respectMargin) {
+ this.respectMargin = respectMargin;
+ }
+
+
+
+ public boolean strictRespectMargin=true;
+
+ public int getNextY(){
+ if(rows.size()>0){
+ DecorationNode row= rows.last();
+ LayoutConstraint layoutConstraint=row.getLayoutConstraint();
+ return ((Location)layoutConstraint).getY()+margin;
+ }
+ return firstY;
+ }
+
+
+
+ public Comparator<DecorationNode> RowComparator =new Comparator<DecorationNode>(){
+
+ @Override
+ public int compare(DecorationNode o1, DecorationNode o2) {
+ LayoutConstraint layoutConstrainto1=((Node)o1).getLayoutConstraint();
+ LayoutConstraint layoutConstrainto2=((Node)o2).getLayoutConstraint();
+ if( layoutConstrainto1!=null && layoutConstrainto2!=null){
+ return ((Integer)((Location)layoutConstrainto1).getY()).compareTo(((Integer)((Location)layoutConstrainto2).getY()));
+ }
+ return 0;
+ }
+ };
+
+ public Comparator<DecorationNode> ColumnComparator =new Comparator<DecorationNode>(){
+
+ @Override
+ public int compare(DecorationNode o1, DecorationNode o2) {
+ LayoutConstraint layoutConstrainto1=((Node)o1).getLayoutConstraint();
+ LayoutConstraint layoutConstrainto2=((Node)o2).getLayoutConstraint();
+ if( layoutConstrainto1!=null && layoutConstrainto2!=null){
+ return ((Integer)((Location)layoutConstrainto1).getX()).compareTo(((Integer)((Location)layoutConstrainto2).getX()));
+ }
+ return 0;
+ }
+ };
+
+ public TreeSet<DecorationNode> rows= new TreeSet<DecorationNode>(RowComparator);
+ public TreeSet<DecorationNode> columns= new TreeSet<DecorationNode>(ColumnComparator);
+
+ //ok if the creation a X is free
+ public boolean CREATION_X_FREE=true;
+ /**if the CREATION_X_FREE == false COLUMN are created at fixed position**/
+ public int X_SPACING=100;
+
+
+ /**
+ * Constructor.
+ *
+ */
+ public GrillingManagementEditPolicy() {
+ }
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#activate()
+ *
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ getDiagramEventBroker().addNotificationListener(((EObject)getHost().getModel()), this);
+ ContentDiagramListener contentDiagramListener=new ContentDiagramListener(this);
+ ((EObject)getHost().getModel()).eResource().eAdapters().add(contentDiagramListener);
+ refreshGrillingStructure();
+ }
+ /**
+ *
+ */
+ private void refreshGrillingStructure() {
+ EditPart host= getHost();
+ int i=0;
+ while( grillingCompartment==null && i <host.getChildren().size()){
+ if( host.getChildren().get(i) instanceof GrillingEditpart){
+ grillingCompartment=(GrillingEditpart) (host.getChildren().get(i));
+ }
+ i++;
+ }
+ if( grillingCompartment==null){
+ CreateGrillingStructureCommand createGrillingStructureCommand= new CreateGrillingStructureCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), (View)getHost().getModel());
+ // Record for undo if possible, otherwise unprotected
+ execute(createGrillingStructureCommand);
+
+
+ }
+ while( grillingCompartment==null && i <host.getChildren().size()){
+ if( host.getChildren().get(i) instanceof GrillingEditpart){
+ grillingCompartment=(GrillingEditpart) (host.getChildren().get(i));
+ }
+ i++;
+ }
+ cleanUnusedRowAndColumn();
+ updateRowsAndColumns();
+ }
+
+ /**
+ * update the list of romw and colmumn
+ */
+ public void updateRowsAndColumns() {
+
+
+ rows.clear();
+ columns.clear();
+ if(grillingCompartment!=null){
+ for (int j=0;j<grillingCompartment.getNotationView().getChildren().size(); j++){
+ if(grillingCompartment.getNotationView().getChildren().get(j) instanceof DecorationNode ){
+ DecorationNode decorationNode=(DecorationNode)grillingCompartment.getNotationView().getChildren().get(j);
+ if(decorationNode.getType().startsWith(ROW) ){
+ rows.add(decorationNode);
+
+ }
+ if(decorationNode.getType().startsWith(COLUMN) ){
+ columns.add(decorationNode);
+ }
+ }
+ }
+ }
+ Collections.sort(new ArrayList<>(rows),RowComparator );
+ Collections.sort(new ArrayList<>(columns),ColumnComparator );
+ }
+ /** this class is very specific the the sequence diagram
+ * this purpose of this method is to ensure the consistency of event in the the represented diagram**/
+ public void updateSemanticAfterUpdate(){
+ //1. look for all Lifelines
+ //There are columns.
+ HashSet<Lifeline> lifelineList= new HashSet<Lifeline>();
+ for (DecorationNode column : columns) {
+ if ((getRef(column))!=null){
+ for (EObject referedElement : getRef(column)) {
+ if( referedElement instanceof Lifeline){
+ lifelineList.add((Lifeline)referedElement);
+ }
+ }
+ }
+
+ }
+ //for each lifeline recreat the list of covered element
+ for (Lifeline lifeline : lifelineList) {
+ ArrayList<InteractionFragment> covered= new ArrayList<InteractionFragment>();
+ for (DecorationNode row : rows) {
+ if ((getRef(row))!=null){
+ for (EObject referedElement : getRef(row)) {
+ if( referedElement instanceof InteractionFragment){
+ InteractionFragment interactionFragment=(InteractionFragment)(referedElement);
+ if( lifeline.getCoveredBys().contains(interactionFragment)){
+ covered.add(interactionFragment);
+
+ }
+ }
+
+ }
+ }
+
+ }
+ if(covered.size()== lifeline.getCoveredBys().size()){
+ System.err.println("equality");
+ execute(new SetCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), lifeline, UMLPackage.eINSTANCE.getLifeline_CoveredBy(), covered));
+ }
+ else if( covered.size()<lifeline.getCoveredBys().size()){
+ System.err.println("Event not managed or in being created");
+ covered.addAll(lifeline.getCoveredBys());
+ execute(new SetCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), lifeline, UMLPackage.eINSTANCE.getLifeline_CoveredBy(), covered));
+ }
+ else if( covered.size()>lifeline.getCoveredBys().size()){
+ System.err.println("more event that in the lifeline");
+ }
+ }
+
+ }
+
+ public void cleanUnusedRowAndColumn(){
+ ArrayList<DecorationNode> unusedDcorationNode= new ArrayList<DecorationNode>();
+
+ if(grillingCompartment!=null){
+ List persistedChildren=grillingCompartment.getNotationView().getPersistedChildren();
+ for (int i=0;i<persistedChildren.size(); i++){
+ if(persistedChildren.get(i) instanceof DecorationNode ){
+ DecorationNode decorationNode=(DecorationNode)persistedChildren.get(i);
+ EAnnotation eAnnotation =decorationNode.getEAnnotation(GRILL_CONNECTION);
+ if(eAnnotation==null){
+ unusedDcorationNode.add(decorationNode);
+ }
+ if( eAnnotation!=null){
+ if(eAnnotation.getReferences().size()==0){
+ unusedDcorationNode.add(decorationNode);
+ }
+ }
+ }
+ }
+ if(unusedDcorationNode.size()>0){
+ execute(new RemoveCommand(((IGraphicalEditPart) getHost()).getEditingDomain(),
+ grillingCompartment.getNotationView(),NotationPackage.eINSTANCE.getView_PersistedChildren(),unusedDcorationNode));
+ }
+ }
+ }
+
+ /* Gets the diagram event broker from the editing domain.
+ *
+ * @return the diagram event broker
+ */
+ protected DiagramEventBroker getDiagramEventBroker() {
+ TransactionalEditingDomain theEditingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ if (null != theEditingDomain) {
+ return DiagramEventBroker.getInstance(theEditingDomain);
+ }
+ return null;
+ }
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#deactivate()
+ *
+ */
+ @Override
+ public void deactivate() {
+ getDiagramEventBroker().removeNotificationListener(((EObject)getHost().getModel()), this);
+ super.deactivate();
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notifications
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ // if( notification.getEventType()==Notification.UNSET ){
+ // updateSemanticAfterUpdate();
+ // }
+
+ if( notification.getEventType()==Notification.ADD){
+ updateRowsAndColumns();
+ updateSemanticAfterUpdate();
+ }
+ if( notification.getEventType()==Notification.REMOVE && (!(notification.getNotifier() instanceof EAnnotation))&&(!(notification.getNotifier().equals(grillingCompartment.getNotationView())))){
+ cleanUnusedRowAndColumn();
+ updateRowsAndColumns();
+ updateSemanticAfterUpdate();
+ }
+ if( notification.getEventType()==Notification.SET ){
+ cleanUnusedRowAndColumn();
+ updateRowsAndColumns();
+ updateSemanticAfterUpdate();
+ }
+
+ }
+
+ /**
+ * the get row to listen form the semanntic and the node
+ * @param graphic the notation representation of the semantic element
+ * @param notationObject
+ * @return
+ */
+ public View getRowTolisten(Node graphic, Element semantic) throws NoGrillElementFound{
+ LayoutConstraint layoutConstraint=((Node)graphic).getLayoutConstraint();
+ if(layoutConstraint instanceof Bounds){
+ return getRowTolisten(((Bounds) layoutConstraint).getY(),semantic);
+ }
+ throw new NoGrillElementFound();
+ }
+
+
+ /**
+ * get the decoration node that represents a column from a position (absolute)
+ * @param x the position x for the column
+ * @return the decoration node
+ */
+ public DecorationNode getColumnTolisten( int x, Element semantic) throws NoGrillElementFound{
+ try{
+ DecorationNode column=existCoulumnAtPosition(x);
+ }
+ catch (NoGrillElementFound e) {
+ execute(new CreateCoordinateCommand(((IGraphicalEditPart) getHost()).getEditingDomain(),((BasicCompartment)grillingCompartment.getNotationView()),COLUMN+columns.size(), semantic,x));
+ }
+
+ return existCoulumnAtPosition(x);
+ }
+ /**
+ * This method allow toadd in teh the notation which object listen column or row
+ * @param grillElement a row or a column
+ * @param source the graphical representation
+ */
+ protected void associateViewToGrill(View grillElement, EObject source){
+ if( grillElement.getEAnnotation(GRILL_CONNECTION)==null){
+ EAnnotation eAnnotation =EcoreFactory.eINSTANCE.createEAnnotation();
+ eAnnotation.setSource(GRILL_CONNECTION);
+
+ ArrayList<EAnnotation> arrayList= new ArrayList<EAnnotation>();
+ arrayList.add(eAnnotation);
+ execute(new SetCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), grillElement, EcorePackage.eINSTANCE.getEModelElement_EAnnotations(), arrayList));
+
+ }
+
+ EAnnotation eAnnotation=grillElement.getEAnnotation(GRILL_CONNECTION);
+ ArrayList<EObject> refs= new ArrayList<EObject>();
+ refs.addAll(eAnnotation.getReferences());
+ refs.add(source);
+ execute(new SetCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), eAnnotation, EcorePackage.eINSTANCE.getEAnnotation_References(), refs));
+
+
+ }
+ /**
+ * This method allow toadd in teh the notation which object listen column or row
+ * @param grillElement a row or a column
+ * @param source the graphical representation
+ */
+ public void dissociateViewToGrill(View grillElement, EObject source){
+ if( grillElement.getEAnnotation(GRILL_CONNECTION)==null){
+ return;
+ }
+
+ EAnnotation eAnnotation=grillElement.getEAnnotation(GRILL_CONNECTION);
+ ArrayList<EObject> refs= new ArrayList<EObject>();
+ refs.addAll(eAnnotation.getReferences());
+ refs.remove(source);
+ execute(new SetCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), eAnnotation, EcorePackage.eINSTANCE.getEAnnotation_References(), refs));
+
+
+ }
+ /**
+ * get the decoration node that represents a line from a position (absolute)
+ * @param y the position y for the line
+ * @return the decoration node
+ */
+ public DecorationNode getRowTolisten( int y, Element semantic) throws NoGrillElementFound{
+ try{
+ return existRowAtPosition(y, semantic);
+ }
+ catch (NoGrillElementFound e) {
+ execute(new CreateCoordinateCommand(((IGraphicalEditPart) getHost()).getEditingDomain(),((BasicCompartment)grillingCompartment.getNotationView()),ROW+rows.size(), semantic,y));
+ DecorationNode row= existRowAtPosition(y, semantic);
+ updateYpositionForRow(row, y);
+ return row;
+ }
+
+ }
+
+
+
+ /**
+ * the get the Column to listen by taking account the semantic and the Node
+ * @param graphic the graphical element
+ * @return
+ */
+ public View getColumnTolisten( Node graphic, Element semantic ) throws NoGrillElementFound{
+ LayoutConstraint layoutConstraint=((Node)graphic).getLayoutConstraint();
+ if(layoutConstraint instanceof Bounds){
+ return getColumnTolisten(((Bounds)layoutConstraint).getX(),semantic);
+ }
+ throw new NoGrillElementFound();
+
+ }
+
+
+
+
+
+ /**
+ *
+ * @param x the position y where we look for a column
+ * @return the column that exists at the position [x- threshold, x+threshold]
+ */
+ public DecorationNode existCoulumnAtPosition(int x) throws NoGrillElementFound{
+ for (Iterator<DecorationNode> iterator = columns.iterator(); iterator.hasNext();) {
+ DecorationNode currentColumn = iterator.next();
+ int Xposition=getPositionX(currentColumn);
+ if( Xposition-threshold<=x&& x<=Xposition+threshold){
+ return currentColumn;
+ }
+
+ }
+ throw new NoGrillElementFound();
+ }
+
+
+ /**
+ *
+ * @param y the position y where we look for a row
+ * @return the row that exists at the position [y- threshold, y+threshold]s
+ */
+ public DecorationNode existRowAtPosition(int y,EObject source) throws NoGrillElementFound{
+ for (Iterator<DecorationNode> iterator = rows.iterator(); iterator.hasNext();) {
+ DecorationNode currentRow = iterator.next();
+ int Yposition=getPositionY(currentRow);
+ if( Yposition-threshold<=y&& y<=Yposition+threshold){
+ associateViewToGrill(currentRow, source);
+ return currentRow;
+ }
+
+ }
+ throw new NoGrillElementFound();
+ }
+
+ /**
+ *
+ * @param y the position y where we look for a row
+ * @return the row that exists at the position [y- threshold, y+threshold]s
+ */
+ public DecorationNode existRowAtPosition(int y) throws NoGrillElementFound{
+ for (Iterator<DecorationNode> iterator = rows.iterator(); iterator.hasNext();) {
+ DecorationNode currentRow = iterator.next();
+ int Yposition=getPositionY(currentRow);
+ if( Yposition-threshold<=y&& y<=Yposition+threshold){
+ return currentRow;
+ }
+
+ }
+ throw new NoGrillElementFound();
+ }
+ /**
+ * @param decorationNode
+ * @return the postion X for a decoration Node
+ */
+ public int getPositionX(DecorationNode decorationNode){
+ LayoutConstraint constraint=decorationNode.getLayoutConstraint();
+ if( constraint instanceof Location){
+ return ((Location)constraint).getX();
+ }
+ return 0;
+ }
+ /**
+ * @param decorationNode
+ * @return the Position Y for a decoration node
+ */
+ public int getPositionY(DecorationNode decorationNode){
+ LayoutConstraint constraint=decorationNode.getLayoutConstraint();
+ if( constraint instanceof Location){
+ return((Location)constraint).getY();
+ }
+ return 0;
+ }
+ public void updateYpositionForRow(DecorationNode decorationNode, int y){
+
+ LayoutConstraint constraint=decorationNode.getLayoutConstraint();
+
+
+ int nextdistance=getDistanceWithNextRow(decorationNode,y);
+ int margin = getGridSpacing();
+ if( constraint instanceof Location){
+ execute(new SetCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), constraint, NotationPackage.eINSTANCE.getLocation_Y(), y));
+ }
+ if(respectMargin){
+ if( nextdistance<margin){
+ boolean after=false;
+ for (DecorationNode currentRow : rows) {
+ if( after){
+
+ LayoutConstraint currentConstraint=currentRow.getLayoutConstraint();
+ if( constraint instanceof Location){
+ execute(new SetCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), currentConstraint, NotationPackage.eINSTANCE.getLocation_Y(), ((Location)currentConstraint).getY()+margin));
+ }
+ }
+ if( currentRow.equals(decorationNode)){
+ after=true;
+ }
+
+ }
+ }
+ }
+ }
+
+ public int getDistanceWithNextRow(DecorationNode currentRow, int currentRowPosition){
+ Object[] arrayRow= rows.toArray();
+ List<Object> orderedRows= Arrays.asList(arrayRow);
+ int index=orderedRows.indexOf(currentRow);
+ if(index==orderedRows.size()-1){
+ return 0;
+ }
+ else{
+
+ LayoutConstraint currentConstraint=currentRow.getLayoutConstraint();
+ LayoutConstraint nextConstraint=((DecorationNode)orderedRows.get(index+1)).getLayoutConstraint();
+ if( currentConstraint instanceof Location){
+ return ((Location)nextConstraint).getY()-currentRowPosition;
+ }
+
+ }
+ return 0;
+ }
+
+ protected int getGridSpacing(){
+ if(DiagramEditPartsUtil.isSnapToGridActive(getHost())){
+
+ RootEditPart drep=getHost().getRoot();
+ if( drep instanceof DiagramRootEditPart){
+ return (int) ((DiagramRootEditPart)drep).getGridSpacing();
+ }
+ }
+ return margin;
+ }
+ public static Point getLocation(DecorationNode current) throws NoGrillElementFound{
+ LayoutConstraint currentConstraint=current.getLayoutConstraint();
+ if( currentConstraint instanceof Location){
+ return new Point (((Location)currentConstraint).getX(), ((Location)currentConstraint).getY());
+ }
+ else{
+ throw new NoGrillElementFound();
+ }
+ }
+
+ public static List<EObject> getRef(DecorationNode current){
+ EAnnotation eAnnotation =current.getEAnnotation(GRILL_CONNECTION);
+ if(eAnnotation==null){
+ return null;
+ }
+ else{
+ if(eAnnotation.getReferences().size()!=0){
+ return eAnnotation.getReferences();
+ }
+ return null;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/IEventFig.java
index 2f10385cfe3..089b22e0a9b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageEditHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/IEventFig.java
@@ -1,20 +1,22 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class MessageEditHelper extends UMLBaseEditHelper {
-}
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.referencialgrilling;
+
+/**
+ * @author PT202707
+ *
+ */
+public interface IEventFig {
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/IGrillingEditpolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/IGrillingEditpolicy.java
new file mode 100644
index 00000000000..83253ea29c5
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/IGrillingEditpolicy.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.render.editparts.RenderedDiagramRootEditPart;
+
+/**
+ * @author PT202707
+ *
+ */
+public interface IGrillingEditpolicy {
+
+ /**
+ * Walks up the editpart hierarchy to find and return the
+ * <code>TopGraphicEditPart</code> instance.
+ */
+ public default DiagramEditPart getDiagramEditPart(EditPart editPart) {
+ while (editPart instanceof IGraphicalEditPart) {
+ if (editPart instanceof DiagramEditPart){
+ return (DiagramEditPart) editPart;
+ }
+
+ editPart = editPart.getParent();
+ }
+ if(editPart instanceof DiagramRootEditPart){
+ return (DiagramEditPart)((DiagramRootEditPart)editPart).getChildren().get(0);
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/InteractionGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/InteractionGraphicalNodeEditPolicy.java
new file mode 100644
index 00000000000..4a0177826fd
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/InteractionGraphicalNodeEditPolicy.java
@@ -0,0 +1,153 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.referencialgrilling;
+
+import java.util.Map;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.FeedbackHelper;
+import org.eclipse.gef.requests.CreateConnectionRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
+
+/**
+ *This class overload all creation of link between lifelines
+ */
+public class InteractionGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy implements IGrillingEditpolicy{
+
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy#getConnectionCreateCommand(org.eclipse.gef.requests.CreateConnectionRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
+ ConnectionAnchor anchor = ((NodeEditPart)request.getTargetEditPart()).getSourceConnectionAnchor(request);
+ if(DiagramEditPartsUtil.isSnapToGridActive(getHost())){
+ //This part is very peculiar for lost and found message because the anchor is not standard.
+ if( anchor instanceof AnchorHelper.InnerPointAnchor){
+ PrecisionPoint pt = BaseSlidableAnchor.parseTerminalString(((AnchorHelper.InnerPointAnchor)anchor).getTerminal());
+ PrecisionRectangle ptOnScreen=new PrecisionRectangle( pt.x, pt.y,0,0);
+ SimpleSnapHelper.snapAPoint(ptOnScreen, getHost().getRoot());
+ computeSourcePosition(request, new PrecisionPoint(ptOnScreen.x, ptOnScreen.y));
+ Map<Object, Object> parameters = request.getExtendedData();
+ parameters.put(RequestParameterConstants.EDGE_SOURCE_POINT, request.getLocation().getCopy());
+ }
+ }
+ return super.getConnectionCreateCommand(request);
+ }
+
+
+ /**
+ * This method update the request in order to make the point at the correctposition on the grill.
+ * @param request the request
+ * @param wanted the position has we want in the serialization
+ */
+ protected void computeSourcePosition(CreateConnectionRequest request, PrecisionPoint wanted){
+
+ ConnectionAnchor anchor = ((NodeEditPart)request.getTargetEditPart()).getSourceConnectionAnchor(request);
+ if(DiagramEditPartsUtil.isSnapToGridActive(getHost())){
+ if( anchor instanceof AnchorHelper.InnerPointAnchor){
+ PrecisionPoint resultedPoint = BaseSlidableAnchor.parseTerminalString(((AnchorHelper.InnerPointAnchor)anchor).getTerminal());
+ while (resultedPoint.getDistance(wanted)>5 ){
+ Point original= request.getLocation().getCopy();
+ PrecisionPoint diff=new PrecisionPoint(original.x-resultedPoint.x,original.y- resultedPoint.y);
+ PrecisionRectangle ptOnScreen=new PrecisionRectangle( resultedPoint.x, resultedPoint.y,0,0);
+ SimpleSnapHelper.snapAPoint(ptOnScreen, getHost().getRoot());
+ PrecisionPoint Result=new PrecisionPoint(ptOnScreen.x+diff.x, ptOnScreen.y+diff.y);
+ request.setLocation(Result);
+ anchor = ((NodeEditPart)request.getTargetEditPart()).getSourceConnectionAnchor(request);
+ resultedPoint = BaseSlidableAnchor.parseTerminalString(((AnchorHelper.InnerPointAnchor)anchor).getTerminal());
+ }
+ }
+ }
+ }
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy#getConnectionAndRelationshipCompleteCommand(org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected Command getConnectionAndRelationshipCompleteCommand(CreateConnectionViewAndElementRequest request) {
+ Command cmd= super.getConnectionAndRelationshipCompleteCommand(request);
+ return cmd;
+ }
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy#createDummyConnection(org.eclipse.gef.Request)
+ *
+ * @param req
+ * @return
+ */
+ @Override
+ protected Connection createDummyConnection(Request req) {
+ // if(req.isSnapToEnabled()){
+ if(req instanceof CreateUnspecifiedTypeConnectionRequest){
+ CreateUnspecifiedTypeConnectionRequest request2= (CreateUnspecifiedTypeConnectionRequest)req;
+ if(DiagramEditPartsUtil.isSnapToGridActive(getHost())){
+ ConnectionAnchor anchor = ((NodeEditPart)request2.getTargetEditPart()).getSourceConnectionAnchor(request2);
+ //This part is very peculiar for lost and found message because the anchor is not standard.
+ if( anchor instanceof AnchorHelper.InnerPointAnchor){
+ PrecisionPoint pt = BaseSlidableAnchor.parseTerminalString(((AnchorHelper.InnerPointAnchor)anchor).getTerminal());
+ PrecisionRectangle ptOnScreen=new PrecisionRectangle( pt.x, pt.y,0,0);
+ SimpleSnapHelper.snapAPoint(ptOnScreen, getHost().getRoot());
+ computeSourcePosition(request2, new PrecisionPoint(ptOnScreen.x, ptOnScreen.y));
+
+ }
+ }
+ }
+ // }
+ return super.createDummyConnection(req);
+ }
+ /**
+ * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#showSourceFeedback(org.eclipse.gef.Request)
+ *
+ * @param request
+ */
+ @Override
+ public void showSourceFeedback(Request request) {
+
+ super.showSourceFeedback(request);
+ }
+ /**
+ * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#getFeedbackHelper(org.eclipse.gef.requests.CreateConnectionRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected FeedbackHelper getFeedbackHelper(CreateConnectionRequest request) {
+ return super.getFeedbackHelper(request);
+ }
+
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifeLineGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifeLineGraphicalNodeEditPolicy.java
new file mode 100644
index 00000000000..ee91cfe860d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifeLineGraphicalNodeEditPolicy.java
@@ -0,0 +1,229 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.referencialgrilling;
+
+import java.util.Map;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.editpolicies.FeedbackHelper;
+import org.eclipse.gef.requests.CreateConnectionRequest;
+import org.eclipse.gef.tools.AbstractTool.Input;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.commands.wrappers.GMFtoGEFCommandWrapper;
+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.snap.SnapUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.uml.diagram.sequence.command.DropDestructionOccurenceSpecification;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
+import org.eclipse.papyrus.uml.service.types.element.UMLDIElementTypes;
+import org.eclipse.swt.SWT;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageEnd;
+
+/**
+ *This class overload all creation of link between lifelines
+ */
+public class LifeLineGraphicalNodeEditPolicy extends DefaultGraphicalNodeEditPolicy implements IGrillingEditpolicy{
+
+ /** manage only for FOUND message**/
+ private GraphicalNodeEditPolicy graphicalNodeEditPolicy=null;
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy#getConnectionCreateCommand(org.eclipse.gef.requests.CreateConnectionRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
+
+ MessageEnd end=getPreviousEventFromPosition(request.getLocation());
+ if( end!=null){
+ Map<String, Object> extendedData = request.getExtendedData();
+ extendedData.put(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.PREVIOUS_EVENT,end);
+ request.setExtendedData(extendedData);
+ }
+ return super.getConnectionCreateCommand(request);
+ }
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy#getConnectionAndRelationshipCompleteCommand(org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected Command getConnectionAndRelationshipCompleteCommand(CreateConnectionViewAndElementRequest request) {
+ Command cmd= super.getConnectionAndRelationshipCompleteCommand(request);
+ MessageEnd end=getPreviousEventFromPosition(request.getLocation());
+ if( end!=null){
+ Map<String, Object> extendedData = request.getExtendedData();
+ extendedData.put(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.SECOND_PREVIOUS_EVENT,end);
+ request.setExtendedData(extendedData);
+ }
+
+ //
+ // in the case of a create message
+ // the target of the message is translated in Y to the position Y of the message
+ if(request.getConnectionViewAndElementDescriptor().getSemanticHint().equals(UMLDIElementTypes.MESSAGE_CREATE_EDGE.getSemanticHint())){
+ Rectangle relativePt=new Rectangle(0,request.getLocation().y,0,0);
+ getHostFigure().getParent().translateToRelative(relativePt);
+ NodeEditPart nodeEP=(NodeEditPart)request.getTargetEditPart();
+
+ Bounds bounds=((Bounds)((Node)nodeEP.getModel()).getLayoutConstraint());
+
+ SetBoundsCommand setBoundsCommand=new SetBoundsCommand(getDiagramEditPart(getHost()).getEditingDomain(), "update column", new EObjectAdapter( ((GraphicalEditPart)nodeEP).getNotationView()),
+ new Point(bounds.getX(),relativePt.y ));
+ CompoundCommand compoundCommand= new CompoundCommand();
+ compoundCommand.add(cmd);
+ compoundCommand.add(new GMFtoGEFCommandWrapper(setBoundsCommand));
+ return compoundCommand;
+ }
+ if(request.getConnectionViewAndElementDescriptor().getSemanticHint().equals(UMLDIElementTypes.MESSAGE_DELETE_EDGE.getSemanticHint())){
+ Rectangle relativePt=new Rectangle(request.getLocation().x,request.getLocation().y,0,0);
+ getHostFigure().getParent().translateToRelative(relativePt);
+ DropDestructionOccurenceSpecification dropDestructionOccurenceSpecification= new DropDestructionOccurenceSpecification(getDiagramEditPart(getHost()).getEditingDomain(), request, (NodeEditPart)request.getTargetEditPart(),relativePt.getTopLeft());
+ CompoundCommand compoundCommand= new CompoundCommand();
+ compoundCommand.add(cmd);
+ compoundCommand.add(new EMFtoGEFCommandWrapper(dropDestructionOccurenceSpecification));
+ return compoundCommand;
+ }
+
+
+
+ if(request.getConnectionViewAndElementDescriptor().getSemanticHint().equals(UMLDIElementTypes.MESSAGE_FOUND_EDGE.getSemanticHint())){
+ // in the case of the found message, because the serialization is very specific , we must call basic editpolicy of GMF
+ // so we create an new instance of the GraphicalNode editpolicy and we delegate the operation.
+ if( graphicalNodeEditPolicy==null){
+ graphicalNodeEditPolicy =new GraphicalNodeEditPolicy();
+ graphicalNodeEditPolicy.setHost(getHost());
+ }
+ return graphicalNodeEditPolicy.getCommand(request);
+ }
+
+
+ return cmd;
+ }
+
+ /**
+ * This method must look for event that are upper than the given position
+ * @param point
+ */
+ public MessageEnd getPreviousEventFromPosition(Point point){
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getHost());
+ MessageEnd previous= null;
+ LifelineEditPart lifelineEditPart= (LifelineEditPart)getHost();
+ Lifeline lifeline=(Lifeline) lifelineEditPart.resolveSemanticElement();
+ try{
+ GrillingManagementEditPolicy grilling=(GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ for (DecorationNode row : grilling.rows) {
+ Point currentPoint=GrillingManagementEditPolicy.getLocation(row);
+ if( currentPoint.y<point.y){
+ if( GrillingManagementEditPolicy.getRef(row)!=null){
+ for ( EObject referedElement : GrillingManagementEditPolicy.getRef(row)) {
+ if( referedElement instanceof View && ((View)referedElement).getElement() instanceof Message){
+ Message message=(Message)((View)referedElement).getElement();
+ MessageEnd receiveEvent=message.getReceiveEvent();
+ if(lifeline.getCoveredBys().contains(receiveEvent) ){
+ previous=receiveEvent;
+ }
+ MessageEnd sendEvent=message.getSendEvent();
+ if(lifeline.getCoveredBys().contains(sendEvent) ){
+ previous=sendEvent;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch (Exception e) {
+ }
+ return previous;
+ }
+
+
+
+ /**
+ * This method update the request in order to make the point at the correct position on the grill.
+ * @param request the request
+ * @param wanted the position has we want in the serialization
+ */
+ protected void computeTargetPosition(CreateConnectionRequest request, PrecisionPoint wanted){
+
+ ConnectionAnchor anchor = ((NodeEditPart)request.getTargetEditPart()).getTargetConnectionAnchor(request);
+ if( anchor instanceof AnchorHelper.InnerPointAnchor){
+ PrecisionPoint resultedPoint = BaseSlidableAnchor.parseTerminalString(((AnchorHelper.InnerPointAnchor)anchor).getTerminal());
+ while (resultedPoint.getDistance(wanted)>2 ){
+ Point original= request.getLocation().getCopy();
+ PrecisionPoint diff=new PrecisionPoint(original.x-resultedPoint.x,original.y- resultedPoint.y);
+ PrecisionRectangle ptOnScreen=new PrecisionRectangle( resultedPoint.x, resultedPoint.y,0,0);
+ SimpleSnapHelper.snapAPoint(ptOnScreen, getHost().getRoot());
+ PrecisionPoint Result=new PrecisionPoint(ptOnScreen.x+diff.x, ptOnScreen.y+diff.y);
+ request.setLocation(Result);
+ anchor = ((NodeEditPart)request.getTargetEditPart()).getTargetConnectionAnchor(request);
+ resultedPoint = BaseSlidableAnchor.parseTerminalString(((AnchorHelper.InnerPointAnchor)anchor).getTerminal());
+ }
+ }
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#getFeedbackHelper(org.eclipse.gef.requests.CreateConnectionRequest)
+ * This method is used in order to manage the snap to grid of LOST Message
+ */
+
+ protected FeedbackHelper getFeedbackHelper(CreateConnectionRequest request) {
+ ConnectionAnchor targetAnchor = ((NodeEditPart)request.getTargetEditPart()).getTargetConnectionAnchor(request);
+ if(DiagramEditPartsUtil.isSnapToGridActive(getHost())){
+ //This part is very peculiar for lost and found message because the anchor is not standard.
+ if( targetAnchor instanceof AnchorHelper.InnerPointAnchor){
+ PrecisionPoint pt = BaseSlidableAnchor.parseTerminalString(((AnchorHelper.InnerPointAnchor)targetAnchor).getTerminal());
+ PrecisionRectangle ptOnScreen=new PrecisionRectangle(pt.x, pt.y,0,0);
+ SimpleSnapHelper.snapAPoint(ptOnScreen,getHost().getRoot());
+ computeTargetPosition(request, new PrecisionPoint(ptOnScreen.x, ptOnScreen.y));
+ }
+
+ }
+ return super.getFeedbackHelper(request);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifeLineXYLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifeLineXYLayoutEditPolicy.java
new file mode 100644
index 00000000000..e3c576426f6
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/LifeLineXYLayoutEditPolicy.java
@@ -0,0 +1,278 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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.sequence.referencialgrilling;
+
+import java.util.Arrays;
+
+import javax.swing.text.StyleConstants.ColorConstants;
+
+import org.eclipse.draw2d.Ellipse;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.XYLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RootEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.LayoutHelper;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest.ViewAndElementDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.XYLayoutWithConstrainedResizedEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.EllipseFigure;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool.CreateAspectUnspecifiedTypeRequest;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CLifeLineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
+import org.eclipse.papyrus.uml.service.types.element.UMLDIElementTypes;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+
+/**
+ * This class is used to manage node element in the compartment by using grill system.
+ *
+ */
+public class LifeLineXYLayoutEditPolicy extends XYLayoutWithConstrainedResizedEditPolicy implements IGrillingEditpolicy{
+
+ protected DisplayEvent displayEvent;
+ /**
+ * Constructor.
+ *
+ */
+ public LifeLineXYLayoutEditPolicy() {
+ super();
+
+ }
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#setHost(org.eclipse.gef.EditPart)
+ *
+ * @param host
+ */
+ @Override
+ public void setHost(EditPart host) {
+ // TODO Auto-generated method stub
+ super.setHost(host);
+ displayEvent= new DisplayEvent(getHost());
+ }
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.XYLayoutWithConstrainedResizedEditPolicy#getCreateCommand(org.eclipse.gef.requests.CreateRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ // Used during the drop from the model explorer
+ if( request instanceof CreateViewAndElementRequest){
+ CreateViewAndElementRequest req=(CreateViewAndElementRequest)request;
+ ViewAndElementDescriptor descriptor=(req).getViewAndElementDescriptor();
+ IElementType elementType = (IElementType) descriptor.getElementAdapter().getAdapter(IElementType.class);
+ if (ElementUtil.isTypeOf(elementType, UMLDIElementTypes.ACTION_EXECUTION_SPECIFICATION_SHAPE)||
+ ElementUtil.isTypeOf(elementType, UMLDIElementTypes.BEHAVIOR_EXECUTION_SPECIFICATION_SHAPE)){
+ // get the element descriptor
+ CreateElementRequestAdapter requestAdapter =
+ req.getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // get the semantic request
+ CreateElementRequest createElementRequest =
+ (CreateElementRequest) requestAdapter.getAdapter(
+ CreateElementRequest.class);
+ View view = (View)getHost().getModel();
+ EObject hostElement = ViewUtil.resolveSemanticElement(view);
+ createElementRequest.setContainer(hostElement.eContainer());
+ createElementRequest.setParameter(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.COVERED, hostElement);
+ MessageOccurrenceSpecification mos=displayEvent.getMessageEvent(getHostFigure().getParent().getParent(), ((CreateRequest)request).getLocation());
+ if( mos!=null){
+ createElementRequest.setParameter(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.REPLACE_EXECUTION_SPECIFICATION_START, mos);
+ }
+ }
+ }
+ return super.getCreateCommand(request);
+ }
+ /* Override to use to deal with causes where the point is UNDERFINED
+ * we will ask the layout helper to find a location for us
+ * @see org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy#getConstraintFor(org.eclipse.gef.requests.CreateRequest)
+ */
+ protected Object getConstraintFor(CreateRequest request) {
+ // Used during the creation from the palette
+ Object constraint = super.getConstraintFor(request);
+ if(request instanceof CreateViewAndElementRequest){
+ CreateViewAndElementRequest req=(CreateViewAndElementRequest)request;
+ ViewAndElementDescriptor descriptor=(req).getViewAndElementDescriptor();
+ IElementType elementType = (IElementType) descriptor.getElementAdapter().getAdapter(IElementType.class);
+ if (ElementUtil.isTypeOf(elementType, UMLDIElementTypes.ACTION_EXECUTION_SPECIFICATION_SHAPE)||
+ ElementUtil.isTypeOf(elementType, UMLDIElementTypes.BEHAVIOR_EXECUTION_SPECIFICATION_SHAPE)){
+ Rectangle parentBound=getHostFigure().getBounds();
+ if(constraint instanceof Rectangle){
+ Rectangle constraintRect= (Rectangle)constraint;
+ RootEditPart drep=getHost().getRoot();
+ if( drep instanceof DiagramRootEditPart){
+
+ double spacing = ((DiagramRootEditPart)drep).getGridSpacing();
+ if( constraintRect.height==-1){
+ constraintRect.height=AbstractExecutionSpecificationEditPart.DEFAUT_HEIGHT;
+ }
+ constraintRect.width= AbstractExecutionSpecificationEditPart.DEFAUT_WIDTH;
+ constraintRect.x=(parentBound.width/2)-(constraintRect.width/2);
+ if(DiagramEditPartsUtil.isSnapToGridActive(getHost())){
+ int modulo= AbstractExecutionSpecificationEditPart.DEFAUT_HEIGHT/(int)spacing;
+ constraintRect.height=modulo*(int)spacing;
+ }
+ }
+ }
+ }
+ }
+ return constraint;
+ }
+ /**
+ * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#showLayoutTargetFeedback(org.eclipse.gef.Request)
+ *
+ * @param request
+ */
+ @Override
+ protected void showLayoutTargetFeedback(Request request) {
+
+
+ // feed back during the creation from the palette
+ RootEditPart drep=getHost().getRoot();
+ Rectangle parentBound=getHostFigure().getBounds().getCopy();
+ getHostFigure().getParent().translateToAbsolute(parentBound);
+ //System.out.println("LifeLineBounds On Screen:"+parentBound);
+ if( drep instanceof DiagramRootEditPart){
+ double spacing = ((DiagramRootEditPart)drep).getGridSpacing();
+ if(request instanceof CreateAspectUnspecifiedTypeRequest){
+ IElementType elementType = (IElementType)((CreateAspectUnspecifiedTypeRequest)request).getElementTypes().get(0);
+ if (ElementUtil.isTypeOf(elementType, UMLDIElementTypes.ACTION_EXECUTION_SPECIFICATION_SHAPE)||
+ ElementUtil.isTypeOf(elementType, UMLDIElementTypes.BEHAVIOR_EXECUTION_SPECIFICATION_SHAPE)){
+ ((CreateRequest)request).setLocation(new Point((parentBound.x+(parentBound.width/2)-AbstractExecutionSpecificationEditPart.DEFAUT_WIDTH/2),((CreateRequest)request).getLocation().y));
+ int modulo= AbstractExecutionSpecificationEditPart.DEFAUT_HEIGHT/(int)spacing;
+ ((CreateRequest)request).setSize(new Dimension(AbstractExecutionSpecificationEditPart.DEFAUT_WIDTH,modulo*(int)spacing));
+
+
+ displayEvent.addFigureEvent(getHostFigure().getParent().getParent(), ((CreateRequest)request).getLocation());
+ }
+
+ }
+
+ if(request instanceof ChangeBoundsRequest){
+ //test
+ ((ChangeBoundsRequest)request).setMoveDelta(new Point(0, ((ChangeBoundsRequest)request).getMoveDelta().y));
+ }
+ }
+
+ super.showLayoutTargetFeedback(request);
+ }
+ /**
+ * @see org.eclipse.gef.editpolicies.GraphicalEditPolicy#addFeedback(org.eclipse.draw2d.IFigure)
+ *
+ * @param figure
+ */
+ @Override
+ protected void addFeedback(IFigure figure) {
+ super.addFeedback(figure);
+
+
+
+ }
+ /**
+ * @see org.eclipse.gef.editpolicies.GraphicalEditPolicy#removeFeedback(org.eclipse.draw2d.IFigure)
+ *
+ * @param figure
+ */
+ @Override
+ protected void removeFeedback(IFigure figure) {
+
+ displayEvent.removeFigureEvent(getHostFigure().getParent().getParent());
+ super.removeFeedback(figure);
+
+ }
+
+ /**
+ * Called in response to a <tt>REQ_RESIZE_CHILDREN</tt> request.
+ *
+ * This implementation creates a <tt>SetPropertyCommand</i> and sets
+ * the <tt>ID_BOUNDS</tt> property value to the supplied constraints.
+ *
+ * @param child the element being resized.
+ * @param constraint the elements new bounds.
+ * @return {@link SetBoundsCommand}
+ */
+ protected Command createChangeConstraintCommand(
+ EditPart child,
+ Object constraint) {
+ Rectangle newBounds = (Rectangle) constraint;
+ View shapeView = (View) child.getModel();
+
+ if( child instanceof AbstractExecutionSpecificationEditPart){
+ RootEditPart drep=getHost().getRoot();
+ if( drep instanceof DiagramRootEditPart){
+ double spacing = ((DiagramRootEditPart)drep).getGridSpacing();
+ Rectangle parentBound=getHostFigure().getBounds();
+ newBounds.setLocation(new Point((parentBound.width/2)-(AbstractExecutionSpecificationEditPart.DEFAUT_WIDTH/2),newBounds.getLocation().y));
+ if( newBounds.height==-1){
+ newBounds.height=AbstractExecutionSpecificationEditPart.DEFAUT_HEIGHT;
+ }
+ if(DiagramEditPartsUtil.isSnapToGridActive(getHost())){
+ int modulo= newBounds.height/(int)spacing;
+ newBounds.setSize(new Dimension(AbstractExecutionSpecificationEditPart.DEFAUT_WIDTH,modulo*(int)spacing));
+ }
+
+ }
+ }
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+ .getEditingDomain();
+ ICommand boundsCommand =
+ new SetBoundsCommand(editingDomain,
+ DiagramUIMessages.SetLocationCommand_Label_Resize,
+ new EObjectAdapter(shapeView),
+ newBounds);
+ CompoundCommand compoundCommand= new CompoundCommand();
+ compoundCommand.add( new ICommandProxy(boundsCommand));
+
+ return compoundCommand;
+ }
+
+
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConstraintEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/NoGrillElementFound.java
index aaa49d1a1f2..7ddf901772e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConstraintEditHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/NoGrillElementFound.java
@@ -1,20 +1,22 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class ConstraintEditHelper extends UMLBaseEditHelper {
-}
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.referencialgrilling;
+
+/**
+ * @author PT202707
+ *
+ */
+public class NoGrillElementFound extends Exception {
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/SimpleSnapHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/SimpleSnapHelper.java
new file mode 100644
index 00000000000..5c250a95118
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/SimpleSnapHelper.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.referencialgrilling;
+
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.gef.RootEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
+
+/**
+ * @author PT202707
+ *
+ */
+public class SimpleSnapHelper {
+
+ /**
+ * @param update the point by taking account the spacing form the diagram
+ */
+ /**
+ * @param update the point by taking account the spacing form the diagram
+ */
+ public static void snapAPoint(PrecisionRectangle ptOnScreen, RootEditPart drep) {
+ if( drep instanceof DiagramRootEditPart){
+ double spacing = ((DiagramRootEditPart)drep).getGridSpacing();
+ int modulo= (int)((ptOnScreen.y) / spacing);
+ double rest=(ptOnScreen.y) % spacing;
+ if( rest>(spacing/2)){
+ modulo=modulo+1;
+ }
+ if (modulo==0){
+ ptOnScreen.setPreciseY(0);
+ }
+ else{
+ ptOnScreen.setPreciseY((spacing*modulo));
+ }
+
+
+ modulo= (int)((ptOnScreen.x) / spacing);
+ rest=(ptOnScreen.x) % spacing;
+ if( rest>(spacing/2)){
+ modulo=modulo+1;
+ }
+ if (modulo==0){
+ ptOnScreen.setPreciseX(0);
+ }
+ else{
+ ptOnScreen.setPreciseX((spacing*modulo));
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/BehaviorDisplayHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/BehaviorDisplayHelper.java
index a57aa8c874b..92fd31367c8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/BehaviorDisplayHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/BehaviorDisplayHelper.java
@@ -27,6 +27,7 @@ import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.util.Util;
+import org.eclipse.papyrus.infra.core.Activator;
import org.eclipse.papyrus.infra.emf.commands.CreateEAnnotationCommand;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
@@ -34,7 +35,6 @@ import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
import org.eclipse.papyrus.infra.properties.ui.modelelement.AnnotationModelElement;
import org.eclipse.papyrus.infra.properties.ui.modelelement.AnnotationModelElementFactory;
import org.eclipse.papyrus.infra.ui.emf.databinding.AnnotationObservableValue;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
/**
* @author Jin Liu (jin.liu@soyatec.com)
@@ -47,7 +47,7 @@ public class BehaviorDisplayHelper extends AnnotationModelElementFactory {
protected AnnotationModelElement doCreateFromSource(Object sourceElement, DataContextElement context) {
View source = NotationHelper.findView(sourceElement);
if (source == null) {
- UMLDiagramEditorPlugin.log
+ Activator.log
.warn("Unable to resolve the selected element to an EObject"); //$NON-NLS-1$
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentDeleteHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentDeleteHelper.java
index 2494fa290e6..a3d55ff5757 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentDeleteHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentDeleteHelper.java
@@ -274,6 +274,7 @@ public class CombinedFragmentDeleteHelper {
return new SelectAndDeleteCommand(deleteAll, deleteCfOnly, new String[] { "Delete all", "Keep contents" });
}
+ @Deprecated
public static ICommand createDeleteViewCommand(CombinedFragment cf, TransactionalEditingDomain transactionalEditingDomain, CombinedFragmentEditPart host) {
CompositeTransactionalCommand deleteAll = new CompositeTransactionalCommand(transactionalEditingDomain, null);
{
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentMoveHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentMoveHelper.java
index caa9626d244..a1f00362b4f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentMoveHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentMoveHelper.java
@@ -34,7 +34,7 @@ import org.eclipse.gmf.runtime.notation.Bounds;
import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomCombinedFragmentEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDCustomCombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomInteractionOperandEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionCompartmentXYLayoutEditPolicy;
@@ -78,9 +78,9 @@ public class CombinedFragmentMoveHelper {
*/
public static GraphicalEditPart findNewParentEP(ChangeBoundsRequest request, EditPart hostEP) {
GraphicalEditPart parentEP = (GraphicalEditPart) hostEP;
- if (hostEP.getParent() instanceof CustomCombinedFragmentEditPart) {
+ if (hostEP.getParent() instanceof OLDCustomCombinedFragmentEditPart) {
// Select which InteractionOperand we're dropping to
- CustomCombinedFragmentEditPart hostCFEP = (CustomCombinedFragmentEditPart) hostEP.getParent();
+ OLDCustomCombinedFragmentEditPart hostCFEP = (OLDCustomCombinedFragmentEditPart) hostEP.getParent();
List<CustomInteractionOperandEditPart> operands = hostCFEP.getOperandChildrenEditParts();
if (!operands.isEmpty()) {
Point location = request.getLocation();
@@ -103,7 +103,7 @@ public class CombinedFragmentMoveHelper {
*/
public static void adjustNewParentOperands(CompoundCommand cc, Rectangle newParentNewRect, Rectangle newParentOldRect, EditPart hostEP) {
Set<Object> alreadyMovedBlocks = new HashSet<Object>();
- CustomCombinedFragmentEditPart hostCFEP = (CustomCombinedFragmentEditPart) hostEP.getParent();
+ OLDCustomCombinedFragmentEditPart hostCFEP = (OLDCustomCombinedFragmentEditPart) hostEP.getParent();
List<CustomInteractionOperandEditPart> operands = hostCFEP.getOperandChildrenEditParts();
int moveUpperYOffset = newParentNewRect.y - newParentOldRect.y;
int moveLowerYOffset = newParentNewRect.height - newParentOldRect.height;
@@ -148,10 +148,10 @@ public class CombinedFragmentMoveHelper {
CompoundCommand cc = new CompoundCommand("shift inner CFs"); //$NON-NLS-1$
List<?> children = editPart.getChildren();
for (int i = 0; i < children.size(); i++) {
- if (false == children.get(i) instanceof CustomCombinedFragmentEditPart) {
+ if (false == children.get(i) instanceof OLDCustomCombinedFragmentEditPart) {
continue;
}
- CustomCombinedFragmentEditPart childCF = (CustomCombinedFragmentEditPart) children.get(i);
+ OLDCustomCombinedFragmentEditPart childCF = (OLDCustomCombinedFragmentEditPart) children.get(i);
final ChangeBoundsRequest moveChildCFRequest = new ChangeBoundsRequest();
moveChildCFRequest.setType(RequestConstants.REQ_MOVE);
@@ -171,7 +171,7 @@ public class CombinedFragmentMoveHelper {
* Move CombinedFragment EP
*
*/
- public static void moveCombinedFragmentEP(CompoundCommand cc, ChangeBoundsRequest request, CustomCombinedFragmentEditPart combinedFragmentEP, GraphicalEditPart newParentEP, Point newParentOffsetSW) {
+ public static void moveCombinedFragmentEP(CompoundCommand cc, ChangeBoundsRequest request, OLDCustomCombinedFragmentEditPart combinedFragmentEP, GraphicalEditPart newParentEP, Point newParentOffsetSW) {
// Calc CF moveDelta
final ChangeBoundsRequest forceLocationRequest = new ChangeBoundsRequest();
forceLocationRequest.setType(RequestConstants.REQ_MOVE_CHILDREN);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/EventHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/EventHelper.java
index 25dd92816ac..32419194adb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/EventHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/EventHelper.java
@@ -14,7 +14,7 @@
package org.eclipse.papyrus.uml.diagram.sequence.util;
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
import org.eclipse.uml2.uml.CallEvent;
import org.eclipse.uml2.uml.Event;
import org.eclipse.uml2.uml.Interaction;
@@ -39,7 +39,7 @@ public class EventHelper {
*/
public static Event doCreateEvent(Package eventContainer, EClass eClass) {
Event event = (Event) eventContainer.createPackagedElement(null, eClass);
- ElementInitializers.init_NamedElement(event);
+ NamedElementUtil.getDefaultNameWithIncrement(event, event.getOwner().eContents());
return event;
}
@@ -110,6 +110,7 @@ public class EventHelper {
* the signal of the event. Can't be null
* @return the ReceiveSignal event
*/
+
// Does not exist anymore in UML 2.4
// public static ReceiveSignalEvent doCreateReceiveSignalEvent(Package eventContainer, Signal signal) {
// ReceiveSignalEvent receiveSignalEvent = (ReceiveSignalEvent)doCreateEvent(eventContainer, UMLPackage.eINSTANCE.getReceiveSignalEvent());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/GateModelElementFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/GateModelElementFactory.java
index 5e3157aa9a3..d4570bc0564 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/GateModelElementFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/GateModelElementFactory.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.Activator;
import org.eclipse.papyrus.infra.emf.commands.CreateEAnnotationCommand;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
@@ -27,7 +28,6 @@ import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
import org.eclipse.papyrus.infra.properties.ui.modelelement.AnnotationModelElement;
import org.eclipse.papyrus.infra.properties.ui.modelelement.AnnotationModelElementFactory;
import org.eclipse.papyrus.infra.ui.emf.databinding.AnnotationObservableValue;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
/**
* @author Jin Liu (jin.liu@soyatec.com)
@@ -40,7 +40,7 @@ public class GateModelElementFactory extends AnnotationModelElementFactory {
protected AnnotationModelElement doCreateFromSource(Object sourceElement, DataContextElement context) {
View source = NotationHelper.findView(sourceElement);
if (source == null) {
- UMLDiagramEditorPlugin.log.warn("Unable to resolve the selected element to an EObject"); //$NON-NLS-1$
+ Activator.log.warn("Unable to resolve the selected element to an EObject"); //$NON-NLS-1$
return null;
}
EditingDomain domain = EMFHelper.resolveEditingDomain(source);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/HighlightUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/HighlightUtil.java
index 3df8f89ea30..d6a8c1db0de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/HighlightUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/HighlightUtil.java
@@ -70,7 +70,7 @@ public class HighlightUtil {
List<IFigure> figures = new ArrayList<IFigure>();
if (host instanceof LifelineEditPart) {
LifelineEditPart part = (LifelineEditPart) host;
- figures.add(part.getPrimaryShape().getFigureLifelineNameContainerFigure());
+ //figures.add(part.getPrimaryShape().getFigureLifelineNameContainerFigure());
figures.add(part.getPrimaryShape().getFigureLifelineDotLineFigure());
} else if (host instanceof InteractionOperandEditPart) {
InteractionOperandEditPart op = (InteractionOperandEditPart) host;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperandModelElementFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperandModelElementFactory.java
index ce60724390c..068ee368a36 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperandModelElementFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperandModelElementFactory.java
@@ -21,6 +21,7 @@ import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.Activator;
import org.eclipse.papyrus.infra.emf.commands.CreateEAnnotationCommand;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
@@ -46,7 +47,7 @@ public class InteractionOperandModelElementFactory extends AnnotationModelElemen
protected AnnotationModelElement doCreateFromSource(Object sourceElement, DataContextElement context) {
View source = NotationHelper.findView(sourceElement);
if (source == null) {
- UMLDiagramEditorPlugin.log.warn("Unable to resolve the selected element to an EObject"); //$NON-NLS-1$
+ Activator.log.warn("Unable to resolve the selected element to an EObject"); //$NON-NLS-1$
return null;
}
EditingDomain domain = EMFHelper.resolveEditingDomain(source);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineCoveredByUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineCoveredByUpdater.java
index 93e8dc9b65f..cca03a58d18 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineCoveredByUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineCoveredByUpdater.java
@@ -37,7 +37,7 @@ import org.eclipse.gmf.runtime.notation.Shape;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
import org.eclipse.papyrus.uml.diagram.common.commands.PreserveAnchorsPositionCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart.PreserveAnchorsPositionCommandEx;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart.PreserveAnchorsPositionCommandEx;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.InteractionFragment;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineEditPartUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineEditPartUtil.java
index a3c557a0e3d..352f975c808 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineEditPartUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineEditPartUtil.java
@@ -20,7 +20,7 @@ import java.util.List;
import org.eclipse.draw2d.IFigure;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
@@ -45,7 +45,7 @@ public class LifelineEditPartUtil {
for (Object obj : lifeline.getChildren()) {
if (obj instanceof BehaviorExecutionSpecificationEditPart) {
executionSpecificationList.add((ShapeNodeEditPart) obj);
- } else if (obj instanceof ActionExecutionSpecificationEditPart) {
+ } else if (obj instanceof CCombinedCompartmentEditPart) {
executionSpecificationList.add((ShapeNodeEditPart) obj);
} else if (obj instanceof CombinedFragment2EditPart) {
executionSpecificationList.add((ShapeNodeEditPart) obj);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineHeadUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineHeadUtil.java
index a17942044ef..aa373496d5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineHeadUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineHeadUtil.java
@@ -48,7 +48,7 @@ import org.eclipse.gmf.runtime.notation.Size;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
@@ -80,11 +80,11 @@ public class LifelineHeadUtil {
continue;
}
LifelineFigure primaryShape = lifeline.getPrimaryShape();
- RectangleFigure figure = primaryShape.getFigureLifelineNameContainerFigure();
- Rectangle r = figure.getBounds().getCopy();
- if (!r.isEmpty()) {
- bottom = Math.max(bottom, r.bottom());
- }
+// RectangleFigure figure = primaryShape.getFigureLifelineNameContainerFigure();
+// Rectangle r = figure.getBounds().getCopy();
+// if (!r.isEmpty()) {
+// bottom = Math.max(bottom, r.bottom());
+// }
}
if (bottom != -1) {
RectangleFigure figure = new RectangleFigure();
@@ -339,18 +339,18 @@ public class LifelineHeadUtil {
}
toMovedLifelines.add(source);
}
-
- if (editPart instanceof CustomLifelineEditPart && ((CustomLifelineEditPart) editPart).isInlineMode()) {
- List<?> children = ((CustomLifelineEditPart) editPart).getChildren();
- for (Object object : children) {
- if (object instanceof LifelineEditPart) {
- collectLifelines(toMovedLifelines, (LifelineEditPart) object);
- }
- }
- if (toMovedLifelines.isEmpty()) {
- toMovedLifelines.add((LifelineEditPart) editPart);
- }
- }
+//
+// if (editPart instanceof CustomLifelineEditPart && ((CustomLifelineEditPart) editPart).isInlineMode()) {
+// List<?> children = ((CustomLifelineEditPart) editPart).getChildren();
+// for (Object object : children) {
+// if (object instanceof LifelineEditPart) {
+// collectLifelines(toMovedLifelines, (LifelineEditPart) object);
+// }
+// }
+// if (toMovedLifelines.isEmpty()) {
+// toMovedLifelines.add((LifelineEditPart) editPart);
+// }
+// }
}
private static Command getVerticalMoveShapeCommand(GraphicalEditPart shapeEditPart, int moveDelta, boolean increaseHeight) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageCreateHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageCreateHelper.java
index a700402b827..50fe9fe157d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageCreateHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageCreateHelper.java
@@ -39,8 +39,8 @@ import org.eclipse.gmf.runtime.notation.Shape;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.gmf.runtime.notation.impl.ShapeImpl;
import org.eclipse.papyrus.uml.diagram.common.draw2d.anchors.LifelineAnchor;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomInteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OldCustomInteractionEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure;
@@ -60,19 +60,19 @@ public class LifelineMessageCreateHelper {
}
public static ConnectionAnchor getCreateMessageAnchor(LifelineEditPart part, Request request, Point location) {
- IFigure fig = part.getPrimaryShape().getFigureLifelineNameContainerFigure();
- fig.translateToRelative(location);
- if (fig.containsPoint(location)) {// move to header
- return new LifelineAnchor(part.getPrimaryShape().getFigureLifelineNameContainerFigure());
- }
- // move to dash line
+// IFigure fig = part.getPrimaryShape().getFigureLifelineNameContainerFigure();
+// fig.translateToRelative(location);
+// if (fig.containsPoint(location)) {// move to header
+// return new LifelineAnchor(part.getPrimaryShape().getFigureLifelineNameContainerFigure());
+// }
+// // move to dash line
return getTargetConnectionAnchor(part, request);
}
static ConnectionAnchor getTargetConnectionAnchor(LifelineEditPart part, Request request) {
NodeFigure nodeFigure = null;
- if (part instanceof CustomLifelineEditPart) {
- nodeFigure = ((CustomLifelineEditPart) part).getNodeFigure();
+ if (part instanceof OLDLifelineEditPart) {
+ nodeFigure = ((OLDLifelineEditPart) part).getNodeFigure();
} else {
if (part.getContentPane() instanceof LifelineDotLineCustomFigure) {
nodeFigure = ((LifelineDotLineCustomFigure) part.getContentPane()).getDashLineRectangle();
@@ -182,7 +182,7 @@ public class LifelineMessageCreateHelper {
public static Command reconnectMessageCreateTarget(ReconnectRequest request, Command command) {
LifelineEditPart oldTarget = (LifelineEditPart) request.getConnectionEditPart().getTarget();
// LifelineEditPart source = (LifelineEditPart)request.getConnectionEditPart().getSource();
- CustomLifelineEditPart newTarget = (CustomLifelineEditPart) request.getTarget();
+ OLDLifelineEditPart newTarget = (OLDLifelineEditPart) request.getTarget();
// move up the original connection target lifeline, it has only one create message, which will be removed
if (getIncomingMessageCreate(oldTarget).size() == 1) {
Rectangle bounds = oldTarget.getPrimaryShape().getBounds();
@@ -197,7 +197,7 @@ public class LifelineMessageCreateHelper {
return command;
}
- public static Command moveLifelineDown(Command command, CustomLifelineEditPart part, Point sourcePointCopy) {
+ public static Command moveLifelineDown(Command command, OLDLifelineEditPart part, Point sourcePointCopy) {
IFigure fig = part.getFigure();
Rectangle bounds = fig.getBounds().getCopy();
int height = part.getPrimaryShape().getFigureLifelineNameContainerFigure().getBounds().height;
@@ -223,7 +223,7 @@ public class LifelineMessageCreateHelper {
public static Command moveCascadeLifeline(LifelineEditPart part, Command command, int dy) {
command = moveCascadeLifelineRecursive(part, command, dy);
- CustomInteractionEditPart interactionEP = (CustomInteractionEditPart) part.getParent().getParent();
+ OldCustomInteractionEditPart interactionEP = (OldCustomInteractionEditPart) part.getParent().getParent();
command = interactionEP.getUpdateLifelinesHeightsCommand(command);
return command;
}
@@ -235,8 +235,8 @@ public class LifelineMessageCreateHelper {
for (Object l : list) {
if (l instanceof MessageCreateEditPart) {
EditPart target = ((MessageCreateEditPart) l).getTarget();
- if (target instanceof CustomLifelineEditPart) {
- CustomLifelineEditPart lp = (CustomLifelineEditPart) target;
+ if (target instanceof OLDLifelineEditPart) {
+ OLDLifelineEditPart lp = (OLDLifelineEditPart) target;
Rectangle bounds = lp.getFigure().getBounds().getCopy();
View targetView = lp.getNotationView();
Point location = bounds.getLocation().getCopy().translate(0, dy);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageDeleteHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageDeleteHelper.java
index 738263667e4..779e0d5b2f3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageDeleteHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageDeleteHelper.java
@@ -38,6 +38,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpec
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant;
import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
import org.eclipse.uml2.uml.InteractionFragment;
import org.eclipse.uml2.uml.Lifeline;
@@ -47,70 +48,6 @@ import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
public class LifelineMessageDeleteHelper {
- public static Command getReconnectMessageDeleteTargetCommand(ReconnectRequest request, Command command) {
- GraphicalEditPart oldTarget = (GraphicalEditPart) request.getConnectionEditPart().getTarget();
- TransactionalEditingDomain editingDomain = oldTarget.getEditingDomain();
- EditPart targetEP = request.getTarget();
- CreateElementAndNodeCommand createDosCommand = getCreateNewDosCommand(request.getLocation(), editingDomain, targetEP, oldTarget);
- if (createDosCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- command = command.chain(new ICommandProxy(createDosCommand));
- ChangeEdgeTargetCommand changeTargetCommand = new ChangeEdgeTargetCommand(editingDomain, createDosCommand, (Edge)request.getConnectionEditPart().getModel(), "(0.5, 1.0)");
- command = command.chain(new ICommandProxy(changeTargetCommand));
- return command;
- }
-
- public static Command getAttachToNewDosCommand(Command command, CreateConnectionViewAndElementRequest viewRequest, TransactionalEditingDomain editingDomain, EditPart targetEP, EditPart hostEP) {
- CreateElementAndNodeCommand createDosCommand = getCreateNewDosCommand(viewRequest.getLocation(), editingDomain, targetEP, hostEP);
- if (createDosCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- command = command.chain(new ICommandProxy(createDosCommand));
- ChangeEdgeTargetCommand changeTargetCommand = new ChangeEdgeTargetCommand(editingDomain, createDosCommand, viewRequest.getConnectionViewDescriptor(), "(0.5, 1.0)");
- command = command.chain(new ICommandProxy(changeTargetCommand));
- // Set Edge.Target to the target lifeline
- command = command.chain(LifelineMessageDeleteHelper.getSetEdgeTargetCommand(viewRequest, editingDomain));
- return command;
- }
-
- private static CreateElementAndNodeCommand getCreateNewDosCommand(Point location, TransactionalEditingDomain editingDomain, EditPart targetEP, EditPart hostEP) {
- // target is either Lifeline or CustomBehaviorExecutionSpecificationEditPart, get Lifeline in the later case
- if (targetEP instanceof AbstractExecutionSpecificationEditPart) {
- targetEP = ((AbstractExecutionSpecificationEditPart)targetEP).getParent();
- }
- if (false == targetEP instanceof LifelineEditPart) {
- return null;
- }
- LifelineEditPart lifelineEP = (LifelineEditPart) targetEP;
- // Check if a DOS exists already
- Lifeline lifeline = (Lifeline) lifelineEP.resolveSemanticElement();
- EList<InteractionFragment> coveredBys = lifeline.getCoveredBys();
- for (InteractionFragment interactionFragment : coveredBys) {
- if (interactionFragment instanceof DestructionOccurrenceSpecification) {
- return null;
- }
- }
- // Create new DOS at coords from request
- IHintedType hintType = (IHintedType) UMLElementTypes.DestructionOccurrenceSpecification_Shape;
- InteractionFragment ift = SequenceUtil.findInteractionFragmentContainerAt(location, hostEP);
- CreateElementAndNodeCommand createDosCommand = new CreateElementAndNodeCommand(editingDomain, lifelineEP, lifeline, hintType, location);
- createDosCommand.putCreateElementRequestParameter(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER, ift);
- return createDosCommand;
- }
-
- public static void setMessageEndDos(Message message, DestructionOccurrenceSpecification dos) {
- MessageEnd oldMessageEnd = message.getReceiveEvent();
- dos.setMessage(message);
- message.setReceiveEvent(dos);
- if (oldMessageEnd != null) {
- oldMessageEnd.setMessage(null);
- // Destroy orphan MessageOccurrenceSpecification
- if (oldMessageEnd instanceof MessageOccurrenceSpecification) {
- DestroyElementCommand.destroy(oldMessageEnd);
- }
- }
- }
/*
* Set edge.target to the target lifeline
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/MessageAnchorRepairer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/MessageAnchorRepairer.java
index 7c3838823bf..c0740c2b6d3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/MessageAnchorRepairer.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/MessageAnchorRepairer.java
@@ -31,7 +31,7 @@ import org.eclipse.gmf.runtime.notation.IdentityAnchor;
import org.eclipse.papyrus.uml.diagram.common.commands.PreserveAnchorsPositionCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractMessageEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
/**
@@ -46,7 +46,7 @@ public class MessageAnchorRepairer {
Dimension sizeDelta = new Dimension(0, heightDelta);
int preserveAxis = PreserveAnchorsPositionCommand.PRESERVE_Y;
if (editPart instanceof LifelineEditPart) {
- return new CustomLifelineEditPart.PreserveAnchorsPositionCommandEx(editPart, sizeDelta, preserveAxis);
+ return new OLDLifelineEditPart.PreserveAnchorsPositionCommandEx(editPart, sizeDelta, preserveAxis);
}
return new PreserveAnchorsPositionCommand(editPart, sizeDelta, preserveAxis);
}
@@ -57,7 +57,7 @@ public class MessageAnchorRepairer {
}
Dimension sizeDelta = new Dimension(0, heightDelta);
if (editPart instanceof LifelineEditPart) {
- return new CustomLifelineEditPart.PreserveAnchorsPositionCommandEx(editPart, sizeDelta, PreserveAnchorsPositionCommand.PRESERVE_Y, editPart.getFigure(), direction);
+ return new OLDLifelineEditPart.PreserveAnchorsPositionCommandEx(editPart, sizeDelta, PreserveAnchorsPositionCommand.PRESERVE_Y, editPart.getFigure(), direction);
}
return new PreserveAnchorsPositionCommand(editPart, sizeDelta, PreserveAnchorsPositionCommand.PRESERVE_Y, editPart.getFigure(), direction);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationMoveHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationMoveHelper.java
index ec1d5288175..aebb67eedbd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationMoveHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationMoveHelper.java
@@ -62,7 +62,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomDurationConstra
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ObservationLinkEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDLifelineXYLayoutEditPolicy;
import org.eclipse.uml2.common.util.CacheAdapter;
import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
import org.eclipse.uml2.uml.DurationConstraint;
@@ -728,7 +728,7 @@ public class OccurrenceSpecificationMoveHelper {
req.setEditParts(editPart);
// Make sure do not coming again to update duration constraints...
req.getExtendedData().put(SequenceRequestConstant.DO_NOT_MOVE_EDIT_PARTS, true);
- return LifelineXYLayoutEditPolicy.getResizeOrMoveChildrenCommand((LifelineEditPart) editPart.getParent(), req, true, false, true);
+ return OLDLifelineXYLayoutEditPolicy.getResizeOrMoveChildrenCommand((LifelineEditPart) editPart.getParent(), req, true, false, true);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperandBoundsComputeHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperandBoundsComputeHelper.java
index 23b0e23dae5..cab779a5c45 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperandBoundsComputeHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperandBoundsComputeHelper.java
@@ -68,13 +68,13 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpec
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractMessageEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomCombinedFragmentEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDCustomCombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomInteractionOperandEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GateEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDLifelineXYLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.uml2.common.util.CacheAdapter;
@@ -383,7 +383,8 @@ public class OperandBoundsComputeHelper {
* @param sizeDelta
* @param direction
*/
- private static void updateIOBoundsForCFResize(final ChangeBoundsRequest request, CompoundCommand compoundCmd, List<EditPart> combinedFragmentChildrenEditParts, CombinedFragment cf, InteractionOperand targetOperand, final Dimension sizeDelta, int direction) {
+ private static void updateIOBoundsForCFResize(final ChangeBoundsRequest request, CompoundCommand compoundCmd, List<EditPart> combinedFragmentChildrenEditParts, CombinedFragment cf, InteractionOperand targetOperand, final Dimension sizeDelta,
+ int direction) {
InteractionOperandEditPart targetOperandEditPart = findTargetOperandEditPart(cf, targetOperand, combinedFragmentChildrenEditParts);
for (EditPart ep : combinedFragmentChildrenEditParts) {
if (ep instanceof InteractionOperandEditPart) {
@@ -583,9 +584,9 @@ public class OperandBoundsComputeHelper {
reqEastWest.setLocation(request.getLocation());
reqEastWest.setExtendedData(request.getExtendedData());
reqEastWest.setResizeDirection(directionEastWest);
- ICommand horResizeCommand = new CommandProxy(currentIOEP.getParent().getParent().getCommand(reqEastWest));
+ ICommand horResizeCommand = new CommandProxy(currentIOEP.getParent().getParent().getCommand(reqEastWest));
compositeCommand.add(horResizeCommand);
- }
+ }
Bounds targetIOEPBounds = OperandBoundsComputeHelper.getEditPartBounds(targetIOEP);
if (targetIOEPBounds == null) {
return null;
@@ -728,7 +729,7 @@ public class OperandBoundsComputeHelper {
groupRect.union(rect);
}
}
- List<ShapeNodeEditPart> affixedExecutionSpecificationEditParts = LifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts((ShapeNodeEditPart) currentExecutionPart);
+ List<ShapeNodeEditPart> affixedExecutionSpecificationEditParts = OLDLifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts((ShapeNodeEditPart) currentExecutionPart);
for (ShapeNodeEditPart shapeNodeEditPart : affixedExecutionSpecificationEditParts) {
List<ExecutionSpecification> myCheckingList = new ArrayList<ExecutionSpecification>(toCheckExecutions);
myCheckingList.remove(shapeNodeEditPart);
@@ -768,33 +769,33 @@ public class OperandBoundsComputeHelper {
}
public static Command getForcedShiftEnclosedFragmentsCommand(InteractionOperandEditPart editPart, int movedY, Set<Object> alreadyMovedItems) {
- if(editPart == null || movedY == 0) {
+ if (editPart == null || movedY == 0) {
return null;
}
// Recursively process children
CompoundCommand cc = new CompoundCommand("shift inner CFs' exec blocks"); //$NON-NLS-1$
List<?> children = editPart.getChildren();
for (int i = 0; i < children.size(); i++) {
- if (false == children.get(i) instanceof CustomCombinedFragmentEditPart) {
+ if (false == children.get(i) instanceof OLDCustomCombinedFragmentEditPart) {
continue;
}
- CustomCombinedFragmentEditPart childCF = (CustomCombinedFragmentEditPart)children.get(i);
+ OLDCustomCombinedFragmentEditPart childCF = (OLDCustomCombinedFragmentEditPart) children.get(i);
List<CustomInteractionOperandEditPart> childOperands = childCF.getOperandChildrenEditParts();
for (CustomInteractionOperandEditPart childOperand : childOperands) {
cc.add(getForcedShiftEnclosedFragmentsCommand(childOperand, movedY, alreadyMovedItems));
}
}
-
+
List<OperandBlock> operandBlocks = getOperandBlocks(editPart);
- if(operandBlocks.isEmpty()) {
+ if (operandBlocks.isEmpty()) {
return null;
}
final Map<OperandBlock, Integer> blockToMove = new HashMap<OperandBoundsComputeHelper.OperandBlock, Integer>();
- for(OperandBlock blk : operandBlocks) {
+ for (OperandBlock blk : operandBlocks) {
blockToMove.put(blk, movedY);
}
- if(blockToMove.isEmpty()) {
+ if (blockToMove.isEmpty()) {
return null;
}
cc.add(new ICommandProxy(new MoveOperandBlockCommand(editPart.getEditingDomain(), blockToMove, alreadyMovedItems)));
@@ -1233,12 +1234,12 @@ public class OperandBoundsComputeHelper {
// 1. parent bar
List<ShapeNodeEditPart> childShapeNodeEditPart = LifelineEditPartUtil.getChildShapeNodeEditPart(parent);
childShapeNodeEditPart.remove(child);
- ShapeNodeEditPart parentNode = LifelineXYLayoutEditPolicy.getParent(parent, child.getFigure().getBounds().getCopy(), childShapeNodeEditPart);
+ ShapeNodeEditPart parentNode = OLDLifelineXYLayoutEditPolicy.getParent(parent, child.getFigure().getBounds().getCopy(), childShapeNodeEditPart);
if (parentNode != null) {
fillWith(parentNode, executions);
}
// 2. children
- List<ShapeNodeEditPart> affixedEditParts = LifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts(child);
+ List<ShapeNodeEditPart> affixedEditParts = OLDLifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts(child);
for (ShapeNodeEditPart affixedChild : affixedEditParts) {
if (executions.contains(affixedChild.resolveSemanticElement())) {
fillWith(affixedChild, executions);
@@ -1512,7 +1513,7 @@ public class OperandBoundsComputeHelper {
*/
public MoveOperandBlockCommand(TransactionalEditingDomain domain, Map<OperandBlock, Integer> blockToMove, Set<Object> alreadyMovedItems) {
this(domain, blockToMove);
- this.alreadyMovedItems = alreadyMovedItems;
+ this.alreadyMovedItems = alreadyMovedItems;
}
/**
@@ -1574,10 +1575,9 @@ public class OperandBoundsComputeHelper {
if (alreadyMovedItems != null) {
if (alreadyMovedItems.contains(child)) {
continue;
- }
- else {
+ } else {
alreadyMovedItems.add(child);
- }
+ }
}
Bounds bounds = getInteractionOperandEPBounds(child);
Rectangle newBounds = fillRectangle(bounds);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SelectMessagesEditPartTracker.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SelectMessagesEditPartTracker.java
new file mode 100644
index 00000000000..e4db14164ad
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SelectMessagesEditPartTracker.java
@@ -0,0 +1,234 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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.sequence.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.selection.SelectSeveralLinksEditPartTracker;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractMessageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.GrillingManagementEditPolicy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author PT202707
+ * @since 3.0
+ *
+ */
+public class SelectMessagesEditPartTracker extends SelectSeveralLinksEditPartTracker {
+ protected Listener KeyDownListener = new Listener() {
+
+ @Override
+ public void handleEvent(Event event) {
+ // in case the SHIFT key is released, the creation mode goes back to normal
+ if (event.keyCode == SWT.ALT) {
+ allowReoder = true;
+ if(grill!=null){
+ grill.setRespectMargin(false);
+ }
+ }
+ }
+
+ };
+ protected Listener KeyUPListener = new Listener() {
+
+ @Override
+ public void handleEvent(Event event) {
+ // in case the SHIFT key is released, the creation mode goes back to normal
+ if (event.keyCode == SWT.ALT) {
+ allowReoder = false;
+ if(grill!=null){
+ grill.setRespectMargin(true);
+ }
+ }
+ }
+
+ };
+ protected int MinDistancetop= Integer.MAX_VALUE;
+ protected int MinDistancebottom=Integer.MAX_VALUE;
+ protected Dimension delta= null;
+ /**
+ * @see org.eclipse.gef.tools.AbstractTool#activate()
+ *
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ DiagramEditPart diagramEditPart=getDiagramEditPart(getSourceEditPart());
+ if( diagramEditPart!=null){
+ grill = (GrillingManagementEditPolicy)diagramEditPart.getEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT);
+ }
+ }
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.selection.SelectSeveralLinksEditPartTracker#handleButtonDown(int)
+ *
+ * @param button
+ * @return
+ */
+ @Override
+ protected boolean handleButtonDown(int button) {
+ Dimension delta= null;
+ MinDistancetop= Integer.MAX_VALUE;
+ MinDistancebottom=Integer.MAX_VALUE;
+ //1. look for all Nodes connected by connections
+ //and find the MinDistancetop (maximum mouvment without reorder to the top) and the MinDistancebottom (maximum distance without reorder to the bottom)
+
+
+ ArrayList<GraphicalEditPart> nodeEditPart= new ArrayList<GraphicalEditPart>();
+
+ List selectedEditparts = getOperationSet();
+
+ for (int i=0; i<selectedEditparts.size();i++){
+ Object currentEditPart = selectedEditparts.get(i);
+ if(currentEditPart instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart ){
+ org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart currentConnectionEdiPart=(org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) currentEditPart;
+ nodeEditPart.add((GraphicalEditPart)currentConnectionEdiPart.getSource());
+
+ }
+
+ }
+ //2. take all messages between this nodes
+ ArrayList<AbstractMessageEditPart> messageEditPartList = new ArrayList<AbstractMessageEditPart>();
+ for (GraphicalEditPart anodeEditPart : nodeEditPart) {
+ for (Object connection:anodeEditPart.getSourceConnections()){
+
+ if(connection instanceof AbstractMessageEditPart){
+ if(!(selectedEditparts.contains(connection))){
+ messageEditPartList.add((AbstractMessageEditPart)connection);
+ }
+ }
+ }
+ for (Object connection:anodeEditPart.getTargetConnections()){
+ if(!(selectedEditparts.contains(connection))){
+ if(connection instanceof AbstractMessageEditPart){
+ messageEditPartList.add((AbstractMessageEditPart)connection);
+ }
+ }
+ }
+ }
+
+ //3 calculate minimum distance
+ for (AbstractMessageEditPart abstractMessageEditPart : messageEditPartList) {
+ Point currentConnectionPosition = abstractMessageEditPart.getConnectionFigure().getPoints().getFirstPoint().getCopy();
+ for (Object selectedEditPart : selectedEditparts) {
+ if( selectedEditPart instanceof AbstractMessageEditPart){
+ AbstractMessageEditPart currentSelectedMessage=(AbstractMessageEditPart)selectedEditPart;
+ Point currentSelectedConnectionPosition = currentSelectedMessage.getConnectionFigure().getPoints().getFirstPoint().getCopy();
+
+ // selected Message is below the currentConnection
+ if( currentConnectionPosition.y<currentSelectedConnectionPosition.y){
+ if(MinDistancetop> (currentSelectedConnectionPosition.y-currentConnectionPosition.y)){
+ MinDistancetop=(currentSelectedConnectionPosition.y-currentConnectionPosition.y);
+ }
+ }
+ else{
+ // selected Message is above the currentConnection
+ if(MinDistancebottom> (currentConnectionPosition.y-currentSelectedConnectionPosition.y)){
+ MinDistancebottom=(currentConnectionPosition.y-currentSelectedConnectionPosition.y);
+ }
+ }
+ }
+
+ }
+ }
+
+ return super.handleButtonDown(button);
+ }
+ /**
+ * Constructor.
+ *
+ * @param owner
+ */
+ public SelectMessagesEditPartTracker(ConnectionEditPart owner) {
+ super(owner);
+ PlatformUI.getWorkbench().getDisplay().addFilter(SWT.KeyDown, KeyDownListener);
+ PlatformUI.getWorkbench().getDisplay().addFilter(SWT.KeyUp, KeyUPListener);
+ }
+ private boolean allowReoder=false;
+ protected GrillingManagementEditPolicy grill;
+
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.gef.Tool#deactivate()
+ */
+ public void deactivate() {
+ PlatformUI.getWorkbench().getDisplay().removeFilter(SWT.KeyUp, KeyDownListener);
+ PlatformUI.getWorkbench().getDisplay().removeFilter(SWT.KeyUp, KeyUPListener);
+ super.deactivate();
+ }
+ /**
+ * @see org.eclipse.gef.tools.SimpleDragTracker#updateSourceRequest()
+ */
+ protected void updateSourceRequest() {
+ if(!allowReoder){
+ Dimension computedDelta = getLocation().getDifference(getStartLocation());
+ delta=null;
+ if( computedDelta.height<0){
+ System.out.println("Move "+computedDelta.height+" MinDistancetop"+MinDistancetop);
+ if( MinDistancetop+computedDelta.height<0){
+ computedDelta.height=-MinDistancetop;
+ delta=computedDelta.getCopy();
+ }
+ }
+ else{
+ System.out.println("Move "+computedDelta.height+" MinDistancebottom"+MinDistancebottom);
+ if( MinDistancebottom-computedDelta.height-10<0){
+ computedDelta.height=MinDistancebottom-10;
+ delta=computedDelta.getCopy();
+ }
+
+ }
+
+ }
+ super.updateSourceRequest();
+ }
+
+ protected Dimension getDragMoveDelta() {
+ if( delta==null){
+ return getLocation().getDifference(getStartLocation());}
+ else{
+ return delta;
+ }
+ }
+ /**
+ * Walks up the editpart hierarchy to find and return the
+ * <code>TopGraphicEditPart</code> instance.
+ */
+ public DiagramEditPart getDiagramEditPart(EditPart editPart) {
+ while (editPart instanceof IGraphicalEditPart) {
+ if (editPart instanceof DiagramEditPart){
+ return (DiagramEditPart) editPart;
+ }
+
+ editPart = editPart.getParent();
+ }
+ if(editPart instanceof DiagramRootEditPart){
+ return (DiagramEditPart)((DiagramRootEditPart)editPart).getChildren().get(0);
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceDeleteHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceDeleteHelper.java
index 153d89f03f6..f7d498f4824 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceDeleteHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceDeleteHelper.java
@@ -48,11 +48,11 @@ import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.sequence.RestoreExecutionEndAdvice;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ObservationLinkEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDLifelineXYLayoutEditPolicy;
import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.ExecutionSpecification;
@@ -103,7 +103,7 @@ public class SequenceDeleteHelper {
DestroyElementRequest myReq = new DestroyElementRequest(editingDomain, dos.getMessage(), false);
deleteViewsCmd.add(new ICommandProxy(new DestroyElementCommand(myReq)));
}
- deleteViewsCmd.add(((CustomLifelineEditPart)lifelinePart).getAlignLifelineBottomToParentCommand(null, true));
+ deleteViewsCmd.add(((OLDLifelineEditPart)lifelinePart).getAlignLifelineBottomToParentCommand(null, true));
}
}
}
@@ -337,7 +337,7 @@ public class SequenceDeleteHelper {
}
static void addDestroyExecutionSpecificationChildrenCommand(CompoundCommand deleteElementsCommand, TransactionalEditingDomain editingDomain, ShapeNodeEditPart part) {
- List<ShapeNodeEditPart> list = LifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts(part);
+ List<ShapeNodeEditPart> list = OLDLifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts(part);
for (ShapeNodeEditPart p : list) {
Request request = new EditCommandRequestWrapper(new DestroyElementRequest(p.resolveSemanticElement(), false));
deleteElementsCommand.add(p.getCommand(request));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceRequestConstant.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceRequestConstant.java
index a2419e0e645..a52774213e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceRequestConstant.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceRequestConstant.java
@@ -31,9 +31,6 @@ public interface SequenceRequestConstant {
/** A key used in the creation of a CORegion to identify the lifeline graphically containing the CoRegion */
public static final String LIFELINE_GRAPHICAL_CONTAINER = "Lifeline graphical container"; //$NON-NLS-1$
- /** The occurrence specification(s) which are the nearest from a creation request */
- public static final String NEAREST_OCCURRENCE_SPECIFICATION = "Nearest occurrence specification"; //$NON-NLS-1$
-
/** The location of the occurrence specification which is the nearest from a creation request */
public static final String OCCURRENCE_SPECIFICATION_LOCATION = "Nearest occurrence specification location"; //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java
index 5cbfe7e4354..324e63d4284 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java
@@ -70,7 +70,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.InteractionFragmentHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
@@ -308,7 +308,7 @@ public class SequenceUtil {
}
}
// check in children executions
- if (child instanceof ActionExecutionSpecificationEditPart || child instanceof BehaviorExecutionSpecificationEditPart) {
+ if (child instanceof CCombinedCompartmentEditPart || child instanceof BehaviorExecutionSpecificationEditPart) {
if (fragment instanceof ExecutionSpecification) {
// check the execution
EObject element = ((GraphicalEditPart) child).resolveSemanticElement();
@@ -553,10 +553,10 @@ public class SequenceUtil {
// child to the node
List<?> children = nodeEditPart.getChildren();
for (Object child : children) {
- if (child instanceof ActionExecutionSpecificationEditPart) {
- EObject element = ((ActionExecutionSpecificationEditPart) child).resolveSemanticElement();
+ if (child instanceof CCombinedCompartmentEditPart) {
+ EObject element = ((CCombinedCompartmentEditPart) child).resolveSemanticElement();
if (element != null && element instanceof ExecutionSpecification) {
- IFigure figure = ((ActionExecutionSpecificationEditPart) child).getFigure();
+ IFigure figure = ((CCombinedCompartmentEditPart) child).getFigure();
Rectangle copy = figure.getBounds().getCopy();
figure.translateToAbsolute(copy);
if (event.equals(((ExecutionSpecification) element).getStart())) {
@@ -631,7 +631,7 @@ public class SequenceUtil {
List<?> children = lifelineEditPart.getChildren();
for (Object child : children) {
// children executions
- if (child instanceof ActionExecutionSpecificationEditPart || child instanceof BehaviorExecutionSpecificationEditPart) {
+ if (child instanceof CCombinedCompartmentEditPart || child instanceof BehaviorExecutionSpecificationEditPart) {
EObject element = ((GraphicalEditPart) child).resolveSemanticElement();
if (element instanceof ExecutionSpecification) {
// find start and finish events of the execution
@@ -1375,7 +1375,7 @@ public class SequenceUtil {
int maxDeltaWithMiddle = 0;
for (Object child : children) {
// children executions
- if (child instanceof ActionExecutionSpecificationEditPart || child instanceof BehaviorExecutionSpecificationEditPart || child instanceof CombinedFragment2EditPart) {
+ if (child instanceof CCombinedCompartmentEditPart || child instanceof BehaviorExecutionSpecificationEditPart || child instanceof CombinedFragment2EditPart) {
GraphicalEditPart childPart = (GraphicalEditPart) child;
Rectangle absoluteBounds = getAbsoluteBounds(childPart);
// enlarge absolute bounds to contain also the right and bottom edges.
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.di b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.di
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.notation b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.notation
new file mode 100644
index 00000000000..3da20d5752f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.notation
@@ -0,0 +1,382 @@
+<?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:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_KJbEcLMlEeaW-7aLJkImGQ" type="CompositeStructure" name="CompositeDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_LEaGALMlEeaW-7aLJkImGQ" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_LEbUILMlEeaW-7aLJkImGQ" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_LEbUIbMlEeaW-7aLJkImGQ" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_LEbUIrMlEeaW-7aLJkImGQ" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LEb7MLMlEeaW-7aLJkImGQ" type="Class_StructureCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_MaHUsLMlEeaW-7aLJkImGQ" type="Property_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MaHUsrMlEeaW-7aLJkImGQ" type="Property_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MaH7wLMlEeaW-7aLJkImGQ" type="Property_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_MaH7wbMlEeaW-7aLJkImGQ" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MaH7wrMlEeaW-7aLJkImGQ" type="Property_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MaH7w7MlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MaH7xLMlEeaW-7aLJkImGQ"/>
+ </children>
+ <element xmi:type="uml:Property" href="model.uml#_MZ-x0LMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MaHUsbMlEeaW-7aLJkImGQ" x="171" y="97"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_MwDIcLMlEeaW-7aLJkImGQ" type="Property_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MwDvgLMlEeaW-7aLJkImGQ" type="Property_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MwDvgbMlEeaW-7aLJkImGQ" type="Property_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_MwDvgrMlEeaW-7aLJkImGQ" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MwDvg7MlEeaW-7aLJkImGQ" type="Property_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MwDvhLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MwDvhbMlEeaW-7aLJkImGQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MwLrULMlEeaW-7aLJkImGQ" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MwLrUbMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MwLrUrMlEeaW-7aLJkImGQ"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_QvARULMlEeaW-7aLJkImGQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_QvA4YLMlEeaW-7aLJkImGQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QvA4YbMlEeaW-7aLJkImGQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_QvA4YrMlEeaW-7aLJkImGQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QvBfcLMlEeaW-7aLJkImGQ" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="model.uml#_Qu7_4LMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QvARUbMlEeaW-7aLJkImGQ" x="25" y="35" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_RI1toLMlEeaW-7aLJkImGQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_RI2UsLMlEeaW-7aLJkImGQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_RI2UsbMlEeaW-7aLJkImGQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_RI2UsrMlEeaW-7aLJkImGQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_RI27wLMlEeaW-7aLJkImGQ" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="model.uml#_RIzRYLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RI1tobMlEeaW-7aLJkImGQ" x="115" y="24" width="20" height="20"/>
+ </children>
+ <element xmi:type="uml:Property" href="model.uml#_Mv8awLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MwDIcbMlEeaW-7aLJkImGQ" x="481" y="89"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LEb7MbMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LEb7MrMlEeaW-7aLJkImGQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_LET_YLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LEaGAbMlEeaW-7aLJkImGQ" x="226" y="74" width="739" height="457"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_KJbEcbMlEeaW-7aLJkImGQ" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_KJbEcrMlEeaW-7aLJkImGQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_KJbEc7MlEeaW-7aLJkImGQ">
+ <owner xmi:type="uml:Model" href="model.uml#_YvSxoKsiEear0ZssjsCjIQ"/>
+ </styles>
+ <element xmi:type="uml:Model" href="model.uml#_YvSxoKsiEear0ZssjsCjIQ"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_TXgkoLMlEeaW-7aLJkImGQ" type="PapyrusUMLSequenceDiagram" name="SeqDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_TXgkobMlEeaW-7aLJkImGQ" type="Interaction_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_TXgkorMlEeaW-7aLJkImGQ" type="Interaction_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_TXgko7MlEeaW-7aLJkImGQ" type="Interaction_SubfragmentCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_UgbUgLMlEeaW-7aLJkImGQ" type="Lifeline_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Ugb7kLMlEeaW-7aLJkImGQ" type="Lifeline_NameLabel"/>
+ <element xmi:type="uml:Lifeline" href="model.uml#_UgXqILMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UgbUgbMlEeaW-7aLJkImGQ" x="71" y="10" width="100" height="700"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_U_WsMLMlEeaW-7aLJkImGQ" type="Lifeline_Shape">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_YRcIALMlEeaW-7aLJkImGQ" source="CustomExtensionInfo">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_YRcvELMlEeaW-7aLJkImGQ" key="manual.label.size" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_U_XTQLMlEeaW-7aLJkImGQ" type="Lifeline_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_U_bksLMlEeaW-7aLJkImGQ" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_U_bksbMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_U_bksrMlEeaW-7aLJkImGQ"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_XrzrYLMlEeaW-7aLJkImGQ" type="Lifeline_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_XrzrYrMlEeaW-7aLJkImGQ" type="Lifeline_NameLabel"/>
+ <element xmi:type="uml:Lifeline" href="model.uml#_XrsWoLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_XrzrYbMlEeaW-7aLJkImGQ" x="69" width="100"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ZfWFkLMlEeaW-7aLJkImGQ" type="Lifeline_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZfWsoLMlEeaW-7aLJkImGQ" type="Lifeline_NameLabel"/>
+ <element xmi:type="uml:Lifeline" href="model.uml#_ZfQmALMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZfWFkbMlEeaW-7aLJkImGQ" x="223" width="100"/>
+ </children>
+ <element xmi:type="uml:Lifeline" href="model.uml#_U_SawLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_U_WsMbMlEeaW-7aLJkImGQ" x="321" y="10" width="382" height="700"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TXgkpLMlEeaW-7aLJkImGQ"/>
+ </children>
+ <element xmi:type="uml:Interaction" href="model.uml#_TKcZALMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TXgkpbMlEeaW-7aLJkImGQ"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_TXgkprMlEeaW-7aLJkImGQ" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_TXgkp7MlEeaW-7aLJkImGQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_TXgkqLMlEeaW-7aLJkImGQ">
+ <owner xmi:type="uml:Model" href="model.uml#_YvSxoKsiEear0ZssjsCjIQ"/>
+ </styles>
+ <element xmi:type="uml:Interaction" href="model.uml#_TKcZALMlEeaW-7aLJkImGQ"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_KrNJUA4eEeenXPW6oXN_fg" type="PapyrusUMLTimingDiagram" name="TimingDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_LaROwA4eEeenXPW6oXN_fg" type="Interaction_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_LaaYsA4eEeenXPW6oXN_fg" type="Interaction_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LaaYsQ4eEeenXPW6oXN_fg" type="Interaction_SubfragmentCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_MfvpEA4eEeenXPW6oXN_fg" type="Lifeline_FullShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MfvpEg4eEeenXPW6oXN_fg" type="Lifeline_FullNameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MfvpEw4eEeenXPW6oXN_fg" type="Lifeline_FullStateDefinitionCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_PzvwcA4eEeenXPW6oXN_fg" type="Node_StateDefinitionShape">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_P0WNYQ4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.StateDefinitionView">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_P0WNYg4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateDefinitionViewID" value="_P0WNYA4eEeenXPW6oXN_fg"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_P0WNZQ4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateDefinitionViewName" value="State 1"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Pzvwcg4eEeenXPW6oXN_fg" type="Node_StateDefinitionNameLabel">
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_Pzvwcw4eEeenXPW6oXN_fg"/>
+ </children>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PzvwcQ4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Y_UIIA4eEeenXPW6oXN_fg" type="Node_StateDefinitionShape">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Y_nqIQ4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.StateDefinitionView">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Y_nqIg4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateDefinitionViewID" value="_Y_nqIA4eEeenXPW6oXN_fg"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Y_nqJA4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateDefinitionViewName" value="trtee"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Y_UIIg4eEeenXPW6oXN_fg" type="Node_StateDefinitionNameLabel">
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_Y_UIIw4eEeenXPW6oXN_fg"/>
+ </children>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y_UIIQ4eEeenXPW6oXN_fg"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MfvpFA4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MfvpFQ4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MfvpFg4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MfvpFw4eEeenXPW6oXN_fg" type="Lifeline_FullSubfragmentCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_P0WNaw4eEeenXPW6oXN_fg" type="StateInvariant_FullShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_P0WNbQ4eEeenXPW6oXN_fg" type="StateInvariant_FullStereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_P0WNbg4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <element xmi:type="uml:StateInvariant" href="model.uml#_P0WNZg4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_P0WNbA4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_SmVz4A4eEeenXPW6oXN_fg" type="OccurrenceSpecification_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_SmVz5A4eEeenXPW6oXN_fg" type="OccurrenceSpecification_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_SmVz5Q4eEeenXPW6oXN_fg" y="18"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_SmVz5g4eEeenXPW6oXN_fg" type="OccurrenceSpecification_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_SmVz5w4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_SmVz4Q4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_SmVz4g4eEeenXPW6oXN_fg"/>
+ <element xmi:type="uml:OccurrenceSpecification" href="model.uml#_SmMp8A4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_SmVz6A4eEeenXPW6oXN_fg" x="82" y="93"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_SmVz6Q4eEeenXPW6oXN_fg" type="Node_StateInvariantTransitionShape">
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SmVz6g4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_SmVz8A4eEeenXPW6oXN_fg" type="StateInvariant_FullShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_SmVz8g4eEeenXPW6oXN_fg" type="StateInvariant_FullStereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_SmVz8w4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <element xmi:type="uml:StateInvariant" href="model.uml#_SmVz6w4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SmVz8Q4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_TGVikg4eEeenXPW6oXN_fg" type="OccurrenceSpecification_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_TGVilg4eEeenXPW6oXN_fg" type="OccurrenceSpecification_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TGVilw4eEeenXPW6oXN_fg" y="18"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_TGVimA4eEeenXPW6oXN_fg" type="OccurrenceSpecification_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TGVimQ4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_TGVikw4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_TGVilA4eEeenXPW6oXN_fg"/>
+ <element xmi:type="uml:OccurrenceSpecification" href="model.uml#_TGVikA4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_YONbUA4eEeenXPW6oXN_fg" x="154" y="94"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_TGVimw4eEeenXPW6oXN_fg" type="Node_StateInvariantTransitionShape">
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TGVinA4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_TGfTlQ4eEeenXPW6oXN_fg" type="StateInvariant_FullShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_TGfTlw4eEeenXPW6oXN_fg" type="StateInvariant_FullStereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TGfTmA4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <element xmi:type="uml:StateInvariant" href="model.uml#_TGfTkA4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TGfTlg4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_TinO4g4eEeenXPW6oXN_fg" type="OccurrenceSpecification_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_TinO5g4eEeenXPW6oXN_fg" type="OccurrenceSpecification_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TinO5w4eEeenXPW6oXN_fg" y="18"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_TinO6A4eEeenXPW6oXN_fg" type="OccurrenceSpecification_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TinO6Q4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_TinO4w4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_TinO5A4eEeenXPW6oXN_fg"/>
+ <element xmi:type="uml:OccurrenceSpecification" href="model.uml#_TinO4A4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TinO6g4eEeenXPW6oXN_fg" x="413" y="94"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_TinO6w4eEeenXPW6oXN_fg" type="Node_StateInvariantTransitionShape">
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TinO7A4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_TinO8g4eEeenXPW6oXN_fg" type="StateInvariant_FullShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_TinO9A4eEeenXPW6oXN_fg" type="StateInvariant_FullStereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TinO9Q4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <element xmi:type="uml:StateInvariant" href="model.uml#_TinO7Q4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TinO8w4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_gRlb4g4eEeenXPW6oXN_fg" type="OccurrenceSpecification_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_gRlb5g4eEeenXPW6oXN_fg" type="OccurrenceSpecification_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_gRlb5w4eEeenXPW6oXN_fg" y="18"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_gRlb6A4eEeenXPW6oXN_fg" type="OccurrenceSpecification_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_gRlb6Q4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_gRlb4w4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_gRlb5A4eEeenXPW6oXN_fg"/>
+ <element xmi:type="uml:OccurrenceSpecification" href="model.uml#_gRlb4A4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_gRlb6g4eEeenXPW6oXN_fg" x="497" y="167"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_gRlb6w4eEeenXPW6oXN_fg" type="Node_StateInvariantTransitionShape">
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gRlb7A4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_gRvM4Q4eEeenXPW6oXN_fg" type="StateInvariant_FullShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_gRvM4w4eEeenXPW6oXN_fg" type="StateInvariant_FullStereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_gRvM5A4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <element xmi:type="uml:StateInvariant" href="model.uml#_gRlb7Q4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gRvM4g4eEeenXPW6oXN_fg"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MfvpGA4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MfvpGQ4eEeenXPW6oXN_fg" visible="false" type="Lifeline_FullTimeRulerCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_MgfP8A4eEeenXPW6oXN_fg" type="Node_FreeTimeRulerShape">
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MgfP8g4eEeenXPW6oXN_fg" type="Node_FreeTimeRulerCompartment">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MgfP8w4eEeenXPW6oXN_fg"/>
+ </children>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MgfP8Q4eEeenXPW6oXN_fg"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MfvpGg4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MfvpGw4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MfvpHA4eEeenXPW6oXN_fg"/>
+ </children>
+ <element xmi:type="uml:Lifeline" href="model.uml#_MfJMIA4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MfvpEQ4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_NU2FEA4eEeenXPW6oXN_fg" type="Lifeline_FullShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_NU2FEg4eEeenXPW6oXN_fg" type="Lifeline_FullNameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_NU2FEw4eEeenXPW6oXN_fg" type="Lifeline_FullStateDefinitionCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_QY99YA4eEeenXPW6oXN_fg" type="Node_StateDefinitionShape">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QZapUQ4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.StateDefinitionView">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QZapUg4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateDefinitionViewID" value="_QZapUA4eEeenXPW6oXN_fg"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QZapVQ4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateDefinitionViewName" value="State 1"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_QY99Yg4eEeenXPW6oXN_fg" type="Node_StateDefinitionNameLabel">
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_QY99Yw4eEeenXPW6oXN_fg"/>
+ </children>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QY99YQ4eEeenXPW6oXN_fg"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_NU2FFA4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_NU2FFQ4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NU2FFg4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_NU2FFw4eEeenXPW6oXN_fg" type="Lifeline_FullSubfragmentCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_QZapWw4eEeenXPW6oXN_fg" type="StateInvariant_FullShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_QZapXQ4eEeenXPW6oXN_fg" type="StateInvariant_FullStereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QZapXg4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <element xmi:type="uml:StateInvariant" href="model.uml#_QZapVg4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QZapXA4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_itZXAg4eEeenXPW6oXN_fg" type="OccurrenceSpecification_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_itZXBg4eEeenXPW6oXN_fg" type="OccurrenceSpecification_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_itZXBw4eEeenXPW6oXN_fg" y="18"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_itZXCA4eEeenXPW6oXN_fg" type="OccurrenceSpecification_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_itZXCQ4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_itZXAw4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_itZXBA4eEeenXPW6oXN_fg"/>
+ <element xmi:type="uml:OccurrenceSpecification" href="model.uml#_itZXAA4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lRPz0A4eEeenXPW6oXN_fg" x="28" y="60"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_itig8A4eEeenXPW6oXN_fg" type="Node_StateInvariantTransitionShape">
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_itig8Q4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_itig9w4eEeenXPW6oXN_fg" type="StateInvariant_FullShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_itig-Q4eEeenXPW6oXN_fg" type="StateInvariant_FullStereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_itig-g4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <element xmi:type="uml:StateInvariant" href="model.uml#_itig8g4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_itig-A4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_lcQxAg4eEeenXPW6oXN_fg" type="OccurrenceSpecification_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_lcQxBg4eEeenXPW6oXN_fg" type="OccurrenceSpecification_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lcQxBw4eEeenXPW6oXN_fg" y="18"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lcQxCA4eEeenXPW6oXN_fg" type="OccurrenceSpecification_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lcQxCQ4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_lcQxAw4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_lcQxBA4eEeenXPW6oXN_fg"/>
+ <element xmi:type="uml:OccurrenceSpecification" href="model.uml#_lcQxAA4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lcQxCg4eEeenXPW6oXN_fg" x="247" y="62"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_lcQxCw4eEeenXPW6oXN_fg" type="Node_StateInvariantTransitionShape">
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lcQxDA4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_lcQxEg4eEeenXPW6oXN_fg" type="StateInvariant_FullShape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_lcQxFA4eEeenXPW6oXN_fg" type="StateInvariant_FullStereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_lcQxFQ4eEeenXPW6oXN_fg" y="15"/>
+ </children>
+ <element xmi:type="uml:StateInvariant" href="model.uml#_lcQxDQ4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lcQxEw4eEeenXPW6oXN_fg"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NU2FGA4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_NU2FGQ4eEeenXPW6oXN_fg" visible="false" type="Lifeline_FullTimeRulerCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_NVSxAA4eEeenXPW6oXN_fg" type="Node_FreeTimeRulerShape">
+ <children xmi:type="notation:BasicCompartment" xmi:id="_NVSxAg4eEeenXPW6oXN_fg" type="Node_FreeTimeRulerCompartment">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NVSxAw4eEeenXPW6oXN_fg"/>
+ </children>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NVSxAQ4eEeenXPW6oXN_fg"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_NU2FGg4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_NU2FGw4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NU2FHA4eEeenXPW6oXN_fg"/>
+ </children>
+ <element xmi:type="uml:Lifeline" href="model.uml#_NT9UQA4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NU2FEQ4eEeenXPW6oXN_fg"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LaaYsg4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LaaYsw4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LaaYtA4eEeenXPW6oXN_fg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LaaYtQ4eEeenXPW6oXN_fg" type="Interaction_TimeRulerCompartment">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_LcgDZA4eEeenXPW6oXN_fg" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_LcgDZQ4eEeenXPW6oXN_fg" key="visible" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_LcgDYA4eEeenXPW6oXN_fg" type="Node_FreeTimeRulerShape">
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LcgDYg4eEeenXPW6oXN_fg" type="Node_FreeTimeRulerCompartment">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcgDYw4eEeenXPW6oXN_fg"/>
+ </children>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LcgDYQ4eEeenXPW6oXN_fg"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_LaaYtg4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_LaaYtw4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LaaYuA4eEeenXPW6oXN_fg"/>
+ </children>
+ <element xmi:type="uml:Interaction" href="model.uml#_LZhn4A4eEeenXPW6oXN_fg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LaROwQ4eEeenXPW6oXN_fg" x="64" y="44" width="968" height="458"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_KrNJUQ4eEeenXPW6oXN_fg" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_KrNJUg4eEeenXPW6oXN_fg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_KrNJUw4eEeenXPW6oXN_fg">
+ <owner xmi:type="uml:Model" href="model.uml#_YvSxoKsiEear0ZssjsCjIQ"/>
+ </styles>
+ <element xmi:type="uml:Model" href="model.uml#_YvSxoKsiEear0ZssjsCjIQ"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.uml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.uml
new file mode 100644
index 00000000000..23859bfe497
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/model.uml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_YvSxoKsiEear0ZssjsCjIQ" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_LET_YLMlEeaW-7aLJkImGQ" name="Class1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_MZ-x0LMlEeaW-7aLJkImGQ" name="Attribute1" type="_Oc4dsLMlEeaW-7aLJkImGQ"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Mv8awLMlEeaW-7aLJkImGQ" name="Attribute2" type="_PQ8X4LMlEeaW-7aLJkImGQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Oc4dsLMlEeaW-7aLJkImGQ" name="Class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PQ8X4LMlEeaW-7aLJkImGQ" name="Class3">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_Qu7_4LMlEeaW-7aLJkImGQ" name="Port1" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_RIzRYLMlEeaW-7aLJkImGQ" name="Port2" aggregation="composite"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_TKcZALMlEeaW-7aLJkImGQ" name="Interaction1">
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_UgXqILMlEeaW-7aLJkImGQ" name="Lifeline" represents="_Qu7_4LMlEeaW-7aLJkImGQ"/>
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_U_SawLMlEeaW-7aLJkImGQ" name="Lifeline0" decomposedAs="_XrrvkLMlEeaW-7aLJkImGQ" represents="_Mv8awLMlEeaW-7aLJkImGQ"/>
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_XrsWoLMlEeaW-7aLJkImGQ" name="Lifeline1" represents="_RIzRYLMlEeaW-7aLJkImGQ" coveredBy="_XrrvkLMlEeaW-7aLJkImGQ"/>
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_ZfQmALMlEeaW-7aLJkImGQ" name="Lifeline2" represents="_Qu7_4LMlEeaW-7aLJkImGQ" coveredBy="_XrrvkLMlEeaW-7aLJkImGQ"/>
+ <fragment xmi:type="uml:PartDecomposition" xmi:id="_XrrvkLMlEeaW-7aLJkImGQ" name="PartDecomposition" covered="_XrsWoLMlEeaW-7aLJkImGQ _ZfQmALMlEeaW-7aLJkImGQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_LZhn4A4eEeenXPW6oXN_fg" name="Interaction2">
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_MfJMIA4eEeenXPW6oXN_fg" name="Lifeline1" coveredBy="_P0WNZg4eEeenXPW6oXN_fg _SmMp8A4eEeenXPW6oXN_fg _SmVz6w4eEeenXPW6oXN_fg _TGVikA4eEeenXPW6oXN_fg _TGfTkA4eEeenXPW6oXN_fg _TinO4A4eEeenXPW6oXN_fg _TinO7Q4eEeenXPW6oXN_fg _gRlb4A4eEeenXPW6oXN_fg _gRlb7Q4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_P0WNYw4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.LifelineStateDefinitions">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_P0WNZA4eEeenXPW6oXN_fg" key="_P0WNYA4eEeenXPW6oXN_fg" value="State 1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Y_nqIw4eEeenXPW6oXN_fg" key="_Y_nqIA4eEeenXPW6oXN_fg" value="trtee"/>
+ </eAnnotations>
+ </lifeline>
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_NT9UQA4eEeenXPW6oXN_fg" name="Lifeline2" coveredBy="_QZapVg4eEeenXPW6oXN_fg _itZXAA4eEeenXPW6oXN_fg _itig8g4eEeenXPW6oXN_fg _lcQxAA4eEeenXPW6oXN_fg _lcQxDQ4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QZapUw4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.LifelineStateDefinitions">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QZapVA4eEeenXPW6oXN_fg" key="_QZapUA4eEeenXPW6oXN_fg" value="State 1"/>
+ </eAnnotations>
+ </lifeline>
+ <fragment xmi:type="uml:StateInvariant" xmi:id="_P0WNZg4eEeenXPW6oXN_fg" name="State 1_1" covered="_MfJMIA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_P0WNaQ4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.StateInvariant">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_P0WNag4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateInvariantStateDefinitionId" value="_P0WNYA4eEeenXPW6oXN_fg"/>
+ </eAnnotations>
+ <invariant xmi:type="uml:Constraint" xmi:id="_P0WNZw4eEeenXPW6oXN_fg" name="InState_State 1">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_P0WNaA4eEeenXPW6oXN_fg">
+ <body>State 1</body>
+ </specification>
+ </invariant>
+ </fragment>
+ <fragment xmi:type="uml:OccurrenceSpecification" xmi:id="_SmMp8A4eEeenXPW6oXN_fg" name="State 1_1_To_trtee_1" covered="_MfJMIA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SmMp8Q4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.autogeneratedOccurrenceSpecificationName"/>
+ </fragment>
+ <fragment xmi:type="uml:StateInvariant" xmi:id="_SmVz6w4eEeenXPW6oXN_fg" name="trtee_1" covered="_MfJMIA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_SmVz7g4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.StateInvariant">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_SmVz7w4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateInvariantStateDefinitionId" value="_Y_nqIA4eEeenXPW6oXN_fg"/>
+ </eAnnotations>
+ <invariant xmi:type="uml:Constraint" xmi:id="_SmVz7A4eEeenXPW6oXN_fg" name="InState_trtee">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_SmVz7Q4eEeenXPW6oXN_fg">
+ <body>trtee</body>
+ </specification>
+ </invariant>
+ </fragment>
+ <fragment xmi:type="uml:OccurrenceSpecification" xmi:id="_TGVikA4eEeenXPW6oXN_fg" name="trtee_1_To_State 1_2" covered="_MfJMIA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_TGVikQ4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.autogeneratedOccurrenceSpecificationName"/>
+ </fragment>
+ <fragment xmi:type="uml:StateInvariant" xmi:id="_TGfTkA4eEeenXPW6oXN_fg" name="State 1_2" covered="_MfJMIA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_TGfTkw4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.StateInvariant">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_TGfTlA4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateInvariantStateDefinitionId" value="_P0WNYA4eEeenXPW6oXN_fg"/>
+ </eAnnotations>
+ <invariant xmi:type="uml:Constraint" xmi:id="_TGfTkQ4eEeenXPW6oXN_fg" name="InState_State 1">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_TGfTkg4eEeenXPW6oXN_fg">
+ <body>State 1</body>
+ </specification>
+ </invariant>
+ </fragment>
+ <fragment xmi:type="uml:OccurrenceSpecification" xmi:id="_TinO4A4eEeenXPW6oXN_fg" name="State 1_2_To_trtee_2" covered="_MfJMIA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_TinO4Q4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.autogeneratedOccurrenceSpecificationName"/>
+ </fragment>
+ <fragment xmi:type="uml:StateInvariant" xmi:id="_TinO7Q4eEeenXPW6oXN_fg" name="trtee_2" covered="_MfJMIA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_TinO8A4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.StateInvariant">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_TinO8Q4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateInvariantStateDefinitionId" value="_Y_nqIA4eEeenXPW6oXN_fg"/>
+ </eAnnotations>
+ <invariant xmi:type="uml:Constraint" xmi:id="_TinO7g4eEeenXPW6oXN_fg" name="InState_trtee">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_TinO7w4eEeenXPW6oXN_fg">
+ <body>trtee</body>
+ </specification>
+ </invariant>
+ </fragment>
+ <fragment xmi:type="uml:OccurrenceSpecification" xmi:id="_gRlb4A4eEeenXPW6oXN_fg" name="trtee_2_To_State 1_3" covered="_MfJMIA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_gRlb4Q4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.autogeneratedOccurrenceSpecificationName"/>
+ </fragment>
+ <fragment xmi:type="uml:StateInvariant" xmi:id="_gRlb7Q4eEeenXPW6oXN_fg" name="State 1_3" covered="_MfJMIA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_gRlb8A4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.StateInvariant">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gRvM4A4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateInvariantStateDefinitionId" value="_P0WNYA4eEeenXPW6oXN_fg"/>
+ </eAnnotations>
+ <invariant xmi:type="uml:Constraint" xmi:id="_gRlb7g4eEeenXPW6oXN_fg" name="InState_State 1">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_gRlb7w4eEeenXPW6oXN_fg">
+ <body>State 1</body>
+ </specification>
+ </invariant>
+ </fragment>
+ <fragment xmi:type="uml:StateInvariant" xmi:id="_QZapVg4eEeenXPW6oXN_fg" name="State 1_1" covered="_NT9UQA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_QZapWQ4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.StateInvariant">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QZapWg4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateInvariantStateDefinitionId" value="_QZapUA4eEeenXPW6oXN_fg"/>
+ </eAnnotations>
+ <invariant xmi:type="uml:Constraint" xmi:id="_QZapVw4eEeenXPW6oXN_fg" name="InState_State 1">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_QZapWA4eEeenXPW6oXN_fg">
+ <body>State 1</body>
+ </specification>
+ </invariant>
+ </fragment>
+ <fragment xmi:type="uml:OccurrenceSpecification" xmi:id="_itZXAA4eEeenXPW6oXN_fg" name="State 1_1_To_State 1_2" covered="_NT9UQA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_itZXAQ4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.autogeneratedOccurrenceSpecificationName"/>
+ </fragment>
+ <fragment xmi:type="uml:StateInvariant" xmi:id="_itig8g4eEeenXPW6oXN_fg" name="State 1_2" covered="_NT9UQA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_itig9Q4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.StateInvariant">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_itig9g4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateInvariantStateDefinitionId" value="_QZapUA4eEeenXPW6oXN_fg"/>
+ </eAnnotations>
+ <invariant xmi:type="uml:Constraint" xmi:id="_itig8w4eEeenXPW6oXN_fg" name="InState_State 1">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_itig9A4eEeenXPW6oXN_fg">
+ <body>State 1</body>
+ </specification>
+ </invariant>
+ </fragment>
+ <fragment xmi:type="uml:OccurrenceSpecification" xmi:id="_lcQxAA4eEeenXPW6oXN_fg" name="State 1_2_To_State 1_3" covered="_NT9UQA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_lcQxAQ4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.autogeneratedOccurrenceSpecificationName"/>
+ </fragment>
+ <fragment xmi:type="uml:StateInvariant" xmi:id="_lcQxDQ4eEeenXPW6oXN_fg" name="State 1_3" covered="_NT9UQA4eEeenXPW6oXN_fg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_lcQxEA4eEeenXPW6oXN_fg" source="org.eclipse.papyrus.uml.diagram.timing.StateInvariant">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_lcQxEQ4eEeenXPW6oXN_fg" key="org.eclipse.papyrus.uml.diagram.timing.StateInvariantStateDefinitionId" value="_QZapUA4eEeenXPW6oXN_fg"/>
+ </eAnnotations>
+ <invariant xmi:type="uml:Constraint" xmi:id="_lcQxDg4eEeenXPW6oXN_fg" name="InState_State 1">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_lcQxDw4eEeenXPW6oXN_fg">
+ <body>State 1</body>
+ </specification>
+ </invariant>
+ </fragment>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.di b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.di
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.notation b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.notation
new file mode 100644
index 00000000000..72327c76712
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.notation
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_KJbEcLMlEeaW-7aLJkImGQ" type="CompositeStructure" name="CompositeDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_LEaGALMlEeaW-7aLJkImGQ" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_LEbUILMlEeaW-7aLJkImGQ" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_LEbUIbMlEeaW-7aLJkImGQ" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_LEbUIrMlEeaW-7aLJkImGQ" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_LEb7MLMlEeaW-7aLJkImGQ" type="Class_StructureCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_MaHUsLMlEeaW-7aLJkImGQ" type="Property_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MaHUsrMlEeaW-7aLJkImGQ" type="Property_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MaH7wLMlEeaW-7aLJkImGQ" type="Property_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_MaH7wbMlEeaW-7aLJkImGQ" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MaH7wrMlEeaW-7aLJkImGQ" type="Property_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MaH7w7MlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MaH7xLMlEeaW-7aLJkImGQ"/>
+ </children>
+ <element xmi:type="uml:Property" href="modelPORTS.uml#_MZ-x0LMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MaHUsbMlEeaW-7aLJkImGQ" x="118" y="95"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_MwDIcLMlEeaW-7aLJkImGQ" type="Property_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MwDvgLMlEeaW-7aLJkImGQ" type="Property_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MwDvgbMlEeaW-7aLJkImGQ" type="Property_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_MwDvgrMlEeaW-7aLJkImGQ" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MwDvg7MlEeaW-7aLJkImGQ" type="Property_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MwDvhLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MwDvhbMlEeaW-7aLJkImGQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MwLrULMlEeaW-7aLJkImGQ" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MwLrUbMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MwLrUrMlEeaW-7aLJkImGQ"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_QvARULMlEeaW-7aLJkImGQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_QvA4YLMlEeaW-7aLJkImGQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QvA4YbMlEeaW-7aLJkImGQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_QvA4YrMlEeaW-7aLJkImGQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_QvBfcLMlEeaW-7aLJkImGQ" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="modelPORTS.uml#_Qu7_4LMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QvARUbMlEeaW-7aLJkImGQ" x="25" y="35" width="20" height="20"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_RI1toLMlEeaW-7aLJkImGQ" type="Port_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_RI2UsLMlEeaW-7aLJkImGQ" type="Port_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_RI2UsbMlEeaW-7aLJkImGQ" x="25" y="3"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_RI2UsrMlEeaW-7aLJkImGQ" type="Port_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_RI27wLMlEeaW-7aLJkImGQ" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="modelPORTS.uml#_RIzRYLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RI1tobMlEeaW-7aLJkImGQ" x="115" y="24" width="20" height="20"/>
+ </children>
+ <element xmi:type="uml:Property" href="modelPORTS.uml#_Mv8awLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MwDIcbMlEeaW-7aLJkImGQ" x="481" y="89"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_LEb7MbMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LEb7MrMlEeaW-7aLJkImGQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="modelPORTS.uml#_LET_YLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LEaGAbMlEeaW-7aLJkImGQ" x="226" y="74" width="739" height="457"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_KJbEcbMlEeaW-7aLJkImGQ" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_KJbEcrMlEeaW-7aLJkImGQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_KJbEc7MlEeaW-7aLJkImGQ">
+ <owner xmi:type="uml:Model" href="modelPORTS.uml#_YvSxoKsiEear0ZssjsCjIQ"/>
+ </styles>
+ <element xmi:type="uml:Model" href="modelPORTS.uml#_YvSxoKsiEear0ZssjsCjIQ"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_TXgkoLMlEeaW-7aLJkImGQ" type="PapyrusUMLSequenceDiagram" name="SeqDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_TXgkobMlEeaW-7aLJkImGQ" type="Interaction_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_TXgkorMlEeaW-7aLJkImGQ" type="Interaction_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_TXgko7MlEeaW-7aLJkImGQ" type="Interaction_SubfragmentCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_UgbUgLMlEeaW-7aLJkImGQ" type="Lifeline_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Ugb7kLMlEeaW-7aLJkImGQ" type="Lifeline_NameLabel"/>
+ <element xmi:type="uml:Lifeline" href="modelPORTS.uml#_UgXqILMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UgbUgbMlEeaW-7aLJkImGQ" x="71" y="10" width="100" height="700"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_U_WsMLMlEeaW-7aLJkImGQ" type="Lifeline_Shape">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_YRcIALMlEeaW-7aLJkImGQ" source="CustomExtensionInfo">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_YRcvELMlEeaW-7aLJkImGQ" key="manual.label.size" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_U_XTQLMlEeaW-7aLJkImGQ" type="Lifeline_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_U_bksLMlEeaW-7aLJkImGQ" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_U_bksbMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_U_bksrMlEeaW-7aLJkImGQ"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_XrzrYLMlEeaW-7aLJkImGQ" type="Lifeline_Shape">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_oQ7DgLMlEeaW-7aLJkImGQ" source="CustomExtensionInfo">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oQ7qkLMlEeaW-7aLJkImGQ" key="manual.label.size" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_XrzrYrMlEeaW-7aLJkImGQ" type="Lifeline_NameLabel"/>
+ <element xmi:type="uml:Lifeline" href="modelPORTS.uml#_XrsWoLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_XrzrYbMlEeaW-7aLJkImGQ" x="130" width="100" height="250"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ZfWFkLMlEeaW-7aLJkImGQ" type="Lifeline_Shape">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pmgWYLMlEeaW-7aLJkImGQ" source="CustomExtensionInfo">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_pmg9cLMlEeaW-7aLJkImGQ" key="manual.label.size" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZfWsoLMlEeaW-7aLJkImGQ" type="Lifeline_NameLabel"/>
+ <element xmi:type="uml:Lifeline" href="modelPORTS.uml#_ZfQmALMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZfWFkbMlEeaW-7aLJkImGQ" x="282" width="100" height="250"/>
+ </children>
+ <element xmi:type="uml:Lifeline" href="modelPORTS.uml#_U_SawLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_U_WsMbMlEeaW-7aLJkImGQ" x="321" y="10" width="382" height="700"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TXgkpLMlEeaW-7aLJkImGQ"/>
+ </children>
+ <element xmi:type="uml:Interaction" href="modelPORTS.uml#_TKcZALMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TXgkpbMlEeaW-7aLJkImGQ"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_TXgkprMlEeaW-7aLJkImGQ" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_TXgkp7MlEeaW-7aLJkImGQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_TXgkqLMlEeaW-7aLJkImGQ">
+ <owner xmi:type="uml:Model" href="modelPORTS.uml#_YvSxoKsiEear0ZssjsCjIQ"/>
+ </styles>
+ <element xmi:type="uml:Interaction" href="modelPORTS.uml#_TKcZALMlEeaW-7aLJkImGQ"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_hTIT0LudEeaVoq2oaMcWkg" type="PapyrusUMLClassDiagram" name="ClassDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_iSISsLudEeaVoq2oaMcWkg" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iSL9ELudEeaVoq2oaMcWkg" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_iSMkILudEeaVoq2oaMcWkg" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_iSMkIbudEeaVoq2oaMcWkg" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iSPncLudEeaVoq2oaMcWkg" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iSPncbudEeaVoq2oaMcWkg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iSPncrudEeaVoq2oaMcWkg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iSPnc7udEeaVoq2oaMcWkg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iSPndLudEeaVoq2oaMcWkg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iSQOgLudEeaVoq2oaMcWkg" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iSQOgbudEeaVoq2oaMcWkg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iSQOgrudEeaVoq2oaMcWkg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iSQOg7udEeaVoq2oaMcWkg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iSQOhLudEeaVoq2oaMcWkg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_iSQOhbudEeaVoq2oaMcWkg" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_iSQOhrudEeaVoq2oaMcWkg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_iSQOh7udEeaVoq2oaMcWkg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_iSQOiLudEeaVoq2oaMcWkg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iSQOibudEeaVoq2oaMcWkg"/>
+ </children>
+ <element xmi:type="uml:Class" href="modelPORTS.uml#_LET_YLMlEeaW-7aLJkImGQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iSISsbudEeaVoq2oaMcWkg" x="273" y="304"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_hTIT0budEeaVoq2oaMcWkg" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_hTIT0rudEeaVoq2oaMcWkg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_hTIT07udEeaVoq2oaMcWkg">
+ <owner xmi:type="uml:Model" href="modelPORTS.uml#_YvSxoKsiEear0ZssjsCjIQ"/>
+ </styles>
+ <element xmi:type="uml:Model" href="modelPORTS.uml#_YvSxoKsiEear0ZssjsCjIQ"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.uml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.uml
new file mode 100644
index 00000000000..32f67b0ea28
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/modelPORTS.uml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_YvSxoKsiEear0ZssjsCjIQ" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_LET_YLMlEeaW-7aLJkImGQ" name="Class1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_MZ-x0LMlEeaW-7aLJkImGQ" name="Attribute1" type="_Oc4dsLMlEeaW-7aLJkImGQ"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Mv8awLMlEeaW-7aLJkImGQ" name="Attribute2" type="_PQ8X4LMlEeaW-7aLJkImGQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Oc4dsLMlEeaW-7aLJkImGQ" name="Class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_PQ8X4LMlEeaW-7aLJkImGQ" name="Class3">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_Qu7_4LMlEeaW-7aLJkImGQ" name="Port1" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_RIzRYLMlEeaW-7aLJkImGQ" name="Port2" aggregation="composite"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_TKcZALMlEeaW-7aLJkImGQ" name="Interaction1">
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_UgXqILMlEeaW-7aLJkImGQ" name="Lifeline" represents="_Qu7_4LMlEeaW-7aLJkImGQ"/>
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_U_SawLMlEeaW-7aLJkImGQ" name="Lifeline0" decomposedAs="_XrrvkLMlEeaW-7aLJkImGQ" represents="_Mv8awLMlEeaW-7aLJkImGQ"/>
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_XrsWoLMlEeaW-7aLJkImGQ" name="Lifeline1" represents="_RIzRYLMlEeaW-7aLJkImGQ" coveredBy="_XrrvkLMlEeaW-7aLJkImGQ"/>
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_ZfQmALMlEeaW-7aLJkImGQ" name="Lifeline2" represents="_Qu7_4LMlEeaW-7aLJkImGQ" coveredBy="_XrrvkLMlEeaW-7aLJkImGQ"/>
+ <fragment xmi:type="uml:PartDecomposition" xmi:id="_XrrvkLMlEeaW-7aLJkImGQ" name="PartDecomposition" covered="_XrsWoLMlEeaW-7aLJkImGQ _ZfQmALMlEeaW-7aLJkImGQ"/>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen
index 8939c535ce0..9311781611f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequenceDiagram.gmfgen
@@ -11,6 +11,7 @@
domainFileExtension="PapyrusUMLSequence"
dynamicTemplates="true"
templateDirectory="/org.eclipse.papyrus.def/xtend/"
+ copyrightText="Copyright (c) 2016 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation"
pluginDirectory="/org.eclipse.papyrus.uml.diagram.sequence/src-gen">
<audits>
<categories
@@ -75,7 +76,7 @@
</audits>
<diagram
visualID="1000"
- editPartClassName="PackageEditPart"
+ editPartClassName="SequenceDiagramEditPart"
itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicy"
canonicalEditPolicyClassName="PackageCanonicalEditPolicy"
iconProviderPriority="Low"
@@ -87,23 +88,20 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Package_SequenceDiagram"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Package_SequenceDiagram"
+ definedExternally="true"
editHelperClassName="PackageEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.CustomDiagramDragDropEditPolicy"/>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.PackageItemSemanticEditPolicy"/>
+ key="referencialgrilling.GrillingManagementEditPolicy.GRILLING_MANAGEMENT"
+ editPolicyQualifiedClassName="referencialgrilling.GrillingManagementEditPolicy"/>
<domainDiagramElement
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
<childNodes
@@ -119,8 +117,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.ConsiderIgnoreFragment_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.ConsiderIgnoreFragment_Shape"
+ definedExternally="true"
editHelperClassName="ConsiderIgnoreFragmentEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -133,10 +131,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ConsiderIgnoreFragmentItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ConsiderIgnoreFragment"/>
@@ -169,28 +163,20 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.CombinedFragment_Shape"
+ definedExternally="true"
editHelperClassName="CombinedFragmentEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.CombinedFragmentFigure"/>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentItemComponentEditPolicy"/>
- <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.GRAPHICAL_NODE_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CombinedFragment"/>
@@ -223,8 +209,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.InteractionOperand_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.InteractionOperand_Shape"
+ definedExternally="true"
editHelperClassName="InteractionOperandEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -249,10 +235,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomInteractionOperandContextLinkSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InteractionOperand"/>
@@ -275,18 +257,14 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.InteractionUse_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.InteractionUse_Shape"
+ definedExternally="true"
editHelperClassName="InteractionUseEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionUseRectangleFigure"/>
<behaviour
xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionUseItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InteractionUse"/>
@@ -314,7 +292,7 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap
xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getHeaderLabel"
+ getterName="getNameLabel"
figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
<modelFacet
xsi:type="gmfgen:FeatureLabelModelFacet"
@@ -362,16 +340,12 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Continuation_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Continuation_Shape"
+ definedExternally="true"
editHelperClassName="ContinuationEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.ContinuationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ContinuationItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Continuation"/>
@@ -424,8 +398,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Lifeline_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Lifeline_Shape"
+ definedExternally="true"
editHelperClassName="LifelineEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -437,32 +411,12 @@
</viewmap>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineXYLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.LifelineCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ElementCreationWithMessageEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.RemoveOrphanViewPolicy"/>
+ key="ConnectToGrillingEditPolicy.CONNECT_TO_GRILLING_MANAGEMENT"
+ editPolicyQualifiedClassName="referencialgrilling.ConnectToGrillingEditPolicy"/>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineAppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineItemSemanticEditPolicy"/>
+ key="LayoutEditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="referencialgrilling.GrillingBasedResizableShapeEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Lifeline"/>
@@ -515,8 +469,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.ActionExecutionSpecification_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.ActionExecutionSpecification_Shape"
+ definedExternally="true"
editHelperClassName="ActionExecutionSpecificationEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -537,10 +491,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ActionExecutionSpecificationItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionExecutionSpecification"/>
@@ -563,8 +513,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.BehaviorExecutionSpecification_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.BehaviorExecutionSpecification_Shape"
+ definedExternally="true"
editHelperClassName="BehaviorExecutionSpecificationEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -585,10 +535,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.BehaviorExecutionSpecificationItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BehaviorExecutionSpecification"/>
@@ -612,16 +558,12 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.StateInvariant_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.StateInvariant_Shape"
+ definedExternally="true"
editHelperClassName="StateInvariantEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.ContinuationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.StateInvariantItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateInvariant"/>
@@ -687,8 +629,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_CoRegionShape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.CombinedFragment_CoRegionShape"
+ definedExternally="true"
metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -697,10 +639,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragment2ItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CombinedFragment"/>
@@ -733,8 +671,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.TimeConstraint_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.TimeConstraint_Shape"
+ definedExternally="true"
editHelperClassName="TimeConstraintEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -743,10 +681,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy.KEY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeConstraintItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeConstraint"/>
@@ -832,8 +766,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.TimeObservation_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.TimeObservation_Shape"
+ definedExternally="true"
editHelperClassName="TimeObservationEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -842,10 +776,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy.KEY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeObservationItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeObservation"/>
@@ -916,8 +846,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.DurationConstraint_Shape"
+ definedExternally="true"
editHelperClassName="DurationConstraintEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -926,10 +856,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy.KEY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DurationConstraintItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationConstraint"/>
@@ -1016,8 +942,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.DestructionOccurrenceSpecification_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.DestructionOccurrenceSpecification_Shape"
+ definedExternally="true"
editHelperClassName="DestructionEventEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1029,10 +955,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DestructionEventComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DestructionOccurrenceSpecificationItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DestructionOccurrenceSpecification"/>
@@ -1062,8 +984,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Constraint_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Constraint_Shape"
+ definedExternally="true"
editHelperClassName="ConstraintEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1072,10 +994,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ConstraintItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
@@ -1149,8 +1067,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Comment_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Comment_Shape"
+ definedExternally="true"
editHelperClassName="CommentEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1167,10 +1085,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CommentItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
@@ -1221,8 +1135,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_Shape_CN"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.DurationConstraint_Shape_CN"
+ definedExternally="true"
metamodelType="/0/@diagram/@childNodes.12/@elementType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1239,10 +1153,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy.KEY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DurationConstraintInMessageItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationConstraint"/>
@@ -1331,8 +1241,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.DurationObservation_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.DurationObservation_Shape"
+ definedExternally="true"
editHelperClassName="DurationObservationEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1349,10 +1259,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy.KEY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DurationObservationItemSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationObservation"/>
@@ -1427,8 +1333,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Interaction_Shape"
- definedExternally="true"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Interaction_Shape"
+ definedExternally="true"
editHelperClassName="InteractionEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1446,10 +1352,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomInteractionContextLinkSemanticEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction"/>
@@ -1476,7 +1378,7 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap
xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getHeaderLabel"
+ getterName="getNameLabel"
figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
<modelFacet
xsi:type="gmfgen:FeatureLabelModelFacet"
@@ -1500,7 +1402,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Message_SynchEdge"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Message_SynchEdge"
+ definedExternally="true"
editHelperClassName="MessageEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1521,10 +1424,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.CONNECTION_BENDPOINTS_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageSyncItemSemanticEditPolicy"/>
<modelFacet
xsi:type="gmfgen:TypeLinkModelFacet"
modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.1">
@@ -1598,9 +1497,10 @@
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Message_AsynchEdge"
- metamodelType="/0/@diagram/@links.0/@elementType"/>
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Message_AsynchEdge"
+ definedExternally="true"
+ editHelperClassName="MessageEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.MessageAsync"/>
@@ -1620,10 +1520,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.CONNECTION_BENDPOINTS_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageAsyncItemSemanticEditPolicy"/>
<modelFacet
xsi:type="gmfgen:TypeLinkModelFacet"
modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.4">
@@ -1697,7 +1593,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Message_ReplyEdge"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Message_ReplyEdge"
+ definedExternally="true"
metamodelType="/0/@diagram/@links.0/@elementType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1718,10 +1615,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.CONNECTION_BENDPOINTS_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageReplyItemSemanticEditPolicy"/>
<modelFacet
xsi:type="gmfgen:TypeLinkModelFacet"
modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.7">
@@ -1795,7 +1688,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Message_CreateEdge"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Message_CreateEdge"
+ definedExternally="true"
metamodelType="/0/@diagram/@links.0/@elementType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1816,10 +1710,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.CONNECTION_BENDPOINTS_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageCreateItemSemanticEditPolicy"/>
<modelFacet
xsi:type="gmfgen:TypeLinkModelFacet"
modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.10">
@@ -1894,7 +1784,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Message_DeleteEdge"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Message_DeleteEdge"
+ definedExternally="true"
metamodelType="/0/@diagram/@links.0/@elementType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1915,10 +1806,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.CONNECTION_BENDPOINTS_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageDeleteItemSemanticEditPolicy"/>
<modelFacet
xsi:type="gmfgen:TypeLinkModelFacet"
modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.13">
@@ -1992,7 +1879,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Message_LostEdge"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Message_LostEdge"
+ definedExternally="true"
metamodelType="/0/@diagram/@links.0/@elementType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -2013,10 +1901,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.CONNECTION_BENDPOINTS_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageLostItemSemanticEditPolicy"/>
<modelFacet
xsi:type="gmfgen:TypeLinkModelFacet"
modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.16">
@@ -2091,7 +1975,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Message_FoundEdge"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Message_FoundEdge"
+ definedExternally="true"
metamodelType="/0/@diagram/@links.0/@elementType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -2112,10 +1997,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.CONNECTION_BENDPOINTS_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageFoundItemSemanticEditPolicy"/>
<modelFacet
xsi:type="gmfgen:TypeLinkModelFacet"
modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.19">
@@ -2190,14 +2071,11 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Comment_AnnotatedElementEdge"/>
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Comment_AnnotatedElementEdge"
+ definedExternally="true"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AnnotatedLinkEditPart.AnnotatedLinkDescriptor"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CommentAnnotatedElementItemSemanticEditPolicy"/>
<modelFacet
xsi:type="gmfgen:FeatureLinkModelFacet">
<metaFeature
@@ -2215,14 +2093,11 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Constraint_ConstrainedElementEdge"/>
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Constraint_ConstrainedElementEdge"
+ definedExternally="true"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AnnotatedLinkEditPart.AnnotatedLinkDescriptor"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ConstraintConstrainedElementItemSemanticEditPolicy"/>
<modelFacet
xsi:type="gmfgen:FeatureLinkModelFacet">
<metaFeature
@@ -2240,7 +2115,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.GeneralOrdering_Edge"
+ uniqueIdentifier="org.eclipse.papyrus.umldi.GeneralOrdering_Edge"
+ definedExternally="true"
editHelperClassName="GeneralOrderingEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -2249,10 +2125,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.GeneralOrderingItemSemanticEditPolicy"/>
<modelFacet
xsi:type="gmfgen:TypeLinkModelFacet">
<metaClass
@@ -2307,8 +2179,8 @@
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.sequence.Constraint_ContextEdge"
- definedExternally="true"/>
+ uniqueIdentifier="org.eclipse.papyrus.umldi.Constraint_ContextEdge"
+ definedExternally="true"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.CustomContextLinkFigure"/>
@@ -2316,10 +2188,6 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ContextLinkItemSemanticEditPolicy"/>
<modelFacet
xsi:type="gmfgen:FeatureLinkModelFacet">
<metaFeature
@@ -2368,24 +2236,16 @@
figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionCompartmentXYLayoutEditPolicy"/>
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.RemoveOrphanViewPolicy"/>
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="referencialgrilling.GrillingBasedXYLayoutEditPolicy"/>
<behaviour
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.CombinedFragmentCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionInteractionCompartmentItemSemanticEditPolicy"/>
</compartments>
<compartments
visualID="7004"
@@ -2404,10 +2264,6 @@
xsi:type="gmfgen:ParentAssignedViewmap"
getterName="getCompartmentFigure"
figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy"/>
</compartments>
<palette>
<groups
@@ -2418,6 +2274,13 @@
collapse="true">
<entries
xsi:type="gmfgen:ToolEntry"
+ title="Lifeline"
+ description="Create a Lifeline"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
+ genNodes="/0/@diagram/@childNodes.5"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
title="Action Execution Specification"
description="Create an Action Execution Specification"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActionExecutionSpecification.gif"
@@ -2432,44 +2295,55 @@
genNodes="/0/@diagram/@childNodes.7"/>
<entries
xsi:type="gmfgen:ToolEntry"
+ title="InteractionUse"
+ description="Create InteractionUse"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif"
+ genNodes="/0/@diagram/@childNodes.3"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
title="Combined Fragment"
description="Create Combined Fragment"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
- qualifiedToolName=""
- genNodes="/0/@diagram/@childNodes.1"/>
+ genNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Interaction Operand"
+ description="Create Interaction Operand"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionOperand.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionOperand.gif"
+ genNodes="/0/@diagram/@childNodes.2"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Continuation"
+ description="Create Continuation"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Continuation.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Continuation.gif"
+ genNodes="/0/@diagram/@childNodes.4"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="StateInvariant"
+ description="Create StateInvariant"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateInvariant.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateInvariant.gif"
+ genNodes="/0/@diagram/@childNodes.8"/>
<entries
xsi:type="gmfgen:ToolEntry"
title="Comment"
description="Create a comment"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.InteractionChildCreationTool"
genNodes="/0/@diagram/@childNodes.15"/>
<entries
xsi:type="gmfgen:ToolEntry"
- title="Consider Ignore Fragment"
- description="Create Consider Ignore Fragment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConsiderIgnoreFragment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConsiderIgnoreFragment.gif"
- genNodes="/0/@diagram/@childNodes.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
title="Constraint"
description="Create a constraint"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.InteractionChildCreationTool"
genNodes="/0/@diagram/@childNodes.14"/>
<entries
xsi:type="gmfgen:ToolEntry"
- title="Continuation"
- description="Create Continuation"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Continuation.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Continuation.gif"
- genNodes="/0/@diagram/@childNodes.4"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
title="CoRegion"
description="Create a CoRegion"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
@@ -2477,66 +2351,13 @@
genNodes="/0/@diagram/@childNodes.9"/>
<entries
xsi:type="gmfgen:ToolEntry"
- title="Destruction Event"
- description="Create a Destruction Event"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestructionOccurrenceSpecification.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestructionOccurrenceSpecification.gif"
- genNodes="/0/@diagram/@childNodes.13"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Duration Constraint"
- description="Create a Duration Constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.InteractionChildCreationTool"
- genNodes="/0/@diagram/@childNodes.12 /0/@diagram/@childNodes.16"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
title="Duration Observation"
description="Create a Duration Observation on a Message"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.InteractionChildCreationTool"
genNodes="/0/@diagram/@childNodes.17"/>
<entries
xsi:type="gmfgen:ToolEntry"
- title="Gate"
- description="Create a Gate"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Gate.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Gate.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.GateCreationTool"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Interaction Operand"
- description="Create Interaction Operand"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionOperand.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionOperand.gif"
- genNodes="/0/@diagram/@childNodes.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="InteractionUse"
- description="Create InteractionUse"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif"
- genNodes="/0/@diagram/@childNodes.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Lifeline"
- description="Create a Lifeline"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
- qualifiedToolName=""
- genNodes="/0/@diagram/@childNodes.5"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="StateInvariant"
- description="Create StateInvariant"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateInvariant.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateInvariant.gif"
- qualifiedToolName=""
- genNodes="/0/@diagram/@childNodes.8"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
title="Time Constraint"
description="Create a Time Constraint"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
@@ -2548,8 +2369,21 @@
description="Create a Time Observation"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.InteractionChildCreationTool"
genNodes="/0/@diagram/@childNodes.11"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Duration Constraint"
+ description="Create a Duration Constraint"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
+ genNodes="/0/@diagram/@childNodes.12 /0/@diagram/@childNodes.16"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Destruction Event"
+ description="Create a Destruction Event"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestructionEvent.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestructionEvent.gif"
+ genNodes="/0/@diagram/@childNodes.13"/>
</groups>
<groups
title="Edges"
@@ -2559,19 +2393,10 @@
collapse="true">
<entries
xsi:type="gmfgen:ToolEntry"
- title="ContextLink"
- description="Creation of a context link for a Constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- createMethodName="createContextLink11CreationTool"
- genLinks="/0/@diagram/@links.10"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
title="Message Sync"
description="Create MessageSync"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_synchCall.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_synchCall.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.MessageConnectionTool"
genLinks="/0/@diagram/@links.0"/>
<entries
xsi:type="gmfgen:ToolEntry"
@@ -2579,7 +2404,6 @@
description="Create MessageAsync"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_asynchCall.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_asynchCall.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.MessageConnectionTool"
genLinks="/0/@diagram/@links.1"/>
<entries
xsi:type="gmfgen:ToolEntry"
@@ -2587,7 +2411,6 @@
description="Create MessageReply"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_reply.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_reply.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.MessageConnectionTool"
genLinks="/0/@diagram/@links.2"/>
<entries
xsi:type="gmfgen:ToolEntry"
@@ -2595,7 +2418,6 @@
description="Create MessageCreate"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.MessageConnectionTool"
genLinks="/0/@diagram/@links.3"/>
<entries
xsi:type="gmfgen:ToolEntry"
@@ -2603,7 +2425,6 @@
description="Create MessageDelete"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_deleteMessage.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_deleteMessage.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.MessageConnectionTool"
genLinks="/0/@diagram/@links.4"/>
<entries
xsi:type="gmfgen:ToolEntry"
@@ -2611,7 +2432,6 @@
description="Create MessageLost"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.MessageConnectionTool"
genLinks="/0/@diagram/@links.5"/>
<entries
xsi:type="gmfgen:ToolEntry"
@@ -2619,7 +2439,6 @@
description="Create MessageFound"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.MessageConnectionTool"
genLinks="/0/@diagram/@links.6"/>
<entries
xsi:type="gmfgen:ToolEntry"
@@ -2627,16 +2446,29 @@
description="Create GeneralOrdering"
largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralOrdering.gif"
smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralOrdering.gif"
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.SequenceSpecificConnectionTool"
genLinks="/0/@diagram/@links.9"/>
<entries
xsi:type="gmfgen:ToolEntry"
- title="Link"
- description="Create a Annotated link"
- largeIconPath="platform:/plugin/org.eclipse.papyrus.uml.diagram.clazz/icons/obj16/Link.gif"
- smallIconPath="platform:/plugin/org.eclipse.papyrus.uml.diagram.clazz/icons/obj16/Link.gif"
- createMethodName=""
- qualifiedToolName="org.eclipse.papyrus.uml.diagram.sequence.tools.AnnotatedLinkCreationTool"/>
+ title="Comment link"
+ description="Create a comment link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ genLinks="/0/@diagram/@links.7"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Constraint link"
+ description="Create a constraint link"
+ 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"
+ genLinks="/0/@diagram/@links.8"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ContextLink"
+ description="Creation of a context link for a Constraint"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ createMethodName="createContextLink11CreationTool"
+ genLinks="/0/@diagram/@links.10"/>
</groups>
</palette>
<preferencePages
@@ -7571,12 +7403,6 @@
genChildSideAffixedNode="/0/@diagram/@childNodes.13 /0/@diagram/@childNodes.8"/>
<extensionNodes
xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Node with label for named element"
- genView="/0/@diagram/@childNodes.5"
- name="NamedElementEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
comment="this is an extension to manage the comment"
genView="/0/@diagram/@childNodes.15"
name="comment extended node"
@@ -7624,7 +7450,7 @@
<extensionNodes
xsi:type="papyrusgmfgenextension:ExtendedGenView"
comment="Edit part that inherits from Rounded Compartment EditPart"
- genView="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.9"
+ genView="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.9 /0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.5"
name="RoundedCompartmentEditPart"
superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart"/>
</papyrusgmfgenextension:PapyrusExtensionRootNode>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram-uml.elementtypesconfigurations b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram-uml.elementtypesconfigurations
deleted file mode 100644
index fd3dfc3f3c0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram-uml.elementtypesconfigurations
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="ASCII" standalone="no"?><elementtypesconfigurations:ElementTypeSetConfiguration xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" identifier="org.eclipse.papyrus.uml.diagram.sequence.uml.elementTypeSet" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML" name="PapyrusUMLSequenceDiagramUML" xmi:id="_BJMa0PyeEeWbo9Y7g2MLdw" xmi:version="2.0">
- <adviceBindingsConfigurations editHelperAdviceClassName="org.eclipse.papyrus.uml.diagram.sequence.SequenceViewDependentsAdvice" identifier="org.eclipse.papyrus.uml.diagram.sequence.viewDependences" inheritance="all" xmi:id="_nL7yIPyeEeWbo9Y7g2MLdw" xsi:type="elementtypesconfigurations:AdviceBindingConfiguration"/>
-</elementtypesconfigurations:ElementTypeSetConfiguration> \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations
index 3f9b172cbf1..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmi:id="_jiZccPyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.elementTypeSet" name="PapyrusUMLSequenceDiagram" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiZccfyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Package_SequenceDiagram" name="Package_SequenceDiagram" hint="Package_SequenceDiagram" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.PackageEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiZccvyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Interaction_Shape" name="Interaction_Shape" hint="Interaction_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.InteractionEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//Interaction"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiZcc_yaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.ConsiderIgnoreFragment_Shape" name="ConsiderIgnoreFragment_Shape" hint="ConsiderIgnoreFragment_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.ConsiderIgnoreFragmentEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//ConsiderIgnoreFragment"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiZcdPyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_Shape" name="CombinedFragment_Shape" hint="CombinedFragment_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.CombinedFragmentEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//CombinedFragment"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiZcdfyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.InteractionOperand_Shape" name="InteractionOperand_Shape" hint="InteractionOperand_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.InteractionOperandEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//InteractionOperand"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiZcdvyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.InteractionUse_Shape" name="InteractionUse_Shape" hint="InteractionUse_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.InteractionUseEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//InteractionUse"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiZcd_yaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Continuation_Shape" name="Continuation_Shape" hint="Continuation_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.ContinuationEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//Continuation"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiZcePyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Lifeline_Shape" name="Lifeline_Shape" hint="Lifeline_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.LifelineEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//Lifeline"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiZcefyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.ActionExecutionSpecification_Shape" name="ActionExecutionSpecification_Shape" hint="ActionExecutionSpecification_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.ActionExecutionSpecificationEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//ActionExecutionSpecification"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiZcevyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.BehaviorExecutionSpecification_Shape" name="BehaviorExecutionSpecification_Shape" hint="BehaviorExecutionSpecification_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.BehaviorExecutionSpecificationEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//BehaviorExecutionSpecification"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiZce_yaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.StateInvariant_Shape" name="StateInvariant_Shape" hint="StateInvariant_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.StateInvariantEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//StateInvariant"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_jiaDgPyaEeWbo9Y7g2MLdw" description="" identifier="org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_CoRegionShape" name="CombinedFragment_CoRegionShape" hint="CombinedFragment_CoRegionShape">
- <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations#_jiZcdPyaEeWbo9Y7g2MLdw"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiaDgfyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.TimeConstraint_Shape" name="TimeConstraint_Shape" hint="TimeConstraint_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.TimeConstraintEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//TimeConstraint"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiaDgvyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.TimeObservation_Shape" name="TimeObservation_Shape" hint="TimeObservation_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.TimeObservationEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//TimeObservation"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiaDg_yaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_Shape" name="DurationConstraint_Shape" hint="DurationConstraint_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.DurationConstraintEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//DurationConstraint"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiaDhPyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.DestructionOccurrenceSpecification_Shape" name="DestructionOccurrenceSpecification_Shape" hint="DestructionOccurrenceSpecification_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.DestructionEventEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//DestructionOccurrenceSpecification"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiaDhfyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Constraint_Shape" name="Constraint_Shape" hint="Constraint_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.ConstraintEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//Constraint"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiaDhvyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Comment_Shape" name="Comment_Shape" hint="Comment_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.CommentEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//Comment"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_jiaDh_yaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_Shape_CN" name="DurationConstraint_Shape_CN" hint="DurationConstraint_Shape_CN">
- <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations#_jiaDg_yaEeWbo9Y7g2MLdw"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiaDiPyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.DurationObservation_Shape" name="DurationObservation_Shape" hint="DurationObservation_Shape" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.DurationObservationEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//DurationObservation"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiaDifyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Message_SynchEdge" name="Message_SynchEdge" hint="Message_SynchEdge" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.MessageEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//Message"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_jiaDivyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Message_AsynchEdge" name="Message_AsynchEdge" hint="Message_AsynchEdge">
- <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations#_jiaDifyaEeWbo9Y7g2MLdw"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_jiaDi_yaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Message_ReplyEdge" name="Message_ReplyEdge" hint="Message_ReplyEdge">
- <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations#_jiaDifyaEeWbo9Y7g2MLdw"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_jiaDjPyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Message_CreateEdge" name="Message_CreateEdge" hint="Message_CreateEdge">
- <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations#_jiaDifyaEeWbo9Y7g2MLdw"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_jiaDjfyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Message_DeleteEdge" name="Message_DeleteEdge" hint="Message_DeleteEdge">
- <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations#_jiaDifyaEeWbo9Y7g2MLdw"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_jiaDjvyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Message_LostEdge" name="Message_LostEdge" hint="Message_LostEdge">
- <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations#_jiaDifyaEeWbo9Y7g2MLdw"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_jiaDj_yaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Message_FoundEdge" name="Message_FoundEdge" hint="Message_FoundEdge">
- <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.diagram.sequence/model/sequencediagram.elementtypesconfigurations#_jiaDifyaEeWbo9Y7g2MLdw"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_jiaDkPyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Comment_AnnotatedElementEdge" name="Comment_AnnotatedElementEdge" hint="Comment_AnnotatedElementEdge">
- <specializedTypes xsi:type="elementtypesconfigurations:ExternallyRegisteredType" href="../../../plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#_1U1kgEOBEeay77YZlFOXVQ"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_jiaDkfyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Constraint_ConstrainedElementEdge" name="Constraint_ConstrainedElementEdge" hint="Constraint_ConstrainedElementEdge">
- <specializedTypes xsi:type="elementtypesconfigurations:ExternallyRegisteredType" href="../../../plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#_1U1kgEOBEeay77YZlFOXVQ"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_jiaDkvyaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.GeneralOrdering_Edge" name="GeneralOrdering_Edge" hint="GeneralOrdering_Edge" editHelperClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.GeneralOrderingEditHelper">
- <eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//GeneralOrdering"/>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_jiaDk_yaEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.Constraint_ContextEdge" name="Constraint_ContextEdge" hint="Constraint_ContextEdge">
- <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#_eu4cBdx0EeWVxMf7SXAfhg"/>
- </elementTypeConfigurations>
- <adviceBindingsConfigurations xsi:type="elementtypesconfigurations:AdviceBindingConfiguration" xmi:id="_zpEy0PyfEeWbo9Y7g2MLdw" identifier="org.eclipse.papyrus.uml.diagram.sequence.restoreExecutionEnd" inheritance="all" editHelperAdviceClassName="org.eclipse.papyrus.uml.diagram.sequence.RestoreExecutionEndAdvice"/>
-</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml
index 2275ec3c60e..323f939401c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml
@@ -186,6 +186,25 @@
</clientContext>
<binding context="org.eclipse.papyrus.uml.diagram.sequence.TypeContext">
<elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Package_SequenceDiagram"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Interaction_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.ConsiderIgnoreFragment_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.InteractionOperand_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.InteractionUse_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Continuation_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Lifeline_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.ActionExecutionSpecification_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.BehaviorExecutionSpecification_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.StateInvariant_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_CoRegionShape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.TimeConstraint_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.TimeObservation_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.DestructionOccurrenceSpecification_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Constraint_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Comment_Shape"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_Shape_CN"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.DurationObservation_Shape"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Message_SynchEdge"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Message_AsynchEdge"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Message_ReplyEdge"/>
@@ -196,6 +215,7 @@
<elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Comment_AnnotatedElementEdge"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Constraint_ConstrainedElementEdge"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.sequence.GeneralOrdering_Edge"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Constraint_ContextEdge"/>
<advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
</binding>
</extension>
@@ -361,8 +381,447 @@
</page>
</extension>
+<extension
+ id="UML Plugin.palettedefinition"
+ name="UML Plugin Predefined Entries"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Lowest"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.sequence.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ defineOnly="true"
+ description="Create a Lifeline"
+ id="createLifeline1CreationTool"
+ kind="tool"
+ label="Lifeline"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an Action Execution Specification"
+ id="createActionExecutionSpecification2CreationTool"
+ kind="tool"
+ label="Action Execution Specification"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActionExecutionSpecification.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActionExecutionSpecification.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an BehaviorExecutionSpecification"
+ id="createBehaviorExecutionSpecification3CreationTool"
+ kind="tool"
+ label=" Behavior Execution Specification"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/BehaviorExecutionSpecification.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/BehaviorExecutionSpecification.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create InteractionUse"
+ id="createInteractionUse4CreationTool"
+ kind="tool"
+ label="InteractionUse"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Combined Fragment"
+ id="createCombinedFragment5CreationTool"
+ kind="tool"
+ label="Combined Fragment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Interaction Operand"
+ id="createInteractionOperand6CreationTool"
+ kind="tool"
+ label="Interaction Operand"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionOperand.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionOperand.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Continuation"
+ id="createContinuation7CreationTool"
+ kind="tool"
+ label="Continuation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Continuation.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Continuation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create StateInvariant"
+ id="createStateInvariant8CreationTool"
+ kind="tool"
+ label="StateInvariant"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateInvariant.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateInvariant.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a comment"
+ id="createComment9CreationTool"
+ kind="tool"
+ label="Comment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a constraint"
+ id="createConstraint10CreationTool"
+ 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 CoRegion"
+ id="createCoRegion11CreationTool"
+ kind="tool"
+ label="CoRegion"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Duration Observation on a Message"
+ id="createDurationObservation12CreationTool"
+ kind="tool"
+ label="Duration Observation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Time Constraint"
+ id="createTimeConstraint13CreationTool"
+ kind="tool"
+ label="Time Constraint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Time Observation"
+ id="createTimeObservation14CreationTool"
+ kind="tool"
+ label="Time Observation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Duration Constraint"
+ id="createDurationConstraint15CreationTool"
+ kind="tool"
+ label="Duration Constraint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Destruction Event"
+ id="createDestructionEvent16CreationTool"
+ kind="tool"
+ label="Destruction Event"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestructionEvent.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestructionEvent.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageSync"
+ id="createMessageSync1CreationTool"
+ kind="tool"
+ label="Message Sync"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_synchCall.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_synchCall.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageAsync"
+ id="createMessageAsync2CreationTool"
+ kind="tool"
+ label="Message Async"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_asynchCall.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_asynchCall.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageReply"
+ id="createMessageReply3CreationTool"
+ kind="tool"
+ label="Message Reply"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_reply.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_reply.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageCreate"
+ id="createMessageCreate4CreationTool"
+ kind="tool"
+ label="Message Create"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageDelete"
+ id="createMessageDelete5CreationTool"
+ kind="tool"
+ label="Message Delete"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_deleteMessage.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_deleteMessage.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageLost"
+ id="createMessageLost6CreationTool"
+ kind="tool"
+ label="Message Lost"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageFound"
+ id="createMessageFound7CreationTool"
+ kind="tool"
+ label="Message Found"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create GeneralOrdering"
+ id="createGeneralOrdering8CreationTool"
+ kind="tool"
+ label="General Ordering"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralOrdering.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralOrdering.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a comment link"
+ id="createCommentlink9CreationTool"
+ kind="tool"
+ label="Comment link"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a constraint link"
+ id="createConstraintlink10CreationTool"
+ kind="tool"
+ label="Constraint link"
+ 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="Creation of a context link for a Constraint"
+ id="createContextLink11CreationTool"
+ kind="tool"
+ label="ContextLink"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+ </entry>
+
+ </contribution>
+ </paletteProvider>
+
+ </extension>
+
+<extension
+ id="UML Plugin.standard"
+ name="UML Plugin Standard Palette"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Low"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.sequence.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+ <entry
+ description=""
+ id="createNodes1Group"
+ 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="createLifeline1CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createActionExecutionSpecification2CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createBehaviorExecutionSpecification3CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createInteractionUse4CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createCombinedFragment5CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createInteractionOperand6CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createContinuation7CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createStateInvariant8CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createComment9CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createConstraint10CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createCoRegion11CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createDurationObservation12CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createTimeConstraint13CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createTimeObservation14CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createDurationConstraint15CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createDestructionEvent16CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <entry
+ description="Message tools"
+ id="createEdges2Group"
+ kind="drawer"
+ label="Edges"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="createMessageSync1CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageAsync2CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageReply3CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageCreate4CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageDelete5CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageLost6CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageFound7CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createGeneralOrdering8CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createCommentlink9CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createConstraintlink10CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createContextLink11CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ </contribution>
+ <editor id="org.eclipse.papyrus.uml.diagram.sequence"/>
+ </paletteProvider>
+
+</extension>
<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
@@ -513,6 +972,343 @@
</extension>
<extension
+ id="Sequence.custom"
+ name="Sequence Custom Palette"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+ <paletteProvider
+ class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority
+ name="Medium">
+ </Priority>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.sequence.part.UMLPaletteFactory">
+ <predefinedEntry
+ id="/createNodes1Group/createCombinedFragment5CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createNodes1Group/createDurationObservation12CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createNodes1Group/createTimeObservation14CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createNodes1Group/createDurationConstraint15CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createNodes1Group/createDestructionEvent16CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createNodes1Group/createComment9CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createNodes1Group/createConstraint10CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createEdges2Group/createMessageSync1CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createEdges2Group/createMessageAsync2CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createEdges2Group/createMessageReply3CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createEdges2Group/createMessageCreate4CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createEdges2Group/createMessageDelete5CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createEdges2Group/createMessageLost6CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createEdges2Group/createMessageFound7CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createEdges2Group/createGeneralOrdering8CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createEdges2Group/createCommentlink9CreationTool"
+ remove="true">
+ </predefinedEntry>
+ <predefinedEntry
+ id="/createEdges2Group/createConstraintlink10CreationTool"
+ remove="true">
+ </predefinedEntry>
+ </contribution>
+ <editor
+ id="org.eclipse.papyrus.uml.diagram.sequence">
+ </editor>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.sequence.CustomSequencePaletteFactory">
+ <entry
+ defineOnly="true"
+ description="Create Combined Fragment"
+ id="createCombinedFragmentTool"
+ kind="tool"
+ label="Combined Fragment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Consider Ignore Fragment"
+ id="createConsiderIgnoreFragmentTool"
+ kind="tool"
+ label="Consider Ignore Fragment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConsiderIgnoreFragment.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConsiderIgnoreFragment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Duration Constraint"
+ id="createDurationConstraintTool"
+ kind="tool"
+ label="Duration Constraint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Duration Observation on a Message"
+ id="createDurationObservationTool"
+ kind="tool"
+ label="Duration Observation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Time Observation"
+ id="createTimeObservationTool"
+ kind="tool"
+ label="Time Observation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Destruction Event"
+ id="createDestructionEventTool"
+ kind="tool"
+ label="Destruction Event"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestroyObjectAction.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestroyObjectAction.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a comment"
+ id="createCommentTool"
+ kind="tool"
+ label="Comment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a constraint"
+ id="createConstraintTool"
+ kind="tool"
+ label="Constraint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageSync"
+ id="createMessageSyncTool"
+ kind="tool"
+ label="Message Sync"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_synchCall.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_synchCall.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageAsync"
+ id="createMessageAsyncTool"
+ kind="tool"
+ label="Message Async"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_asynchCall.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_asynchCall.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageReply"
+ id="createMessageReplyTool"
+ kind="tool"
+ label="Message Reply"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_reply.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_reply.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageCreate"
+ id="createMessageCreateTool"
+ kind="tool"
+ label="Message Create"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageDelete"
+ id="createMessageDeleteTool"
+ kind="tool"
+ label="Message Delete"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_deleteMessage.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_deleteMessage.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageLost"
+ id="createMessageLostTool"
+ kind="tool"
+ label="Message Lost"
+ large_icon="platform:/plugin/org.eclipse.papyrus.uml.diagram.sequence/icons/obj16/MessageLost.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.uml.diagram.sequence/icons/obj16/MessageLost.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create MessageFound"
+ id="createMessageFoundTool"
+ kind="tool"
+ label="Message Found"
+ large_icon="platform:/plugin/org.eclipse.papyrus.uml.diagram.sequence/icons/obj16/MessageFound.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.uml.diagram.sequence/icons/obj16/MessageFound.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create GeneralOrdering"
+ id="createGeneralOrderingTool"
+ kind="tool"
+ label="General Ordering"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralOrdering.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralOrdering.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Annotated Link"
+ id="createAnnotatedLinkTool"
+ kind="tool"
+ label="Link"
+ large_icon="platform:/plugin/org.eclipse.papyrus.uml.diagram.clazz/icons/obj16/Link.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.uml.diagram.clazz/icons/obj16/Link.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Gate"
+ id="createGateTool"
+ kind="tool"
+ label="Gate"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Gate.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Gate.gif">
+ </entry>
+ </contribution>
+ </paletteProvider>
+</extension>
+<extension
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+ <paletteProvider
+ class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority
+ name="High">
+ </Priority>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.sequence.CustomSequencePaletteFactory">
+ <predefinedEntry
+ id="createCombinedFragmentTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createConsiderIgnoreFragmentTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createDurationConstraintTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createDurationObservationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createTimeObservationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createDestructionEventTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createCommentTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createConstraintTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createGateTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageSyncTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageAsyncTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageReplyTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageCreateTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageDeleteTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageLostTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createMessageFoundTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createGeneralOrderingTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createAnnotatedLinkTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ </contribution>
+ <editor
+ id="org.eclipse.papyrus.uml.diagram.sequence">
+ </editor>
+ </paletteProvider>
+</extension>
+<extension
point="org.eclipse.ui.handlers">
<handler
commandId="org.eclipse.papyrus.uml.diagram.menu.command.sameSize.both">
@@ -658,136 +1454,4 @@
<extension point="org.eclipse.ui.handlers" id="menu-handlers">
<?gmfgen generated="true"?>
</extension>
-<extension
- point="org.eclipse.papyrus.infra.types.core.elementTypeSetConfiguration">
- <elementTypeSet
- clientContextID="org.eclipse.papyrus.uml.diagram.sequence.TypeContext"
- path="model/sequencediagram.elementtypesconfigurations">
- </elementTypeSet>
-</extension>
-<extension point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
- <?gmfgen generated="true"?>
- <paletteDefinition
- ID="org.eclipse.papyrus.uml.diagram.sequence.paletteconfiguration"
- class="org.eclipse.papyrus.infra.gmfdiag.common.service.palette.ExtendedPluginPaletteProvider"
- name="UML Plugin Palette"
- path="model/PapyrusUMLSequenceDiagram.paletteconfiguration"
- provider="Eclipse Modeling Project">
- <Priority
- name="Lowest">
- </Priority>
- <!-- Specify diagram to which this palette tool relates -->
- <editor
- id="org.eclipse.papyrus.uml.diagram.sequence">
- </editor>
- </paletteDefinition>
-</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.sequence.Package_SequenceDiagram"
- name="%metatype.name.Package_SequenceDiagram"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Package"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.PackageEditHelper">
- <param name="semanticHint" value="Package_SequenceDiagram"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_SynchEdge"
- name="%metatype.name.Message_SynchEdge"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Message"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.MessageEditHelper">
- <param name="semanticHint" value="Message_SynchEdge"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_AsynchEdge"
- name="%metatype.name.Message_AsynchEdge"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_SynchEdge"/>
- <param name="semanticHint" value="Message_AsynchEdge"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_ReplyEdge"
- name="%metatype.name.Message_ReplyEdge"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_SynchEdge"/>
- <param name="semanticHint" value="Message_ReplyEdge"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_CreateEdge"
- name="%metatype.name.Message_CreateEdge"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_SynchEdge"/>
- <param name="semanticHint" value="Message_CreateEdge"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_DeleteEdge"
- name="%metatype.name.Message_DeleteEdge"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_SynchEdge"/>
- <param name="semanticHint" value="Message_DeleteEdge"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_LostEdge"
- name="%metatype.name.Message_LostEdge"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_SynchEdge"/>
- <param name="semanticHint" value="Message_LostEdge"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_FoundEdge"
- name="%metatype.name.Message_FoundEdge"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_SynchEdge"/>
- <param name="semanticHint" value="Message_FoundEdge"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Comment_AnnotatedElementEdge"
- name="%metatype.name.Comment_AnnotatedElementEdge"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="Comment_AnnotatedElementEdge"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Constraint_ConstrainedElementEdge"
- name="%metatype.name.Constraint_ConstrainedElementEdge"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="Constraint_ConstrainedElementEdge"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.GeneralOrdering_Edge"
- name="%metatype.name.GeneralOrdering_Edge"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="GeneralOrdering"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.GeneralOrderingEditHelper">
- <param name="semanticHint" value="GeneralOrdering_Edge"/>
- </metamodelType>
- </metamodel>
- </extension>
-
-
-
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/Activator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/Activator.java
deleted file mode 100644
index 7ae86d4a1f2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/Activator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.sequence";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext )
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext )
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java
index be36f1672f2..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java
@@ -1,141 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.ActionExecutionSpecification;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ActionExecutionSpecificationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static ActionExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new ActionExecutionSpecificationCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionExecutionSpecification());
- return data.isPermitted();
- }
-
- /**
- * To add the lifeline to the attribute covered of the AES
- *
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- ActionExecutionSpecification newElement = UMLFactory.eINSTANCE.createActionExecutionSpecification();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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 {
- Interaction qualifiedTarget = (Interaction) target;
- qualifiedTarget.getFragments().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(ActionExecutionSpecification 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java
index ec0002963da..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java
@@ -1,141 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.BehaviorExecutionSpecification;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class BehaviorExecutionSpecificationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public BehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static BehaviorExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new BehaviorExecutionSpecificationCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public BehaviorExecutionSpecificationCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getBehaviorExecutionSpecification());
- return data.isPermitted();
- }
-
- /**
- * To add the lifeline to the attribute covered of the AES
- *
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- BehaviorExecutionSpecification newElement = UMLFactory.eINSTANCE.createBehaviorExecutionSpecification();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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 {
- Interaction qualifiedTarget = (Interaction) target;
- qualifiedTarget.getFragments().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(BehaviorExecutionSpecification 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java
index 9bed99d049f..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java
@@ -1,145 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CombinedFragment2CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public CombinedFragment2CreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static CombinedFragment2CreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new CombinedFragment2CreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public CombinedFragment2CreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCombinedFragment());
- return data.isPermitted();
- }
-
- /**
- * Create a CoRegion :
- * - creates two operands
- * - set the Interaction Operator to parallel
- *
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CombinedFragment newElement = UMLFactory.eINSTANCE.createCombinedFragment();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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 {
- Interaction qualifiedTarget = (Interaction) target;
- qualifiedTarget.getFragments().add(newElement);
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
- ElementInitializers.getInstance().init_CombinedFragment_CoRegionShape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(CombinedFragment 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java
index a41f8c5730f..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java
@@ -1,146 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CombinedFragmentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public CombinedFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static CombinedFragmentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new CombinedFragmentCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public CombinedFragmentCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCombinedFragment());
- return data.isPermitted();
- }
-
- /**
- * Handle creation on InteractionOperand
- *
- * @generated
- */
- @Override
- @SuppressWarnings("unchecked")
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CombinedFragment newElement = UMLFactory.eINSTANCE.createCombinedFragment();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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 {
- Interaction qualifiedTarget = (Interaction) target;
- qualifiedTarget.getFragments().add(newElement);
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
- ElementInitializers.getInstance().init_CombinedFragment_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(CombinedFragment 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementCreateCommand.java
deleted file mode 100644
index dfcc05faf51..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementCreateCommand.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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().canCreateComment_AnnotatedElementEdge(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementReorientCommand.java
deleted file mode 100644
index ad62e5181e8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementReorientCommand.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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().canExistComment_AnnotatedElementEdge(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistComment_AnnotatedElementEdge(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java
index d994f4bf0cb..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java
@@ -1,141 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public CommentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static CommentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new CommentCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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.getFor(target).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_Shape(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java
index fb016e80183..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java
@@ -1,146 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.ConsiderIgnoreFragment;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ConsiderIgnoreFragmentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static ConsiderIgnoreFragmentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new ConsiderIgnoreFragmentCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public ConsiderIgnoreFragmentCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConsiderIgnoreFragment());
- return data.isPermitted();
- }
-
- /**
- * Handle creation on InteractionOperand
- *
- * @generated
- */
- @Override
- @SuppressWarnings("unchecked")
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- ConsiderIgnoreFragment newElement = UMLFactory.eINSTANCE.createConsiderIgnoreFragment();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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 {
- Interaction qualifiedTarget = (Interaction) target;
- qualifiedTarget.getFragments().add(newElement);
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
- ElementInitializers.getInstance().init_ConsiderIgnoreFragment_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ConsiderIgnoreFragment 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementCreateCommand.java
deleted file mode 100644
index 65f9f388a39..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementCreateCommand.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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().canCreateConstraint_ConstrainedElementEdge(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementReorientCommand.java
deleted file mode 100644
index 98aa0a31f4c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementReorientCommand.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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().canExistConstraint_ConstrainedElementEdge(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraint_ConstrainedElementEdge(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java
index cb5b3ee0c9e..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java
@@ -1,141 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new ConstraintCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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.getFor(target).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_Shape(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContextLinkCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContextLinkCreateCommand.java
deleted file mode 100644
index 1b4d897c178..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContextLinkCreateCommand.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Namespace;
-
-/**
- * @generated
- */
-public class ContextLinkCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- public ContextLinkCreateCommand(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 Namespace) {
- 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().canCreateConstraint_ContextEdge(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().setContext(getTarget());
- }
- return CommandResult.newOKCommandResult();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Constraint getSource() {
- return (Constraint) source;
- }
-
- /**
- * @generated
- */
- protected Namespace getTarget() {
- return (Namespace) target;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContextLinkReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContextLinkReorientCommand.java
deleted file mode 100644
index 2c6a0fee467..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContextLinkReorientCommand.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Namespace;
-
-/**
- * @generated
- */
-public class ContextLinkReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject referenceOwner;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public ContextLinkReorientCommand(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 Namespace && newEnd instanceof Constraint)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraint_ContextEdge(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Namespace && newEnd instanceof Namespace)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraint_ContextEdge(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().setContext(null);
- getNewSource().setContext(getOldTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getOldSource().setContext(getNewTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected Constraint getOldSource() {
- return (Constraint) referenceOwner;
- }
-
- /**
- * @generated
- */
- protected Constraint getNewSource() {
- return (Constraint) newEnd;
- }
-
- /**
- * @generated
- */
- protected Namespace getOldTarget() {
- return (Namespace) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Namespace getNewTarget() {
- return (Namespace) newEnd;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java
index 4053962cd72..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java
@@ -1,143 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Continuation;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ContinuationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ContinuationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static ContinuationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new ContinuationCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public ContinuationCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getContinuation());
- return data.isPermitted();
- }
-
- /**
- * Generated not to handle the constraint on covered lifelines.
- *
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Continuation newElement = UMLFactory.eINSTANCE.createContinuation();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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 {
- InteractionOperand qualifiedTarget = (InteractionOperand) target;
- qualifiedTarget.getFragments().add(newElement);
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
- ElementInitializers.getInstance().init_Continuation_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Continuation 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java
index 1a4c9fbe0ff..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java
@@ -1,130 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DestructionOccurrenceSpecificationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static DestructionOccurrenceSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new DestructionOccurrenceSpecificationCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public DestructionOccurrenceSpecificationCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * A DestructionEvent on a lifeline can only be created if it doesn't exist yet a destructionEvent on that lifeline.
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDestructionOccurrenceSpecification());
- return data.isPermitted();
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- DestructionOccurrenceSpecification newElement = UMLFactory.eINSTANCE.createDestructionOccurrenceSpecification();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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 {
- Interaction qualifiedTarget = (Interaction) target;
- qualifiedTarget.getFragments().add(newElement);
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
- ElementInitializers.getInstance().init_DestructionOccurrenceSpecification_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DestructionOccurrenceSpecification 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java
index b390b7e9512..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java
@@ -1,141 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DurationConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static DurationConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new DurationConstraintCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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.getFor(target).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_Shape(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java
index fe025f99ee7..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java
@@ -1,141 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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 DurationConstraintInMessageCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DurationConstraintInMessageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static DurationConstraintInMessageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new DurationConstraintInMessageCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public DurationConstraintInMessageCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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.getFor(target).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_Shape_CN(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java
index 57393a8f312..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java
@@ -1,141 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DurationObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static DurationObservationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new DurationObservationCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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.getFor(target).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_Shape(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingCreateCommand.java
deleted file mode 100644
index 9818e096ea3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingCreateCommand.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.GeneralOrdering;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class GeneralOrderingCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected InteractionFragment container;
-
- /**
- * Non generated, completely redefined to find correct ends and correct container
- *
- * @generated
- */
- public GeneralOrderingCreateCommand(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 OccurrenceSpecification) {
- return false;
- }
- if (target != null && false == target instanceof OccurrenceSpecification) {
- 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().canCreateGeneralOrdering_Edge(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$
- }
- GeneralOrdering newElement = UMLFactory.eINSTANCE.createGeneralOrdering();
- getContainer().getGeneralOrderings().add(newElement);
- newElement.setBefore(getSource());
- newElement.setAfter(getTarget());
- ElementInitializers.getInstance().init_GeneralOrdering_Edge(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(GeneralOrdering 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 OccurrenceSpecification getSource() {
- return (OccurrenceSpecification) source;
- }
-
- /**
- * @generated
- */
- protected OccurrenceSpecification getTarget() {
- return (OccurrenceSpecification) target;
- }
-
- /**
- * @generated
- */
- public InteractionFragment getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container.
- * Modify with appropriate logic.
- *
- * @generated
- */
- protected InteractionFragment 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 InteractionFragment) {
- return (InteractionFragment) element;
- }
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingReorientCommand.java
deleted file mode 100644
index 92233c17f38..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingReorientCommand.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.GeneralOrdering;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * @generated
- */
-public class GeneralOrderingReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public GeneralOrderingReorientCommand(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 GeneralOrdering) {
- 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 OccurrenceSpecification && newEnd instanceof OccurrenceSpecification)) {
- return false;
- }
- OccurrenceSpecification target = getLink().getAfter();
- if (!(getLink().eContainer() instanceof InteractionFragment)) {
- return false;
- }
- InteractionFragment container = (InteractionFragment) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistGeneralOrdering_Edge(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof OccurrenceSpecification && newEnd instanceof OccurrenceSpecification)) {
- return false;
- }
- OccurrenceSpecification source = getLink().getBefore();
- if (!(getLink().eContainer() instanceof InteractionFragment)) {
- return false;
- }
- InteractionFragment container = (InteractionFragment) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistGeneralOrdering_Edge(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().setBefore(getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getLink().setAfter(getNewTarget());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected GeneralOrdering getLink() {
- return (GeneralOrdering) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected OccurrenceSpecification getOldSource() {
- return (OccurrenceSpecification) oldEnd;
- }
-
- /**
- * @generated
- */
- protected OccurrenceSpecification getNewSource() {
- return (OccurrenceSpecification) newEnd;
- }
-
- /**
- * @generated
- */
- protected OccurrenceSpecification getOldTarget() {
- return (OccurrenceSpecification) oldEnd;
- }
-
- /**
- * @generated
- */
- protected OccurrenceSpecification getNewTarget() {
- return (OccurrenceSpecification) newEnd;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java
index 2b4c7fa455b..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java
@@ -1,141 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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 InteractionCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public InteractionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static InteractionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new InteractionCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public InteractionCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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.getFor(target).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_Shape(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java
index 5d6785f41da..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java
@@ -1,142 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.CombinedFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InteractionOperandCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public InteractionOperandCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static InteractionOperandCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new InteractionOperandCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public InteractionOperandCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteractionOperand());
- return data.isPermitted();
- }
-
- /**
- * Generated not for add combined fragment's covered lifelines on interaction operand
- *
- * @generated
- */
- @Override
- @SuppressWarnings({ "unchecked" })
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- InteractionOperand newElement = UMLFactory.eINSTANCE.createInteractionOperand();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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 {
- CombinedFragment qualifiedTarget = (CombinedFragment) target;
- qualifiedTarget.getOperands().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(InteractionOperand 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java
index cac5d8b2d00..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java
@@ -1,145 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionUse;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InteractionUseCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public InteractionUseCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static InteractionUseCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new InteractionUseCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public InteractionUseCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteractionUse());
- return data.isPermitted();
- }
-
- /**
- * Handle creation on InteractionOperand
- *
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- InteractionUse newElement = UMLFactory.eINSTANCE.createInteractionUse();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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 {
- Interaction qualifiedTarget = (Interaction) target;
- qualifiedTarget.getFragments().add(newElement);
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
- ElementInitializers.getInstance().init_InteractionUse_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(InteractionUse 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java
index f7323008a42..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java
@@ -1,145 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class LifelineCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public LifelineCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static LifelineCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new LifelineCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public LifelineCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * Add generated NOT to constrain the creation of a lifeline
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLifeline());
- return data.isPermitted();
- }
-
- /**
- * Generated not for add lifelines on lifeline
- *
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Lifeline newElement = UMLFactory.eINSTANCE.createLifeline();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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 {
- Interaction qualifiedTarget = (Interaction) target;
- qualifiedTarget.getLifelines().add(newElement);
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
- ElementInitializers.getInstance().init_Lifeline_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Lifeline 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2CreateCommand.java
deleted file mode 100644
index 6b69c359691..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2CreateCommand.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message2CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message2CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_AsynchEdge(getContainer(), getSource(), getTarget());
- }
-
- /**
- * added code to create the gate , message occurence and event when a Async message is created.
- *
- * @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$
- }
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message 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 Element getSource() {
- return (Element) source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element) target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction 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 Interaction) {
- return (Interaction) element;
- }
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2ReorientCommand.java
deleted file mode 100644
index f6f48c375aa..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2ReorientCommand.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message2ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message2ReorientCommand(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 Message) {
- 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 Element)) {
- return false;
- }
- if (getLink().getOwnedElements().size() != 1) {
- return false;
- }
- Element target = getLink().getOwnedElements().get(0);
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_AsynchEdge(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_AsynchEdge(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 {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element) 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3CreateCommand.java
deleted file mode 100644
index 59147880de9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3CreateCommand.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message3CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message3CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_ReplyEdge(getContainer(), getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @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$
- }
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message 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 Element getSource() {
- return (Element) source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element) target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction 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 Interaction) {
- return (Interaction) element;
- }
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3ReorientCommand.java
deleted file mode 100644
index e4b75e905a1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3ReorientCommand.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message3ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message3ReorientCommand(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 Message) {
- 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 Element)) {
- return false;
- }
- if (getLink().getOwnedElements().size() != 1) {
- return false;
- }
- Element target = getLink().getOwnedElements().get(0);
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_ReplyEdge(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_ReplyEdge(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 {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element) 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4CreateCommand.java
deleted file mode 100644
index 63e8f30a3a8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4CreateCommand.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message4CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message4CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_CreateEdge(getContainer(), getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @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$
- }
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message 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 Element getSource() {
- return (Element) source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element) target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction 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 Interaction) {
- return (Interaction) element;
- }
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4ReorientCommand.java
deleted file mode 100644
index e45297d4b16..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4ReorientCommand.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message4ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message4ReorientCommand(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 Message) {
- 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 Element)) {
- return false;
- }
- if (getLink().getOwnedElements().size() != 1) {
- return false;
- }
- Element target = getLink().getOwnedElements().get(0);
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_CreateEdge(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_CreateEdge(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 {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element) 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5CreateCommand.java
deleted file mode 100644
index fa4d6c3de65..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5CreateCommand.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message5CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message5CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_DeleteEdge(getContainer(), getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @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$
- }
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message 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 Element getSource() {
- return (Element) source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element) target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction 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 Interaction) {
- return (Interaction) element;
- }
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5ReorientCommand.java
deleted file mode 100644
index 12c07aefe83..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5ReorientCommand.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message5ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message5ReorientCommand(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 Message) {
- 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 Element)) {
- return false;
- }
- if (getLink().getOwnedElements().size() != 1) {
- return false;
- }
- Element target = getLink().getOwnedElements().get(0);
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_DeleteEdge(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_DeleteEdge(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 {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element) 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6CreateCommand.java
deleted file mode 100644
index f6c16cd0ff8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6CreateCommand.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message6CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message6CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_LostEdge(getContainer(), getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @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$
- }
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message 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 Element getSource() {
- return (Element) source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element) target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction 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 Interaction) {
- return (Interaction) element;
- }
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6ReorientCommand.java
deleted file mode 100644
index 831f8dd0bb4..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6ReorientCommand.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message6ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message6ReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * Block reorient target
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (false == getElementToEdit() instanceof Message) {
- 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 Element)) {
- return false;
- }
- if (getLink().getOwnedElements().size() != 1) {
- return false;
- }
- Element target = getLink().getOwnedElements().get(0);
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_LostEdge(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_LostEdge(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 {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element) 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7CreateCommand.java
deleted file mode 100644
index 3ab2b4daff1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7CreateCommand.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message7CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message7CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_FoundEdge(getContainer(), getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @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$
- }
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message 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 Element getSource() {
- return (Element) source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element) target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction 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 Interaction) {
- return (Interaction) element;
- }
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7ReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7ReorientCommand.java
deleted file mode 100644
index 8002654fe90..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7ReorientCommand.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message7ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message7ReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * Block reorient source
- *
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (false == getElementToEdit() instanceof Message) {
- 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 Element)) {
- return false;
- }
- if (getLink().getOwnedElements().size() != 1) {
- return false;
- }
- Element target = getLink().getOwnedElements().get(0);
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_FoundEdge(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_FoundEdge(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 {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element) 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageCreateCommand.java
deleted file mode 100644
index 19b125cf418..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageCreateCommand.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.util.MessageConnectionHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class MessageCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public MessageCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated NOT special handling of SyncMessages due to #425666
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Element) {
- 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
- if (getContainer() == null) {
- return false;
- }
- return MessageConnectionHelper.canExist(MessageSort.SYNCH_CALL_LITERAL, (Element) source, (Element) target);
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @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$
- }
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message 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 Element getSource() {
- return (Element) source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element) target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction 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 Interaction) {
- return (Interaction) element;
- }
- }
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageReorientCommand.java
deleted file mode 100644
index 71e30e4c60f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageReorientCommand.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.util.MessageConnectionHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class MessageReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public MessageReorientCommand(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 Message) {
- return false;
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated NOT special handling of SyncMessages due to #425666
- */
- protected boolean canReorientSource() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element target = getLink().getReceiveEvent();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- return MessageConnectionHelper.canExist(getLink(), MessageSort.SYNCH_CALL_LITERAL, getNewSource(), target);
- }
-
- /**
- * @generated NOT special handling of SyncMessages due to #425666
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getSendEvent();
- if (!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- return MessageConnectionHelper.canExist(getLink(), MessageSort.SYNCH_CALL_LITERAL, 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 {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element) 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java
index ff05ad2b6ed..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java
@@ -1,143 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.StateInvariant;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class StateInvariantCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public StateInvariantCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static StateInvariantCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new StateInvariantCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @generated
- */
- public StateInvariantCreateCommand(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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStateInvariant());
- return data.isPermitted();
- }
-
- /**
- * The StateInvariant is created on the lifeline and not on its container
- *
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- StateInvariant newElement = UMLFactory.eINSTANCE.createStateInvariant();
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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 {
- Interaction qualifiedTarget = (Interaction) target;
- qualifiedTarget.getFragments().add(newElement);
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
- ElementInitializers.getInstance().init_StateInvariant_Shape(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(StateInvariant 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java
index e0fb7510bcf..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java
@@ -1,141 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public TimeConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static TimeConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new TimeConstraintCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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.getFor(target).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_Shape(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java
index a377a6ccf29..e69de29bb2d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java
@@ -1,141 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.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
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public TimeObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.diagram = diagram;
- }
-
- /**
- * @generated
- */
- public static TimeObservationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
- return new TimeObservationCreateCommand(req, eObject, diagram);
- }
-
- /**
- * @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();
- }
- if (container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getFor(target).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.getFor(target).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_Shape(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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/UMLReorientConnectionViewCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/UMLReorientConnectionViewCommand.java
deleted file mode 100644
index d26a166484e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/UMLReorientConnectionViewCommand.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class UMLReorientConnectionViewCommand extends AbstractTransactionalCommand {
-
- /**
- * @generated
- */
- private IAdaptable edgeAdaptor;
-
- /**
- * @generated
- */
- public UMLReorientConnectionViewCommand(TransactionalEditingDomain editingDomain, String label) {
- super(editingDomain, label, null);
- }
-
- /**
- * @generated
- */
- @Override
- public List getAffectedFiles() {
- View view = edgeAdaptor.getAdapter(View.class);
- if (view != null) {
- return getWorkspaceFiles(view);
- }
- return super.getAffectedFiles();
- }
-
- /**
- * @generated
- */
- public IAdaptable getEdgeAdaptor() {
- return edgeAdaptor;
- }
-
- /**
- * @generated
- */
- public void setEdgeAdaptor(IAdaptable edgeAdaptor) {
- this.edgeAdaptor = edgeAdaptor;
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) {
- assert null != edgeAdaptor : "Null child in UMLReorientConnectionViewCommand"; //$NON-NLS-1$
- Edge edge = getEdgeAdaptor().getAdapter(Edge.class);
- assert null != edge : "Null edge in UMLReorientConnectionViewCommand"; //$NON-NLS-1$
- View tempView = edge.getSource();
- edge.setSource(edge.getTarget());
- edge.setTarget(tempView);
- return CommandResult.newOKCommandResult();
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ActionExecutionSpecificationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ActionExecutionSpecificationEditHelper.java
deleted file mode 100644
index bbe8c490ae2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ActionExecutionSpecificationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class ActionExecutionSpecificationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/BehaviorExecutionSpecificationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/BehaviorExecutionSpecificationEditHelper.java
deleted file mode 100644
index 8798e11d537..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/BehaviorExecutionSpecificationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class BehaviorExecutionSpecificationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConsiderIgnoreFragmentEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConsiderIgnoreFragmentEditHelper.java
deleted file mode 100644
index 3ccd2241568..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConsiderIgnoreFragmentEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class ConsiderIgnoreFragmentEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ContinuationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ContinuationEditHelper.java
deleted file mode 100644
index ab18408700d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ContinuationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class ContinuationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DestructionEventEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DestructionEventEditHelper.java
deleted file mode 100644
index f59a4183fad..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DestructionEventEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class DestructionEventEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintEditHelper.java
deleted file mode 100644
index d4e543b07f0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class DurationConstraintEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintInMessageEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintInMessageEditHelper.java
deleted file mode 100644
index f5ec0b3d030..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintInMessageEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class DurationConstraintInMessageEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationObservationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationObservationEditHelper.java
deleted file mode 100644
index a8248f76e8b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationObservationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class DurationObservationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/GeneralOrderingEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/GeneralOrderingEditHelper.java
deleted file mode 100644
index 2d5b1e6efe1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/GeneralOrderingEditHelper.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class GeneralOrderingEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionEditHelper.java
deleted file mode 100644
index bfcb5a3ae2b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class InteractionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionOperandEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionOperandEditHelper.java
deleted file mode 100644
index 506af37b50f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionOperandEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class InteractionOperandEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionUseEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionUseEditHelper.java
deleted file mode 100644
index 2fa9accdbf2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionUseEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class InteractionUseEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/LifelineEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/LifelineEditHelper.java
deleted file mode 100644
index 6e478c87adf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/LifelineEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class LifelineEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageOccurrenceSpecificationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageOccurrenceSpecificationEditHelper.java
deleted file mode 100644
index 79a7e4a8720..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageOccurrenceSpecificationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class MessageOccurrenceSpecificationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/PackageEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/PackageEditHelper.java
deleted file mode 100644
index fa9a72504c1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/PackageEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class PackageEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/StateInvariantEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/StateInvariantEditHelper.java
deleted file mode 100644
index 7435eb98b8f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/StateInvariantEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class StateInvariantEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeConstraintEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeConstraintEditHelper.java
deleted file mode 100644
index 0f80b723a66..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeConstraintEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class TimeConstraintEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeObservationEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeObservationEditHelper.java
deleted file mode 100644
index 1d351c04388..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeObservationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class TimeObservationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java
index b81de56130b..d205031f207 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.helpers.GeneratedEditHelperBase;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java
index 36e72cb592b..bdcfa5d8ec8 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -19,7 +31,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
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.sequence.edit.policies.ActionExecutionSpecificationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ElementCreationWithMessageEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy;
import org.eclipse.swt.graphics.Color;
@@ -63,12 +74,22 @@ public class ActionExecutionSpecificationEditPart extends AbstractExecutionSpeci
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ElementCreationWithMessageEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ExecutionSpecificationComponentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActionExecutionSpecificationItemSemanticEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
}
/**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
* @generated
*/
protected LayoutEditPolicy createLayoutEditPolicy() {
@@ -97,27 +118,21 @@ public class ActionExecutionSpecificationEditPart extends AbstractExecutionSpeci
}
/**
- *Papyrus codeGen
- *@generated
- **/
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
* @generated
*/
+ @Override
protected IFigure createNodeShape() {
- return primaryShape = new AbstractExecutionSpecificationEditPart.ExecutionSpecificationRectangleFigure();
+ return primaryShape = new ExecutionSpecificationRectangleFigure(this);
}
/**
+*
* org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpecificationEditPart.ExecutionSpecificationRectangleFigure
+ *
* @generated
*/
- public AbstractExecutionSpecificationEditPart.ExecutionSpecificationRectangleFigure getPrimaryShape() {
- return (AbstractExecutionSpecificationEditPart.ExecutionSpecificationRectangleFigure) primaryShape;
+ public ExecutionSpecificationRectangleFigure getPrimaryShape() {
+ return (ExecutionSpecificationRectangleFigure) primaryShape;
}
/**
@@ -148,6 +163,7 @@ public class ActionExecutionSpecificationEditPart extends AbstractExecutionSpeci
*
* @generated
*/
+ @Override
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java
index 82c7556b152..c34d56c3831 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -19,7 +31,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
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.sequence.edit.policies.BehaviorExecutionSpecificationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ElementCreationWithMessageEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy;
import org.eclipse.swt.graphics.Color;
@@ -63,7 +74,6 @@ public class BehaviorExecutionSpecificationEditPart extends AbstractExecutionSpe
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ElementCreationWithMessageEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ExecutionSpecificationComponentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BehaviorExecutionSpecificationItemSemanticEditPolicy());
// 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);
}
@@ -109,16 +119,15 @@ public class BehaviorExecutionSpecificationEditPart extends AbstractExecutionSpe
* @generated
*/
protected IFigure createNodeShape() {
- return primaryShape = new AbstractExecutionSpecificationEditPart.ExecutionSpecificationRectangleFigure();
- }
+ return primaryShape = new ExecutionSpecificationRectangleFigure(this);
+}
/**
* org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpecificationEditPart.ExecutionSpecificationRectangleFigure
* @generated
*/
- public AbstractExecutionSpecificationEditPart.ExecutionSpecificationRectangleFigure getPrimaryShape() {
- return (AbstractExecutionSpecificationEditPart.ExecutionSpecificationRectangleFigure) primaryShape;
- }
+ public ExecutionSpecificationRectangleFigure getPrimaryShape() {
+ return (ExecutionSpecificationRectangleFigure) primaryShape; }
/**
* @generated
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java
index c19943946fc..d982ec0c33c 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -18,7 +30,6 @@ 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.sequence.edit.policies.CombinedFragment2ItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.CoRegionCombinedFragmentFigure;
import org.eclipse.swt.graphics.Color;
@@ -61,7 +72,6 @@ public class CombinedFragment2EditPart extends RoundedCompartmentEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new LifelineChildGraphicalNodeEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CombinedFragment2ItemSemanticEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
}
@@ -95,9 +105,10 @@ public class CombinedFragment2EditPart extends RoundedCompartmentEditPart {
}
/**
- *Papyrus codeGen
- *@generated
- **/
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
@@ -112,6 +123,8 @@ public class CombinedFragment2EditPart extends RoundedCompartmentEditPart {
/**
* org.eclipse.papyrus.uml.diagram.sequence.figures.CoRegionCombinedFragmentFigure
+ * org.eclipse.papyrus.uml.diagram.sequence.figures.CoRegionCombinedFragmentFigure
+ *
* @generated
*/
public CoRegionCombinedFragmentFigure getPrimaryShape() {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentCombinedFragmentCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentCombinedFragmentCompartmentEditPart.java
index 8802923233e..99b1857b3c5 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentCombinedFragmentCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentCombinedFragmentCompartmentEditPart.java
@@ -1,25 +1,46 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
+import java.util.Iterator;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
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.commands.SetBoundsCommand;
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.figures.ResizableCompartmentFigure;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.GMFtoGEFCommandWrapper;
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.sequence.edit.policies.CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.GrillingBasedXYLayoutEditPolicy;
/**
* @generated
@@ -70,11 +91,10 @@ public class CombinedFragmentCombinedFragmentCompartmentEditPart extends ListCom
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
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCombinedFragmentCompartmentCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GrillingBasedXYLayoutEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCombinedFragmentCompartmentCanonicalEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
- new CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy());
}
/**
@@ -89,6 +109,7 @@ public class CombinedFragmentCombinedFragmentCompartmentEditPart extends ListCom
/**
* @generated
*/
+ @Override
public EditPart getTargetEditPart(Request request) {
return super.getTargetEditPart(request);
@@ -128,4 +149,42 @@ public class CombinedFragmentCombinedFragmentCompartmentEditPart extends ListCom
super.refreshVisuals();
refreshBounds();
}
+
+ /**
+ * @see GraphicalEditPart#setLayoutConstraint(EditPart, IFigure, Object)
+ */
+ public void setLayoutConstraint(EditPart child, IFigure childFigure,
+ Object constraint) {
+//1 get all childrsize of childreen
+ double size =0.0;
+ Node currentNode = (Node)getNotationView();
+ for (Iterator iterator = currentNode.getChildren().iterator(); iterator.hasNext();) {
+ Node view = (Node) iterator.next();
+ if( view.getLayoutConstraint() instanceof Bounds){
+ if(((Bounds)view.getLayoutConstraint()).getHeight()==-1){
+ size= size+40;
+ }
+ else{
+ size= size+((Bounds)view.getLayoutConstraint()).getHeight();
+ }
+ }
+
+ }
+
+ if( currentNode.getLayoutConstraint() instanceof Bounds){
+ Bounds newBounds=((Bounds)currentNode.getLayoutConstraint());
+ if( size>((Bounds)currentNode.getLayoutConstraint()).getHeight()){
+ //executeCommand(new GMFtoGEFCommandWrapper( new SetBoundsCommand(getEditingDomain(), "resize", new EObjectAdapter(currentNode), new Dimension(newBounds.getWidth(),(int)size))));
+ }
+ }
+
+
+
+ PrecisionRectangle bounds=new PrecisionRectangle(getFigure().getBounds());
+ if(constraint instanceof Rectangle){
+ double ratio= ((double)((Rectangle)constraint).height)/bounds.height;
+ System.out.println("Ratio:"+ratio);
+ childFigure.getParent().setConstraint(childFigure, ratio);
+ }
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentEditPart.java
index cbda74aa8da..464f575139e 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -25,11 +37,11 @@ import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNode
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentItemComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDSequenceGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.CombinedFragmentFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.ConnectNodeToGridEditPolicy;
import org.eclipse.swt.graphics.Color;
/**
@@ -70,11 +82,10 @@ public class CombinedFragmentEditPart extends InteractionFragmentEditPart {
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new CombinedFragmentItemComponentEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY,
new ShowHideCompartmentEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new SequenceGraphicalNodeEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CombinedFragmentItemSemanticEditPolicy());
+ installEditPolicy(ConnectNodeToGridEditPolicy.CONNECT_TO_GRILLING_MANAGEMENT, new ConnectNodeToGridEditPolicy());
+ //installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new OLDSequenceGraphicalNodeEditPolicy());
// 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);
}
@@ -119,6 +130,7 @@ public class CombinedFragmentEditPart extends InteractionFragmentEditPart {
/**
* @generated
*/
+ @Override
protected IFigure createNodeShape() {
return primaryShape = new CombinedFragmentFigure();
}
@@ -127,6 +139,7 @@ public class CombinedFragmentEditPart extends InteractionFragmentEditPart {
* org.eclipse.papyrus.uml.diagram.sequence.figures.CombinedFragmentFigure
* @generated
*/
+ @Override
public CombinedFragmentFigure getPrimaryShape() {
return (CombinedFragmentFigure) primaryShape;
}
@@ -138,7 +151,7 @@ public class CombinedFragmentEditPart extends InteractionFragmentEditPart {
if (childEditPart instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((CombinedFragmentCombinedFragmentCompartmentEditPart) childEditPart).getFigure());
return true;
}
@@ -191,6 +204,7 @@ public class CombinedFragmentEditPart extends InteractionFragmentEditPart {
/**
* @generated
*/
+ @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -215,6 +229,7 @@ public class CombinedFragmentEditPart extends InteractionFragmentEditPart {
* @param nodeShape instance of generated figure class
* @generated
*/
+ @Override
protected IFigure setupContentPane(IFigure nodeShape) {
if (nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
@@ -274,5 +289,4 @@ public class CombinedFragmentEditPart extends InteractionFragmentEditPart {
}
return super.getTargetEditPart(request);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentAnnotatedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentAnnotatedElementEditPart.java
index f45f1526ab2..4aa5f5549a2 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentAnnotatedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentAnnotatedElementEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.Connection;
@@ -5,11 +17,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.sequence.edit.policies.CommentAnnotatedElementItemSemanticEditPolicy;
/**
- * @generated
- */
+ * @generated
+ */
public class CommentAnnotatedElementEditPart extends AnnotatedLinkEditPart implements ITreeBranchEditPart {
/**
@@ -30,7 +41,6 @@ public class CommentAnnotatedElementEditPart extends AnnotatedLinkEditPart imple
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentAnnotatedElementItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentBodyEditPart.java
index d0d2fa95dc3..2a58d86d9d8 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentBodyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentBodyEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -49,7 +61,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditP
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
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;
@@ -122,7 +133,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy());
}
/**
@@ -205,6 +216,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentEditPart.java
index d24d524b296..ca27c2ee0d2 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -24,7 +36,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.sequence.edit.policies.CommentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -70,7 +81,6 @@ public class CommentEditPart extends AbstractCommentEditPart {
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusReflowableShapeEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentItemSemanticEditPolicy());
// 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConsiderIgnoreFragmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConsiderIgnoreFragmentEditPart.java
index 1b9f85fbfaf..192cbf49bef 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConsiderIgnoreFragmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConsiderIgnoreFragmentEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -19,7 +31,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNode
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentItemComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ConsiderIgnoreFragmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.CombinedFragmentFigure;
import org.eclipse.swt.graphics.Color;
@@ -63,7 +74,6 @@ public class ConsiderIgnoreFragmentEditPart extends CombinedFragmentEditPart {
installEditPolicy(EditPolicy.COMPONENT_ROLE, new CombinedFragmentItemComponentEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY,
new ShowHideCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConsiderIgnoreFragmentItemSemanticEditPolicy());
// 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Constraint2EditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Constraint2EditPart.java
index 6c949bb9e3b..3bafa516ec3 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Constraint2EditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Constraint2EditPart.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -30,6 +41,7 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
@@ -49,7 +61,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditP
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
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;
@@ -205,6 +216,7 @@ public class Constraint2EditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintConstrainedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintConstrainedElementEditPart.java
index 93abb2e5fb1..5a963680d92 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintConstrainedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintConstrainedElementEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.Connection;
@@ -5,7 +17,6 @@ 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.sequence.edit.policies.ConstraintConstrainedElementItemSemanticEditPolicy;
/**
* @generated
@@ -30,7 +41,6 @@ public class ConstraintConstrainedElementEditPart extends AnnotatedLinkEditPart
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintConstrainedElementItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintContextAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintContextAppliedStereotypeEditPart.java
index 018d06b2d27..96bd79bf5fa 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintContextAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintContextAppliedStereotypeEditPart.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintEditPart.java
index abf3f98a3ee..2b0a2dae6af 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -23,7 +35,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.sequence.edit.policies.ConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -66,7 +77,6 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintItemSemanticEditPolicy());
// 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintNameEditPart.java
index 202a3a6aa91..4372faef206 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintNameEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -30,6 +42,7 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
@@ -49,7 +62,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditP
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
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;
@@ -98,6 +110,8 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
+
+ *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
@@ -205,6 +219,7 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
@@ -661,6 +676,7 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart
/**
* Initializes the extended editor configuration
+ *
* @generated
*/
protected void initExtendedEditorConfiguration() {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContextLinkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContextLinkEditPart.java
index 83efe2f9fc3..711540a20da 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContextLinkEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContextLinkEditPart.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.Connection;
@@ -8,7 +19,6 @@ 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.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ContextLinkItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.CustomContextLinkFigure;
@@ -37,7 +47,6 @@ public class ContextLinkEditPart extends ConnectionEditPart implements ITreeBran
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ContextLinkItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationEditPart.java
index 8247205cec8..d9d3b1c76d4 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -19,7 +31,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNod
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.uml.diagram.sequence.edit.policies.ContinuationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.ContinuationFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -62,7 +73,6 @@ public class ContinuationEditPart extends AbstractBorderItemEditPart {
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ContinuationItemSemanticEditPolicy());
// 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationNameEditPart.java
index c7329aa920c..612a5c66250 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationNameEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -31,6 +43,7 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
@@ -102,6 +115,8 @@ public class ContinuationNameEditPart extends PapyrusCompartmentEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
+
+ *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
@@ -209,6 +224,7 @@ public class ContinuationNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java
index 59ccd750820..4cb2e2a5161 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java
@@ -1,8 +1,20 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
@@ -19,8 +31,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNod
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.uml.diagram.sequence.edit.policies.DestructionEventComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DestructionOccurrenceSpecificationItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDDestructionEventComponentEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.DestructionEventFigure;
import org.eclipse.swt.graphics.Color;
@@ -62,9 +73,6 @@ public class DestructionOccurrenceSpecificationEditPart extends AbstractBorderIt
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new DestructionEventComponentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
- new DestructionOccurrenceSpecificationItemSemanticEditPolicy());
// 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java
index 9b7e9c11432..1a072d12e44 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java
index f3f003127ac..ee8548e1708 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -28,7 +40,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
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.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DurationConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.DurationConstraintFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -72,7 +83,6 @@ public class DurationConstraintEditPart extends BorderedBorderItemEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationConstraintItemSemanticEditPolicy());
// 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);
}
@@ -131,6 +141,8 @@ public class DurationConstraintEditPart extends BorderedBorderItemEditPart {
/**
* org.eclipse.papyrus.uml.diagram.sequence.figures.DurationConstraintFigure
+ * org.eclipse.papyrus.uml.diagram.sequence.figures.DurationConstraintFigure
+ *
* @generated
*/
public DurationConstraintFigure getPrimaryShape() {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java
index 8cdef087b37..1ea499529f1 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java
index ef40a72f9c7..addac3d1cb9 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -32,7 +44,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNode
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DurationConstraintInMessageItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MoveableNonResizableLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -77,7 +88,6 @@ public class DurationConstraintInMessageEditPart extends NodeEditPart {
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new MoveableNonResizableLabelEditPolicy());
installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationConstraintInMessageItemSemanticEditPolicy());
// 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);
}
@@ -129,6 +139,7 @@ public class DurationConstraintInMessageEditPart extends NodeEditPart {
/**
* @generated
*/
+ @Override
protected IFigure createNodeShape() {
return primaryShape = new RoundedCompartmentFigure();
}
@@ -137,6 +148,7 @@ public class DurationConstraintInMessageEditPart extends NodeEditPart {
* org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
+ @Override
public RoundedCompartmentFigure getPrimaryShape() {
return (RoundedCompartmentFigure) primaryShape;
}
@@ -209,6 +221,7 @@ public class DurationConstraintInMessageEditPart extends NodeEditPart {
/**
* @generated
*/
+ @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -233,6 +246,7 @@ public class DurationConstraintInMessageEditPart extends NodeEditPart {
* @param nodeShape instance of generated figure class
* @generated
*/
+ @Override
protected IFigure setupContentPane(IFigure nodeShape) {
if (nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java
index 6d76a0ee796..550faaeb825 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -98,6 +110,8 @@ public class DurationConstraintInMessageLabelEditPart extends PapyrusCompartment
/**
* direct edition mode (default, undefined, registered editor, etc.)
+
+ *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
@@ -206,6 +220,7 @@ public class DurationConstraintInMessageLabelEditPart extends PapyrusCompartment
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java
index 2f0fd0a6127..119caf394ea 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java
index fe63fb1cddc..b067dc9a4fd 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java
index 9b3a3372e70..3f86c54b3ff 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -32,7 +44,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNode
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DurationObservationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MoveableNonResizableLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -77,7 +88,6 @@ public class DurationObservationEditPart extends NodeEditPart {
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new MoveableNonResizableLabelEditPolicy());
installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationObservationItemSemanticEditPolicy());
// 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);
}
@@ -129,6 +139,7 @@ public class DurationObservationEditPart extends NodeEditPart {
/**
* @generated
*/
+ @Override
protected IFigure createNodeShape() {
return primaryShape = new RoundedCompartmentFigure();
}
@@ -137,6 +148,7 @@ public class DurationObservationEditPart extends NodeEditPart {
* org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure
* @generated
*/
+ @Override
public RoundedCompartmentFigure getPrimaryShape() {
return (RoundedCompartmentFigure) primaryShape;
}
@@ -209,6 +221,7 @@ public class DurationObservationEditPart extends NodeEditPart {
/**
* @generated
*/
+ @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -233,6 +246,7 @@ public class DurationObservationEditPart extends NodeEditPart {
* @param nodeShape instance of generated figure class
* @generated
*/
+ @Override
protected IFigure setupContentPane(IFigure nodeShape) {
if (nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java
index 0c3df0257af..32df8d4ff7d 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -30,6 +42,7 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
@@ -49,7 +62,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditP
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
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;
@@ -206,6 +218,7 @@ public class DurationObservationLabelEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingAppliedStereotypeEditPart.java
index 826f8b8a037..dff4badc423 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingAppliedStereotypeEditPart.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -228,6 +239,7 @@ public class GeneralOrderingAppliedStereotypeEditPart extends PapyrusLabelEditPa
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingEditPart.java
index c86e05aeb3c..b3c71f1ed2d 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingEditPart.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.Connection;
@@ -8,7 +19,6 @@ 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.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.GeneralOrderingItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.GeneralOrderingDescriptor;
/**
@@ -36,7 +46,6 @@ public class GeneralOrderingEditPart extends ConnectionNodeEditPart implements I
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new GeneralOrderingItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionEditPart.java
index f95ef93343c..116d9262da4 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionEditPart.java
@@ -1,6 +1,19 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
@@ -14,24 +27,24 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.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.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.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.InteractionRectangleFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomInteractionContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDSequenceGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class InteractionEditPart extends NodeEditPart {
+public class InteractionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -66,19 +79,29 @@ public class InteractionEditPart extends NodeEditPart {
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.sequence.edit.policies.InteractionCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new SequenceGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.InteractionGraphicalNodeEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY,
new ShowHideCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInteractionContextLinkSemanticEditPolicy());
// 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);
}
/**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#getCommand(org.eclipse.gef.Request)
+ *
+ * @param _request
+ * @return
+ */
+ @Override
+ public Command getCommand(Request _request) {
+ // TODO Auto-generated method stub
+ return super.getCommand(_request);
+ }
+ /**
* @generated
*/
protected LayoutEditPolicy createLayoutEditPolicy() {
@@ -107,8 +130,19 @@ public class InteractionEditPart extends NodeEditPart {
}
/**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
* @generated
*/
+ @Override
protected IFigure createNodeShape() {
return primaryShape = new InteractionRectangleFigure();
}
@@ -117,6 +151,7 @@ public class InteractionEditPart extends NodeEditPart {
* org.eclipse.papyrus.uml.diagram.common.figure.node.InteractionRectangleFigure
* @generated
*/
+ @Override
public InteractionRectangleFigure getPrimaryShape() {
return (InteractionRectangleFigure) primaryShape;
}
@@ -126,13 +161,13 @@ public class InteractionEditPart extends NodeEditPart {
*/
protected boolean addFixedChild(EditPart childEditPart) {
if (childEditPart instanceof InteractionNameEditPart) {
- ((InteractionNameEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderLabel());
+ ((InteractionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
if (childEditPart instanceof InteractionInteractionCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((InteractionInteractionCompartmentEditPart) childEditPart).getFigure());
return true;
}
@@ -188,6 +223,7 @@ public class InteractionEditPart extends NodeEditPart {
/**
* @generated
*/
+ @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(857, 757);
return result;
@@ -212,6 +248,7 @@ public class InteractionEditPart extends NodeEditPart {
* @param nodeShape instance of generated figure class
* @generated
*/
+ @Override
protected IFigure setupContentPane(IFigure nodeShape) {
if (nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionInteractionCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionInteractionCompartmentEditPart.java
index 00e25af2bc2..8e96b42b7bf 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionInteractionCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionInteractionCompartmentEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -15,16 +27,14 @@ import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.linklf.LinkLFShapeCompartmentEditPart;
+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.infra.gmfdiag.tooling.runtime.linklf.LinkLFShapeCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionCompartmentXYLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionInteractionCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.RemoveOrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.GrillingBasedXYLayoutEditPolicy;
/**
* @generated
@@ -68,14 +78,13 @@ public class InteractionInteractionCompartmentEditPart extends LinkLFShapeCompar
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
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionInteractionCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionInteractionCompartmentCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new InteractionCompartmentXYLayoutEditPolicy());
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GrillingBasedXYLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CombinedFragmentCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionInteractionCompartmentItemSemanticEditPolicy());
+
}
/**
@@ -90,6 +99,7 @@ public class InteractionInteractionCompartmentEditPart extends LinkLFShapeCompar
/**
* @generated
*/
+ @Override
public EditPart getTargetEditPart(Request request) {
return super.getTargetEditPart(request);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionNameEditPart.java
index 756aee349ce..44b9666fa99 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionNameEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -30,6 +42,7 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
@@ -49,7 +62,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditP
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
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;
@@ -205,6 +217,7 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandEditPart.java
index 9966abce6ba..f6c86d20ddf 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -26,8 +38,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCr
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandComponentEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic.CustomInteractionOperandContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDSequenceGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionOperandFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -70,16 +81,15 @@ public class InteractionOperandEditPart extends RoundedCompartmentEditPart {
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.sequence.edit.policies.InteractionOperandCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new InteractionOperandLayoutEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new InteractionOperandDragDropEditPolicy());
installEditPolicy(EditPolicy.COMPONENT_ROLE, new InteractionOperandComponentEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CombinedFragmentCreationEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new SequenceGraphicalNodeEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInteractionOperandContextLinkSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new OLDSequenceGraphicalNodeEditPolicy());
// 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);
}
@@ -132,6 +142,7 @@ public class InteractionOperandEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
+ @Override
protected IFigure createNodeShape() {
return primaryShape = new InteractionOperandFigure();
}
@@ -140,6 +151,7 @@ public class InteractionOperandEditPart extends RoundedCompartmentEditPart {
* org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionOperandFigure
* @generated
*/
+ @Override
public InteractionOperandFigure getPrimaryShape() {
return (InteractionOperandFigure) primaryShape;
}
@@ -147,6 +159,7 @@ public class InteractionOperandEditPart extends RoundedCompartmentEditPart {
/**
* @generated
*/
+ @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -171,6 +184,7 @@ public class InteractionOperandEditPart extends RoundedCompartmentEditPart {
* @param nodeShape instance of generated figure class
* @generated
*/
+ @Override
protected IFigure setupContentPane(IFigure nodeShape) {
if (nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseEditPart.java
index 0ed0d6604fe..5387abaa035 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -19,7 +31,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
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.sequence.edit.policies.InteractionUseItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OpenDiagramEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionUseRectangleFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
@@ -63,7 +74,6 @@ public class InteractionUseEditPart extends InteractionFragmentEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionUseItemSemanticEditPolicy());
// 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);
}
@@ -108,6 +118,7 @@ public class InteractionUseEditPart extends InteractionFragmentEditPart {
/**
* @generated
*/
+ @Override
protected IFigure createNodeShape() {
return primaryShape = new InteractionUseRectangleFigure();
}
@@ -116,6 +127,7 @@ public class InteractionUseEditPart extends InteractionFragmentEditPart {
* org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionUseRectangleFigure
* @generated
*/
+ @Override
public InteractionUseRectangleFigure getPrimaryShape() {
return (InteractionUseRectangleFigure) primaryShape;
}
@@ -125,7 +137,7 @@ public class InteractionUseEditPart extends InteractionFragmentEditPart {
*/
protected boolean addFixedChild(EditPart childEditPart) {
if (childEditPart instanceof InteractionUseNameEditPart) {
- ((InteractionUseNameEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderLabel());
+ ((InteractionUseNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
if (childEditPart instanceof InteractionUseName2EditPart) {
@@ -179,6 +191,7 @@ public class InteractionUseEditPart extends InteractionFragmentEditPart {
/**
* @generated
*/
+ @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
@@ -203,6 +216,7 @@ public class InteractionUseEditPart extends InteractionFragmentEditPart {
* @param nodeShape instance of generated figure class
* @generated
*/
+ @Override
protected IFigure setupContentPane(IFigure nodeShape) {
if (nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseName2EditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseName2EditPart.java
index ca7ade0d71e..74e37fc38f9 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseName2EditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseName2EditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -30,6 +42,7 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
@@ -49,7 +62,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditP
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
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;
@@ -205,6 +217,7 @@ public class InteractionUseName2EditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseNameEditPart.java
index 8500592f666..8f7642c6b99 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseNameEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -30,6 +42,7 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
@@ -49,7 +62,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditP
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
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;
@@ -205,6 +217,7 @@ public class InteractionUseNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java
index 3f1087e5511..f6345f3b96b 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -24,26 +36,29 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.SideAffixedNodesCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ElementCreationWithMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineAppliedStereotypeNodeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineXYLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.HighlightEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifeLineAffixedNodesCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDLifeLineLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDLifelineXYLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineFigure;
import org.eclipse.papyrus.uml.diagram.sequence.locator.CenterLocator;
import org.eclipse.papyrus.uml.diagram.sequence.locator.TimeMarkElementPositionLocator;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.ConnectLifeLineToGrillingEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.GrillingBasedResizableShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.GrillingBasedXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.LifeLineGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.LifeLineXYLayoutEditPolicy;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class LifelineEditPart extends NamedElementEditPart {
+public class LifelineEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -78,18 +93,20 @@ public class LifelineEditPart extends NamedElementEditPart {
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.sequence.edit.policies.LifelineCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new LifelineXYLayoutEditPolicy());
+ installEditPolicy(ConnectLifeLineToGrillingEditPolicy.CONNECT_TO_GRILLING_MANAGEMENT,
+ new ConnectLifeLineToGrillingEditPolicy());
+ installEditPolicy(LayoutEditPolicy.PRIMARY_DRAG_ROLE,
+ new GrillingBasedResizableShapeEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new LifelineCreationEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ElementCreationWithMessageEditPolicy());
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new LifelineAppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LifelineItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new LifeLineGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new LifeLineAffixedNodesCreationEditPolicy());
+ installEditPolicy(HighlightEditPolicy.HIGHLIGHT_ROLE, new HighlightEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new LifeLineXYLayoutEditPolicy());
+
// 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);
}
@@ -167,7 +184,7 @@ public class LifelineEditPart extends NamedElementEditPart {
return true;
}
- //Papyrus Gencode :Specific locator for the itemBorder of the lifeline.
+ // Papyrus Gencode :Specific locator for the itemBorder of the lifeline.
if (childEditPart instanceof StateInvariantEditPart) {
IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((StateInvariantEditPart) childEditPart).getFigure(),
@@ -175,7 +192,7 @@ public class LifelineEditPart extends NamedElementEditPart {
return true;
}
- //Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
+ // Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
if (childEditPart instanceof TimeConstraintEditPart) {
IBorderItemLocator locator = new TimeMarkElementPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((TimeConstraintEditPart) childEditPart).getFigure(),
@@ -183,7 +200,7 @@ public class LifelineEditPart extends NamedElementEditPart {
return true;
}
- //Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
+ // Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
if (childEditPart instanceof TimeObservationEditPart) {
IBorderItemLocator locator = new TimeMarkElementPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((TimeObservationEditPart) childEditPart).getFigure(),
@@ -191,7 +208,7 @@ public class LifelineEditPart extends NamedElementEditPart {
return true;
}
- //Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
+ // Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
if (childEditPart instanceof DurationConstraintEditPart) {
IBorderItemLocator locator = new TimeMarkElementPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((DurationConstraintEditPart) childEditPart).getFigure(),
@@ -199,7 +216,7 @@ public class LifelineEditPart extends NamedElementEditPart {
return true;
}
- //Papyrus Gencode :Specific locator for the itemBorder of the lifeline.
+ // Papyrus Gencode :Specific locator for the itemBorder of the lifeline.
if (childEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.SOUTH);
getBorderedFigure().getBorderItemContainer()
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineNameEditPart.java
index 6cd23837859..f9e1e84a621 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineNameEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -30,6 +42,7 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
@@ -49,7 +62,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditP
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
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;
@@ -98,6 +110,7 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart
/**
* direct edition mode (default, undefined, registered editor, etc.)
+ *
* @generated
*/
protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
@@ -205,6 +218,7 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncAppliedStereotypeEditPart.java
index fd328fa6e75..9598cf6c846 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -224,6 +236,7 @@ public class MessageAsyncAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncEditPart.java
index 18303be6c78..007bb7f4c36 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncEditPart.java
@@ -9,10 +9,11 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageAsyncItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDMessageConnectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageAsync;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.ConnectEdgeToGrillingEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.ConnectNodeToGrillingEditPolicy;
/**
* @generated
@@ -38,11 +39,11 @@ public class MessageAsyncEditPart extends AbstractMessageEditPart implements ITr
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
+ //installEditPolicy(EditPolicy.CONNECTION_ROLE, new OLDMessageConnectionEditPolicy());
installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MessageAsyncItemSemanticEditPolicy());
+ installEditPolicy(ConnectNodeToGrillingEditPolicy.CONNECT_TO_GRILLING_MANAGEMENT, new ConnectEdgeToGrillingEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateAppliedStereotypeEditPart.java
index b630c1f1f1c..c415041c42a 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -224,6 +236,7 @@ public class MessageCreateAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateEditPart.java
index 3ee0df0faab..9533ebe3002 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateEditPart.java
@@ -9,9 +9,8 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDMessageConnectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageCreateItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageCreate;
/**
@@ -38,11 +37,10 @@ public class MessageCreateEditPart extends AbstractMessageEditPart implements IT
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
+ //installEditPolicy(EditPolicy.CONNECTION_ROLE, new OLDMessageConnectionEditPolicy());
installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MessageCreateItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteAppliedStereotypeEditPart.java
index dc768b8b1ea..9eae87df3e1 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -224,6 +236,7 @@ public class MessageDeleteAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteEditPart.java
index 6c545e9f59c..bbcc28a2e87 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteEditPart.java
@@ -9,9 +9,8 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDMessageConnectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageDeleteItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageDelete;
/**
@@ -38,11 +37,10 @@ public class MessageDeleteEditPart extends AbstractMessageEditPart implements IT
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
+ //installEditPolicy(EditPolicy.CONNECTION_ROLE, new OLDMessageConnectionEditPolicy());
installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MessageDeleteItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java
index b629d1b3b56..5c0e879068e 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -228,6 +240,7 @@ public class MessageFoundAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundEditPart.java
index b0227bf0229..ddefb17b8c4 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundEditPart.java
@@ -9,9 +9,8 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDMessageConnectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageFoundItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageFound;
/**
@@ -38,11 +37,10 @@ public class MessageFoundEditPart extends AbstractMessageEditPart implements ITr
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
+ //installEditPolicy(EditPolicy.CONNECTION_ROLE, new OLDMessageConnectionEditPolicy());
installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MessageFoundItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostAppliedStereotypeEditPart.java
index 22e55d59c3c..589063812f7 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostEditPart.java
index f794214ce56..803c7925b7d 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostEditPart.java
@@ -9,9 +9,8 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDMessageConnectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageLostItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageLost;
/**
@@ -38,11 +37,10 @@ public class MessageLostEditPart extends AbstractMessageEditPart implements ITre
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
+ //installEditPolicy(EditPolicy.CONNECTION_ROLE, new OLDMessageConnectionEditPolicy());
installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MessageLostItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyAppliedStereotypeEditPart.java
index 7f6c79aad13..f6291445ee4 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -224,6 +236,7 @@ public class MessageReplyAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyEditPart.java
index 17559458961..42e906f5bc1 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyEditPart.java
@@ -9,9 +9,8 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDMessageConnectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageReplyItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageReply;
/**
@@ -38,11 +37,10 @@ public class MessageReplyEditPart extends AbstractMessageEditPart implements ITr
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
+ //installEditPolicy(EditPolicy.CONNECTION_ROLE, new OLDMessageConnectionEditPolicy());
installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MessageReplyItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncAppliedStereotypeEditPart.java
index bbb430e2814..24559df4afd 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -224,6 +236,7 @@ public class MessageSyncAppliedStereotypeEditPart extends PapyrusLabelEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncEditPart.java
index 0d961d8879d..e2bab7f6864 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncEditPart.java
@@ -9,9 +9,8 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDMessageConnectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageSyncItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.MessageSync;
/**
@@ -38,11 +37,10 @@ public class MessageSyncEditPart extends AbstractMessageEditPart implements ITre
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
+ //installEditPolicy(EditPolicy.CONNECTION_ROLE, new OLDMessageConnectionEditPolicy());
installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
new AppliedStereotypeLinkLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MessageSyncItemSemanticEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/PackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/PackageEditPart.java
index 3e776c2fb28..e5a22257d78 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/PackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/PackageEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
@@ -7,7 +19,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentS
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.PackageItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.RemoveOrphanViewPolicy;
/**
@@ -42,13 +53,11 @@ public class PackageEditPart extends PapyrusDiagramEditPart {
installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
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.sequence.edit.policies.PackageCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.PackageCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicy());
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/SequenceDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/SequenceDiagramEditPart.java
new file mode 100644
index 00000000000..bed6cdb9b41
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/SequenceDiagramEditPart.java
@@ -0,0 +1,63 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.GrillingManagementEditPolicy;
+
+/**
+ * @generated
+ */
+public class SequenceDiagramEditPart extends PapyrusDiagramEditPart {
+
+ /**
+ * @generated
+ */
+ public final static String MODEL_ID = "PapyrusUMLSequenceDiagram"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final String VISUAL_ID = "Package_SequenceDiagram";
+
+ /**
+ * @generated
+ */
+ public SequenceDiagramEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+
+ 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.sequence.edit.policies.PackageCanonicalEditPolicy());
+
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(GrillingManagementEditPolicy.GRILLING_MANAGEMENT, new GrillingManagementEditPolicy());
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantEditPart.java
index 80231c641d5..6570cb011a4 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import org.eclipse.draw2d.IFigure;
@@ -19,7 +31,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNod
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.uml.diagram.sequence.edit.policies.StateInvariantItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.ContinuationFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -62,7 +73,6 @@ public class StateInvariantEditPart extends AbstractBorderItemEditPart {
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StateInvariantItemSemanticEditPolicy());
// 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantLabelEditPart.java
index 09925f8a211..7539f5c36f6 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantLabelEditPart.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -31,6 +42,7 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
@@ -52,7 +64,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditP
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
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;
@@ -209,6 +220,7 @@ public class StateInvariantLabelEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantNameEditPart.java
index 9073b7197cb..8c235f0e531 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantNameEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -31,6 +43,7 @@ import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ICellEditorValidator;
@@ -52,7 +65,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditP
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.parsers.ParserUtil;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
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;
@@ -209,6 +221,7 @@ public class StateInvariantNameEditPart extends PapyrusCompartmentEditPart
/**
* @generated
*/
+ @Override
public void setParser(IParser parser) {
this.parser = parser;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java
index e6e9c83636b..91d93b94d35 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java
index 7cc00fb7798..2c11ef41336 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -28,7 +40,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
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.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeConstraintItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.TimeMarkElementFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -72,7 +83,6 @@ public class TimeConstraintEditPart extends BorderedBorderItemEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TimeConstraintItemSemanticEditPolicy());
// 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java
index 97f8a5eed85..8ef50c7f987 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java
index e78ef1c5472..4d1c80342b9 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java
index 3625036c354..048e9a42c6d 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
@@ -28,7 +40,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEdit
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.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeObservationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.figures.TimeMarkElementFigure;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -72,7 +83,6 @@ public class TimeObservationEditPart extends BorderedBorderItemEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TimeObservationItemSemanticEditPolicy());
// 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java
index 81c85b94c4e..7e664029cf6 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
import java.util.Collections;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java
index 97a1afc67ca..46192685210 100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java
@@ -27,8 +27,8 @@ public class UMLEditPartFactory implements EditPartFactory {
View view = (View) model;
switch (UMLVisualIDRegistry.getVisualID(view)) {
- case PackageEditPart.VISUAL_ID:
- return new PackageEditPart(view);
+ case SequenceDiagramEditPart.VISUAL_ID:
+ return new SequenceDiagramEditPart(view);
case InteractionEditPart.VISUAL_ID:
return new InteractionEditPart(view);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ActionExecutionSpecificationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ActionExecutionSpecificationItemSemanticEditPolicy.java
deleted file mode 100644
index 2ca8aca691b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ActionExecutionSpecificationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ActionExecutionSpecificationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationItemSemanticEditPolicy() {
- super(UMLElementTypes.ActionExecutionSpecification_Shape);
- }
-
- /**
- * @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
- * (update at each lifeline modification) add general ordering
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- * (update at each lifeline modification) add general ordering
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/BehaviorExecutionSpecificationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/BehaviorExecutionSpecificationItemSemanticEditPolicy.java
deleted file mode 100644
index 0c79319a3c3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/BehaviorExecutionSpecificationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class BehaviorExecutionSpecificationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public BehaviorExecutionSpecificationItemSemanticEditPolicy() {
- super(UMLElementTypes.BehaviorExecutionSpecification_Shape);
- }
-
- /**
- * @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
- * (update at each lifeline modification) add general ordering
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- * (update at each lifeline modification) add general ordering
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragment2ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragment2ItemSemanticEditPolicy.java
deleted file mode 100644
index c30f301c7d1..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragment2ItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CombinedFragment2ItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CombinedFragment2ItemSemanticEditPolicy() {
- super(UMLElementTypes.CombinedFragment_CoRegionShape);
- }
-
- /**
- * @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
- * (update at each lifeline modification) add general ordering
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- * (update at each lifeline modification) add general ordering
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 275a823c587..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.commands.InteractionOperandCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.CombinedFragment_Shape);
- }
-
- /**
- * Generated not for limit InteractionOperand number. {@inheritDoc}
- *
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.InteractionOperand_Shape == baseElementType) {
- return getGEFWrapper(new InteractionOperandCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemSemanticEditPolicy.java
deleted file mode 100644
index eb0abeee425..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CombinedFragmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CombinedFragmentItemSemanticEditPolicy() {
- super(UMLElementTypes.CombinedFragment_Shape);
- }
-
- /**
- * @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 (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
deleted file mode 100644
index 89eed269862..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CommentAnnotatedElementItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentAnnotatedElementItemSemanticEditPolicy() {
- super(UMLElementTypes.Comment_AnnotatedElementEdge);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentItemSemanticEditPolicy.java
deleted file mode 100644
index 407bb397e29..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CommentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentItemSemanticEditPolicy() {
- super(UMLElementTypes.Comment_Shape);
- }
-
- /**
- * @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();
- todestroy.add(req.getElementToDestroy());
- // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConsiderIgnoreFragmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConsiderIgnoreFragmentItemSemanticEditPolicy.java
deleted file mode 100644
index da5a7005be9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConsiderIgnoreFragmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConsiderIgnoreFragmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConsiderIgnoreFragmentItemSemanticEditPolicy() {
- super(UMLElementTypes.ConsiderIgnoreFragment_Shape);
- }
-
- /**
- * @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 (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
deleted file mode 100644
index 8b231f77ab3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConstraintConstrainedElementItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintConstrainedElementItemSemanticEditPolicy() {
- super(UMLElementTypes.Constraint_ConstrainedElementEdge);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 0830314bfce..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.Constraint_Shape);
- }
-
- /**
- * @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();
- todestroy.add(req.getElementToDestroy());
- // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return getGEFWrapper(new ContextLinkCreateCommand(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;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return null;
- }
- 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 MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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 ContextLinkEditPart.VISUAL_ID:
- return getGEFWrapper(new ContextLinkReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContextLinkItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContextLinkItemSemanticEditPolicy.java
deleted file mode 100644
index 247d041d6e6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContextLinkItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ContextLinkItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ContextLinkItemSemanticEditPolicy() {
- super(UMLElementTypes.Constraint_ContextEdge);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContinuationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContinuationItemSemanticEditPolicy.java
deleted file mode 100644
index 2b31174d3a3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContinuationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ContinuationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ContinuationItemSemanticEditPolicy() {
- super(UMLElementTypes.Continuation_Shape);
- }
-
- /**
- * @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();
- todestroy.add(req.getElementToDestroy());
- // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicy.java
deleted file mode 100644
index 5477a3e42f7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,216 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DestructionOccurrenceSpecificationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DestructionOccurrenceSpecificationItemSemanticEditPolicy() {
- super(UMLElementTypes.DestructionOccurrenceSpecification_Shape);
- }
-
- /**
- * @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 (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.GeneralOrdering_Edge == baseElementType) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(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;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.GeneralOrdering_Edge == baseElementType) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(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 MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- case GeneralOrderingEditPart.VISUAL_ID:
- return getGEFWrapper(new GeneralOrderingReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintInMessageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintInMessageItemSemanticEditPolicy.java
deleted file mode 100644
index 604de816227..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintInMessageItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationConstraintInMessageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationConstraintInMessageItemSemanticEditPolicy() {
- super(UMLElementTypes.DurationConstraint_Shape_CN);
- }
-
- /**
- * @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();
- todestroy.add(req.getElementToDestroy());
- // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return getGEFWrapper(new ContextLinkCreateCommand(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;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return null;
- }
- 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 MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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 ContextLinkEditPart.VISUAL_ID:
- return getGEFWrapper(new ContextLinkReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 7c516a61638..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.DurationConstraint_Shape);
- }
-
- /**
- * @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();
- todestroy.add(req.getElementToDestroy());
- // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return getGEFWrapper(new ContextLinkCreateCommand(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;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return null;
- }
- 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 MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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 ContextLinkEditPart.VISUAL_ID:
- return getGEFWrapper(new ContextLinkReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationObservationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationObservationItemSemanticEditPolicy.java
deleted file mode 100644
index 27575aa350f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationObservationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationObservationItemSemanticEditPolicy() {
- super(UMLElementTypes.DurationObservation_Shape);
- }
-
- /**
- * @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();
- todestroy.add(req.getElementToDestroy());
- // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GeneralOrderingItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GeneralOrderingItemSemanticEditPolicy.java
deleted file mode 100644
index 16285aaf182..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GeneralOrderingItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,204 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.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.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public GeneralOrderingItemSemanticEditPolicy() {
- super(UMLElementTypes.GeneralOrdering_Edge);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
- List<EObject> todestroy = new ArrayList();
- 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;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index ea8f0194258..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.sequence.edit.commands.CombinedFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConsiderIgnoreFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionUseCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.LifelineCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionInteractionCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionInteractionCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Interaction_Shape);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.ConsiderIgnoreFragment_Shape == baseElementType) {
- return getGEFWrapper(new ConsiderIgnoreFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.CombinedFragment_Shape == baseElementType) {
- return getGEFWrapper(new CombinedFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.Lifeline_Shape == baseElementType) {
- return getGEFWrapper(new LifelineCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.InteractionUse_Shape == baseElementType) {
- return getGEFWrapper(new InteractionUseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.Constraint_Shape == baseElementType) {
- return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.Comment_Shape == baseElementType) {
- return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return super.getCreateCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java
deleted file mode 100644
index ab067e1383f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintInMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionItemSemanticEditPolicy() {
- super(UMLElementTypes.Interaction_Shape);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.DurationConstraint_Shape_CN == baseElementType) {
- return getGEFWrapper(new DurationConstraintInMessageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DurationObservation_Shape == baseElementType) {
- return getGEFWrapper(new DurationObservationCreateCommand(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;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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 ContextLinkEditPart.VISUAL_ID:
- return getGEFWrapper(new ContextLinkReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java
deleted file mode 100644
index 5fed59b62a9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.sequence.edit.commands.CombinedFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConsiderIgnoreFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContinuationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionUseCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionOperandItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionOperandItemSemanticEditPolicy() {
- super(UMLElementTypes.InteractionOperand_Shape);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.InteractionUse_Shape == baseElementType) {
- return getGEFWrapper(new InteractionUseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.ConsiderIgnoreFragment_Shape == baseElementType) {
- return getGEFWrapper(new ConsiderIgnoreFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.CombinedFragment_Shape == baseElementType) {
- return getGEFWrapper(new CombinedFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.Continuation_Shape == baseElementType) {
- return getGEFWrapper(new ContinuationCreateCommand(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;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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 ContextLinkEditPart.VISUAL_ID:
- return getGEFWrapper(new ContextLinkReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionUseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionUseItemSemanticEditPolicy.java
deleted file mode 100644
index 7a7b9148436..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionUseItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionUseItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionUseItemSemanticEditPolicy() {
- super(UMLElementTypes.InteractionUse_Shape);
- }
-
- /**
- * @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();
- todestroy.add(req.getElementToDestroy());
- // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java
deleted file mode 100644
index 92a63f32ce9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.sequence.edit.commands.ActionExecutionSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.BehaviorExecutionSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CombinedFragment2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DestructionOccurrenceSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.StateInvariantCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.TimeConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.TimeObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public LifelineItemSemanticEditPolicy() {
- super(UMLElementTypes.Lifeline_Shape);
- }
-
- /**
- * Generated not for add lifelines on lifeline
- *
- * @generated
- * (update at each lifeline modification) add lifelines, add DurationObservation/Constraint
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.ActionExecutionSpecification_Shape == baseElementType) {
- return getGEFWrapper(new ActionExecutionSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.BehaviorExecutionSpecification_Shape == baseElementType) {
- return getGEFWrapper(new BehaviorExecutionSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.StateInvariant_Shape == baseElementType) {
- return getGEFWrapper(new StateInvariantCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.CombinedFragment_CoRegionShape == baseElementType) {
- return getGEFWrapper(new CombinedFragment2CreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.TimeConstraint_Shape == baseElementType) {
- return getGEFWrapper(new TimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.TimeObservation_Shape == baseElementType) {
- return getGEFWrapper(new TimeObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DurationConstraint_Shape == baseElementType) {
- return getGEFWrapper(new DurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- if (UMLElementTypes.DestructionOccurrenceSpecification_Shape == baseElementType) {
- return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommand(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
- * (update at each lifeline modification) add general ordering
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- * (update at each lifeline modification) add general ordering
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- * (update at each lifeline modification) add general ordering
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageAsyncItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageAsyncItemSemanticEditPolicy.java
deleted file mode 100644
index 30b93ff096e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageAsyncItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public MessageAsyncItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_AsynchEdge);
- }
-
- /**
- * the added code to delete the messageoccurencespecification when the message is deleted
- *
- * @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 (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageCreateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageCreateItemSemanticEditPolicy.java
deleted file mode 100644
index 371acb8ce04..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageCreateItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public MessageCreateItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_CreateEdge);
- }
-
- /**
- * @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 (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageDeleteItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageDeleteItemSemanticEditPolicy.java
deleted file mode 100644
index b70e204ab3c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageDeleteItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public MessageDeleteItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_DeleteEdge);
- }
-
- /**
- * @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 (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageFoundItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageFoundItemSemanticEditPolicy.java
deleted file mode 100644
index ea8d2ebce26..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageFoundItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public MessageFoundItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_FoundEdge);
- }
-
- /**
- * @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 (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageLostItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageLostItemSemanticEditPolicy.java
deleted file mode 100644
index 40e82784d3b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageLostItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public MessageLostItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_LostEdge);
- }
-
- /**
- * @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 (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageReplyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageReplyItemSemanticEditPolicy.java
deleted file mode 100644
index d047a45bd4c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageReplyItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public MessageReplyItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_ReplyEdge);
- }
-
- /**
- * @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 (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageSyncItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageSyncItemSemanticEditPolicy.java
deleted file mode 100644
index 0e7dc005eb5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageSyncItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public MessageSyncItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_SynchEdge);
- }
-
- /**
- * @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 (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OpenDiagramEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OpenDiagramEditPolicy.java
index f301007c341..90f9f7687a9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OpenDiagramEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OpenDiagramEditPolicy.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
import java.io.IOException;
@@ -41,7 +39,7 @@ import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.Style;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
@@ -59,7 +57,6 @@ public class OpenDiagramEditPolicy extends OpenEditPolicy {
/**
* @generated
*/
- @Override
protected Command getOpenCommand(Request request) {
EditPart targetEditPart = getTargetEditPart(request);
if (false == targetEditPart.getModel() instanceof View) {
@@ -93,13 +90,11 @@ public class OpenDiagramEditPolicy extends OpenEditPolicy {
diagramFacet = linkStyle;
}
- // FIXME canExecute if !(readOnly && getDiagramToOpen == null), i.e.
- // open works on ro diagrams only when there's associated diagram
- // already
+ // FIXME canExecute if !(readOnly && getDiagramToOpen == null), i.e. open works on ro diagrams only when there's associated diagram already
+
/**
* @generated
*/
- @Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
try {
@@ -186,7 +181,7 @@ public class OpenDiagramEditPolicy extends OpenEditPolicy {
* @generated
*/
protected String getDiagramKind() {
- return PackageEditPart.MODEL_ID;
+ return SequenceDiagramEditPart.MODEL_ID;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java
deleted file mode 100644
index 6ca7be50799..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.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.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
-import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PackageItemSemanticEditPolicy() {
- super(UMLElementTypes.Package_SequenceDiagram);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Interaction_Shape == baseElementType) {
- return getGEFWrapper(new InteractionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDuplicateCommand(DuplicateElementsRequest req) {
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
- Diagram currentDiagram = null;
- if (getHost() instanceof IGraphicalEditPart) {
- currentDiagram = ((IGraphicalEditPart) getHost()).getNotationView().getDiagram();
- }
- return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req, currentDiagram));
- }
-
- /**
- * @generated
- */
- private static class DuplicateAnythingCommand extends DuplicateNamedElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram;
-
- /**
- * @generated
- */
- public DuplicateAnythingCommand(TransactionalEditingDomain editingDomain, DuplicateElementsRequest req, Diagram currentDiagram) {
- super(editingDomain, req.getLabel(), req.getElementsToBeDuplicated(), req.getAllDuplicatedElementsMap(), currentDiagram);
- this.diagram = currentDiagram;
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/StateInvariantItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/StateInvariantItemSemanticEditPolicy.java
deleted file mode 100644
index 5d50ac637cf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/StateInvariantItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class StateInvariantItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public StateInvariantItemSemanticEditPolicy() {
- super(UMLElementTypes.StateInvariant_Shape);
- }
-
- /**
- * @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();
- todestroy.add(req.getElementToDestroy());
- // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index a42f417fa09..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContextLinkReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContextLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public TimeConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.TimeConstraint_Shape);
- }
-
- /**
- * @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();
- todestroy.add(req.getElementToDestroy());
- // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return getGEFWrapper(new ContextLinkCreateCommand(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;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ContextEdge == baseElementType) {
- return null;
- }
- 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 MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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 ContextLinkEditPart.VISUAL_ID:
- return getGEFWrapper(new ContextLinkReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeObservationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeObservationItemSemanticEditPolicy.java
deleted file mode 100644
index cf502a4cfa2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeObservationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.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.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public TimeObservationItemSemanticEditPolicy() {
- super(UMLElementTypes.TimeObservation_Shape);
- }
-
- /**
- * @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();
- todestroy.add(req.getElementToDestroy());
- // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
-
- if (UMLElementTypes.Message_SynchEdge == baseElementType) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_AsynchEdge == baseElementType) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_ReplyEdge == baseElementType) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_CreateEdge == baseElementType) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_DeleteEdge == baseElementType) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_LostEdge == baseElementType) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Message_FoundEdge == baseElementType) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Comment_AnnotatedElementEdge == baseElementType) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Constraint_ConstrainedElementEdge == baseElementType) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case MessageSyncEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case MessageAsyncEditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case MessageReplyEditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case MessageCreateEditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case MessageDeleteEditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case MessageLostEditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case MessageFoundEditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(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));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java
index f05ecbed77e..e11036c53b9 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
import java.util.Collections;
@@ -141,8 +153,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
if (editPolicyCommand != null) {
ICommand command = editPolicyCommand instanceof ICommandProxy
- ? ((ICommandProxy) editPolicyCommand).getICommand()
- : new CommandProxy(editPolicyCommand);
+ ? ((ICommandProxy) editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, command);
}
IElementType requestContextElementType = getContextElementType(request);
@@ -228,6 +239,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
return null;
}
+ // RS: End of add code for extended types
+
/**
* @generated
*/
@@ -458,7 +471,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
if (source == null) {
return true;
} else {
- Map<String, EClassifier> env = Collections.<String, EClassifier>singletonMap("oppositeEnd", //$NON-NLS-1$
+ Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", //$NON-NLS-1$
UMLPackage.eINSTANCE.getElement());
Object sourceVal = UMLOCLFactory.getExpression(2, UMLPackage.eINSTANCE.getElement(), env)
.evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
@@ -469,7 +482,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
if (target == null) {
return true;
} else {
- Map<String, EClassifier> env = Collections.<String, EClassifier>singletonMap("oppositeEnd", //$NON-NLS-1$
+ Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", //$NON-NLS-1$
UMLPackage.eINSTANCE.getElement());
Object targetVal = UMLOCLFactory.getExpression(3, UMLPackage.eINSTANCE.getElement(), env)
.evaluate(target, Collections.singletonMap("oppositeEnd", source)); //$NON-NLS-1$
@@ -493,7 +506,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
if (source == null) {
return true;
} else {
- Map<String, EClassifier> env = Collections.<String, EClassifier>singletonMap("oppositeEnd", //$NON-NLS-1$
+ Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", //$NON-NLS-1$
UMLPackage.eINSTANCE.getElement());
Object sourceVal = UMLOCLFactory.getExpression(22, UMLPackage.eINSTANCE.getElement(), env)
.evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
@@ -504,7 +517,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
if (target == null) {
return true;
} else {
- Map<String, EClassifier> env = Collections.<String, EClassifier>singletonMap("oppositeEnd", //$NON-NLS-1$
+ Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", //$NON-NLS-1$
UMLPackage.eINSTANCE.getElement());
Object targetVal = UMLOCLFactory.getExpression(6, UMLPackage.eINSTANCE.getElement(), env)
.evaluate(target, Collections.singletonMap("oppositeEnd", source)); //$NON-NLS-1$
@@ -528,7 +541,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
if (source == null) {
return true;
} else {
- Map<String, EClassifier> env = Collections.<String, EClassifier>singletonMap("oppositeEnd", //$NON-NLS-1$
+ Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", //$NON-NLS-1$
UMLPackage.eINSTANCE.getElement());
Object sourceVal = UMLOCLFactory.getExpression(8, UMLPackage.eINSTANCE.getElement(), env)
.evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextNonResizableEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextNonResizableEditPolicy.java
index 48b983de03a..2cdaa73afd1 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextNonResizableEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextNonResizableEditPolicy.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
import java.util.Collections;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextSelectionEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextSelectionEditPolicy.java
index b5cf3c4ef8f..703d5aed8c8 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextSelectionEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextSelectionEditPolicy.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
import org.eclipse.draw2d.ColorConstants;
@@ -208,4 +221,4 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
return hostPositionListener;
}
-}
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLAbstractExpression.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLAbstractExpression.java
index 29f7a14e615..43158b0df12 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLAbstractExpression.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLAbstractExpression.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.expressions;
import java.math.BigDecimal;
@@ -117,10 +115,8 @@ public abstract class UMLAbstractExpression {
}
/**
- * Expression may return number value which is not directly compatible with feature type (e.g.
- * Double when Integer is expected), or EEnumLiteral meta-object when literal instance is
- * expected
- *
+ * Expression may return number value which is not directly compatible with feature type (e.g. Double when Integer is expected), or EEnumLiteral meta-object when literal instance is expected
+ *
* @generated
*/
public static Object performCast(Object value, EDataType targetType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLOCLFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLOCLFactory.java
index b326ca84419..47c5721a25e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLOCLFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLOCLFactory.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.expressions;
import java.util.Collections;
@@ -111,6 +109,8 @@ public class UMLOCLFactory {
}
/**
+ * This is factory method, callers are responsible to keep reference to the return value if they want to reuse parsed expression
+ *
* @generated
*/
public static UMLAbstractExpression getExpression(String body, EClassifier context,
@@ -119,6 +119,8 @@ public class UMLOCLFactory {
}
/**
+ * This method will become private in the next release
+ *
* @generated
*/
public static UMLAbstractExpression getExpression(String body, EClassifier context) {
@@ -160,7 +162,6 @@ public class UMLOCLFactory {
/**
* @generated
*/
- @Override
@SuppressWarnings("rawtypes")
protected Object doEvaluate(Object context, Map env) {
if (oclExpression == null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLAbstractNavigatorItem.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLAbstractNavigatorItem.java
index 76098e78c41..61b06c081ab 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLAbstractNavigatorItem.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLAbstractNavigatorItem.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.navigator;
import org.eclipse.core.runtime.IAdapterFactory;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorContentProvider.java
index f0cd67db3e0..ba86ad7d458 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorContentProvider.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.navigator;
import java.util.ArrayList;
@@ -150,7 +148,6 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider
/**
* @generated
*/
- @Override
public void dispose() {
myWorkspaceSynchronizer.dispose();
myWorkspaceSynchronizer = null;
@@ -168,7 +165,6 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider
/**
* @generated
*/
- @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
myViewer = viewer;
}
@@ -194,7 +190,6 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider
/**
* @generated
*/
- @Override
public Object[] getElements(Object inputElement) {
return getChildren(inputElement);
}
@@ -202,28 +197,24 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider
/**
* @generated
*/
- @Override
public void restoreState(IMemento aMemento) {
}
/**
* @generated
*/
- @Override
public void saveState(IMemento aMemento) {
}
/**
* @generated
*/
- @Override
public void init(ICommonContentExtensionSite aConfig) {
}
/**
* @generated
*/
- @Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof IFile) {
IFile file = (IFile) parentElement;
@@ -257,7 +248,6 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider
/**
* @generated
*/
- @Override
public Object getParent(Object element) {
if (element instanceof UMLAbstractNavigatorItem) {
UMLAbstractNavigatorItem abstractNavigatorItem = (UMLAbstractNavigatorItem) element;
@@ -269,7 +259,6 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider
/**
* @generated
*/
- @Override
public boolean hasChildren(Object element) {
return element instanceof IFile || getChildren(element).length > 0;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorItem.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorItem.java
index 1bf10d60fb5..7439aa372ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorItem.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorItem.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.navigator;
import org.eclipse.core.runtime.IAdapterFactory;
@@ -107,7 +105,6 @@ public class UMLDomainNavigatorItem extends PlatformObject {
/**
* @generated
*/
- @Override
public boolean equals(Object obj) {
if (obj instanceof org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLDomainNavigatorItem) {
return EcoreUtil.getURI(getEObject()).equals(EcoreUtil.getURI(
@@ -119,7 +116,6 @@ public class UMLDomainNavigatorItem extends PlatformObject {
/**
* @generated
*/
- @Override
public int hashCode() {
return EcoreUtil.getURI(getEObject()).hashCode();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorLabelProvider.java
index 3fba84e7ba2..e21fa52d7c8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorLabelProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorLabelProvider.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.navigator;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
@@ -35,14 +33,12 @@ public class UMLDomainNavigatorLabelProvider implements ICommonLabelProvider {
/**
* @generated
*/
- @Override
public void init(ICommonContentExtensionSite aConfig) {
}
/**
* @generated
*/
- @Override
public Image getImage(Object element) {
if (element instanceof UMLDomainNavigatorItem) {
return myAdapterFactoryLabelProvider.getImage(((UMLDomainNavigatorItem) element).getEObject());
@@ -53,7 +49,6 @@ public class UMLDomainNavigatorLabelProvider implements ICommonLabelProvider {
/**
* @generated
*/
- @Override
public String getText(Object element) {
if (element instanceof UMLDomainNavigatorItem) {
return myAdapterFactoryLabelProvider.getText(((UMLDomainNavigatorItem) element).getEObject());
@@ -64,7 +59,6 @@ public class UMLDomainNavigatorLabelProvider implements ICommonLabelProvider {
/**
* @generated
*/
- @Override
public void addListener(ILabelProviderListener listener) {
myAdapterFactoryLabelProvider.addListener(listener);
}
@@ -72,7 +66,6 @@ public class UMLDomainNavigatorLabelProvider implements ICommonLabelProvider {
/**
* @generated
*/
- @Override
public void dispose() {
myAdapterFactoryLabelProvider.dispose();
}
@@ -80,7 +73,6 @@ public class UMLDomainNavigatorLabelProvider implements ICommonLabelProvider {
/**
* @generated
*/
- @Override
public boolean isLabelProperty(Object element, String property) {
return myAdapterFactoryLabelProvider.isLabelProperty(element, property);
}
@@ -88,7 +80,6 @@ public class UMLDomainNavigatorLabelProvider implements ICommonLabelProvider {
/**
* @generated
*/
- @Override
public void removeListener(ILabelProviderListener listener) {
myAdapterFactoryLabelProvider.removeListener(listener);
}
@@ -96,21 +87,18 @@ public class UMLDomainNavigatorLabelProvider implements ICommonLabelProvider {
/**
* @generated
*/
- @Override
public void restoreState(IMemento aMemento) {
}
/**
* @generated
*/
- @Override
public void saveState(IMemento aMemento) {
}
/**
* @generated
*/
- @Override
public String getDescription(Object anElement) {
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorActionProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorActionProvider.java
index 4d144eae879..abb985c22aa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorActionProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorActionProvider.java
@@ -25,7 +25,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
@@ -135,7 +135,7 @@ public class UMLNavigatorActionProvider extends CommonActionProvider {
}
if (selectedElement instanceof Diagram) {
Diagram diagram = (Diagram) selectedElement;
- if (PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(diagram))) {
+ if (SequenceDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(diagram))) {
myDiagram = diagram;
}
}
@@ -180,4 +180,4 @@ public class UMLNavigatorActionProvider extends CommonActionProvider {
return editorInput;
}
}
-}
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java
index 0c12fa39c1a..200a6ad8cd4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.navigator;
import java.util.ArrayList;
@@ -33,7 +31,7 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
@@ -61,7 +59,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
@@ -180,12 +178,12 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
/**
*
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
+ * Papyrus Template
+ * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
+ *
* @generated
**/
- private Object[] getViewChildrenForPackageEditPart(View view, Object parentElement) {
+ private Object[] getViewChildrenForSequenceDiagramEditPart(View view, Object parentElement) {
Collection result = new ArrayList();
UMLNavigatorGroup links = new UMLNavigatorGroup(Messages.NavigatorGroupName_Package_SequenceDiagram_links,
"icons/linksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
@@ -397,7 +395,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
parentElement);
Collection connectedViews = getChildrenByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
result.addAll(createNavigatorItems(connectedViews, parentElement, false));
connectedViews = getChildrenByType(Collections.singleton(view),
@@ -2049,7 +2047,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
@@ -2125,7 +2123,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
@@ -2238,7 +2236,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
@@ -2314,7 +2312,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
@@ -2427,7 +2425,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
@@ -2503,7 +2501,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
@@ -2616,7 +2614,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
@@ -2692,7 +2690,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
@@ -2805,7 +2803,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
@@ -2881,7 +2879,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
@@ -2994,7 +2992,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
@@ -3070,7 +3068,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
@@ -3183,7 +3181,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
@@ -3259,7 +3257,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
source.addChildren(createNavigatorItems(connectedViews, source, true));
connectedViews = getLinksSourceByType(Collections.singleton(view),
@@ -3368,7 +3366,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
@@ -3566,7 +3564,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
- UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
+ UMLVisualIDRegistry.getType(CCombinedCompartmentEditPart.VISUAL_ID));
target.addChildren(createNavigatorItems(connectedViews, target, true));
connectedViews = getLinksTargetByType(Collections.singleton(view),
@@ -3729,8 +3727,8 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
topViews.add((View) o);
}
}
- result.addAll(createNavigatorItems(selectViewsByType(resource.getContents(), PackageEditPart.MODEL_ID),
- file, false));
+ result.addAll(createNavigatorItems(
+ selectViewsByType(resource.getContents(), SequenceDiagramEditPart.MODEL_ID), file, false));
return result.toArray();
}
@@ -3758,9 +3756,9 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
if (vid != null) {
switch (vid) {
- case PackageEditPart.VISUAL_ID: {
+ case SequenceDiagramEditPart.VISUAL_ID: {
//modification of the template to avoid mistake of 65kb.
- return getViewChildrenForPackageEditPart(view, parentElement);
+ return getViewChildrenForSequenceDiagramEditPart(view, parentElement);
}
case InteractionEditPart.VISUAL_ID: {
@@ -3793,7 +3791,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
return getViewChildrenForInteractionOperandEditPart(view, parentElement);
}
- case ActionExecutionSpecificationEditPart.VISUAL_ID: {
+ case CCombinedCompartmentEditPart.VISUAL_ID: {
//modification of the template to avoid mistake of 65kb.
return getViewChildrenForActionExecutionSpecificationEditPart(view, parentElement);
}
@@ -4003,7 +4001,7 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider {
* @generated
*/
private boolean isOwnView(View view) {
- return PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
+ return SequenceDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorGroup.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorGroup.java
index 6789a44f2f5..3ed9dd7aa7c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorGroup.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorGroup.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.navigator;
import java.util.Collection;
@@ -90,7 +88,6 @@ public class UMLNavigatorGroup extends UMLAbstractNavigatorItem {
/**
* @generated
*/
- @Override
public boolean equals(Object obj) {
if (obj instanceof org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorGroup) {
org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorGroup anotherGroup = (org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorGroup) obj;
@@ -104,7 +101,6 @@ public class UMLNavigatorGroup extends UMLAbstractNavigatorItem {
/**
* @generated
*/
- @Override
public int hashCode() {
return getGroupName().hashCode();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorItem.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorItem.java
index f71a57e6577..6923e33600c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorItem.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorItem.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.navigator;
import org.eclipse.core.runtime.IAdapterFactory;
@@ -87,7 +85,6 @@ public class UMLNavigatorItem extends UMLAbstractNavigatorItem {
/**
* @generated
*/
- @Override
public boolean equals(Object obj) {
if (obj instanceof org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorItem) {
return EcoreUtil.getURI(getView()).equals(EcoreUtil
@@ -99,7 +96,6 @@ public class UMLNavigatorItem extends UMLAbstractNavigatorItem {
/**
* @generated
*/
- @Override
public int hashCode() {
return EcoreUtil.getURI(getView()).hashCode();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java
index 67cef6a22fb..16e28fae866 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java
@@ -25,7 +25,7 @@ import org.eclipse.jface.viewers.ITreePathLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.ViewerLabel;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
@@ -69,6 +69,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyNameEditP
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
@@ -146,7 +147,7 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
*/
public Image getImage(View view) {
switch (UMLVisualIDRegistry.getVisualID(view)) {
- case PackageEditPart.VISUAL_ID:
+ case SequenceDiagramEditPart.VISUAL_ID:
return getImage("Navigator?Diagram?http://www.eclipse.org/uml2/5.0.0/UML?Package", //$NON-NLS-1$
UMLElementTypes.Package_SequenceDiagram);
case InteractionEditPart.VISUAL_ID:
@@ -167,7 +168,7 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
case InteractionOperandEditPart.VISUAL_ID:
return getImage("Navigator?Node?http://www.eclipse.org/uml2/5.0.0/UML?InteractionOperand", //$NON-NLS-1$
UMLElementTypes.InteractionOperand_Shape);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ case CCombinedCompartmentEditPart.VISUAL_ID:
return getImage("Navigator?Node?http://www.eclipse.org/uml2/5.0.0/UML?ActionExecutionSpecification", //$NON-NLS-1$
UMLElementTypes.ActionExecutionSpecification_Shape);
case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
@@ -287,7 +288,7 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
return getUnresolvedDomainElementProxyText(view);
}
switch (UMLVisualIDRegistry.getVisualID(view)) {
- case PackageEditPart.VISUAL_ID:
+ case SequenceDiagramEditPart.VISUAL_ID:
return getPackage_SequenceDiagramText(view);
case InteractionEditPart.VISUAL_ID:
return getInteraction_ShapeText(view);
@@ -301,7 +302,7 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
return getCombinedFragment_ShapeText(view);
case InteractionOperandEditPart.VISUAL_ID:
return getInteractionOperand_ShapeText(view);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ case CCombinedCompartmentEditPart.VISUAL_ID:
return getActionExecutionSpecification_ShapeText(view);
case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
return getConsiderIgnoreFragment_ShapeText(view);
@@ -849,6 +850,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL
* @generated
*/
private boolean isOwnView(View view) {
- return PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
+ return SequenceDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLinkHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLinkHelper.java
index 35779a09458..875aa34ff5a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLinkHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLinkHelper.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.navigator;
import org.eclipse.core.resources.IFile;
@@ -63,7 +61,6 @@ public class UMLNavigatorLinkHelper implements ILinkHelper {
/**
* @generated
*/
- @Override
public IStructuredSelection findSelection(IEditorInput anInput) {
IDiagramDocument document = UMLDiagramEditorPlugin.getInstance().getDocumentProvider()
.getDiagramDocument(anInput);
@@ -85,7 +82,6 @@ public class UMLNavigatorLinkHelper implements ILinkHelper {
/**
* @generated
*/
- @Override
public void activateEditor(IWorkbenchPage aPage, IStructuredSelection aSelection) {
if (aSelection == null || aSelection.isEmpty()) {
return;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorSorter.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorSorter.java
index 30081b50e35..aa44f9b5c62 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorSorter.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorSorter.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.navigator;
import org.eclipse.jface.viewers.ViewerSorter;
@@ -29,7 +27,6 @@ public class UMLNavigatorSorter extends ViewerSorter {
/**
* @generated
*/
- @Override
public int category(Object element) {
if (element instanceof UMLNavigatorItem) {
UMLNavigatorItem item = (UMLNavigatorItem) element;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/parsers/AbstractParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/parsers/AbstractParser.java
index 2171a16a1a3..a625f09edb5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/parsers/AbstractParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/parsers/AbstractParser.java
@@ -1,14 +1 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.parsers;
+// 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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/parsers/MessageFormatParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/parsers/MessageFormatParser.java
index 6d865e78842..6d865e78842 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/parsers/MessageFormatParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/parsers/MessageFormatParser.java
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/DeleteElementAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/DeleteElementAction.java
deleted file mode 100644
index 01b9972ca61..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/DeleteElementAction.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-// This file is not used.
-// The DeleteElementAction is removed from the plugin and replaced by DeleteFromModelAction in the plugin org.eclipse.diagram.common.
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/DiagramEditorContextMenuProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/DiagramEditorContextMenuProvider.java
index c09cbdff17f..19f31050d9e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/DiagramEditorContextMenuProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/DiagramEditorContextMenuProvider.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import org.eclipse.emf.ecore.EObject;
@@ -43,7 +41,6 @@ public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider
/**
* @generated
*/
- @Override
public void buildContextMenu(final IMenuManager menu) {
getViewer().flush();
try {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/LoadResourceAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/LoadResourceAction.java
index 307e1a6d12e..a3ce779de50 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/LoadResourceAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/LoadResourceAction.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import org.eclipse.core.commands.ExecutionEvent;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java
index a788318ad86..44550f8e2a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import org.eclipse.osgi.util.NLS;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/ModelElementSelectionPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/ModelElementSelectionPage.java
index f688ca6a369..64550345e68 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/ModelElementSelectionPage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/ModelElementSelectionPage.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.part.DefaultModelElementSelectionPage;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizard.java
index 7f2984df931..c36ee76922b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizard.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import java.lang.reflect.InvocationTargetException;
@@ -100,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;
@@ -113,7 +110,6 @@ public class UMLCreationWizard extends Wizard implements INewWizard {
/**
* @generated
*/
- @Override
public void addPages() {
diagramModelFilePage = new UMLCreationWizardPage("DiagramModelFile", getSelection(), //$NON-NLS-1$
"PapyrusUMLSequence_diagram"); //$NON-NLS-1$
@@ -142,7 +138,6 @@ public class UMLCreationWizard extends Wizard implements INewWizard {
/**
* @generated
*/
- @Override
public boolean performFinish() {
IRunnableWithProgress op = new WorkspaceModifyOperation(null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizardPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizardPage.java
index 34ef5a02621..06dbc29450f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizardPage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizardPage.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import org.eclipse.core.runtime.IPath;
@@ -73,7 +71,6 @@ public class UMLCreationWizardPage extends WizardNewFileCreationPage {
/**
* @generated
*/
- @Override
public void createControl(Composite parent) {
super.createControl(parent);
setFileName(UMLDiagramEditorUtil.getUniqueFileName(getContainerFullPath(), getFileName(), getExtension()));
@@ -83,7 +80,6 @@ public class UMLCreationWizardPage extends WizardNewFileCreationPage {
/**
* @generated
*/
- @Override
protected boolean validatePage() {
if (!super.validatePage()) {
return false;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramActionBarContributor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramActionBarContributor.java
index 6b4b6fd6a84..34dd7fd413d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramActionBarContributor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramActionBarContributor.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramActionBarContributor;
@@ -29,7 +27,7 @@ public class UMLDiagramActionBarContributor extends DiagramActionBarContributor
/**
* @generated
*/
- @Override
+
protected Class<UMLDiagramEditor> getEditorClass() {
return UMLDiagramEditor.class;
}
@@ -37,7 +35,6 @@ public class UMLDiagramActionBarContributor extends DiagramActionBarContributor
/**
* @generated
*/
- @Override
protected String getEditorId() {
return UMLDiagramEditor.ID;
}
@@ -45,7 +42,6 @@ public class UMLDiagramActionBarContributor extends DiagramActionBarContributor
/**
* @generated
*/
- @Override
public void init(IActionBars bars, IWorkbenchPage page) {
super.init(bars, page);
// print preview
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java
index 7116e94fa4e..ee23cb67124 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import java.util.EventObject;
@@ -128,7 +126,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected String getContextID() {
return CONTEXT_ID;
}
@@ -136,7 +133,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
PaletteRoot paletteRoot;
if (existingPaletteRoot == null) {
@@ -152,7 +148,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected PreferencesHint getPreferencesHint() {
return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
}
@@ -160,7 +155,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public String getContributorId() {
return UMLDiagramEditorPlugin.ID;
}
@@ -169,7 +163,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
* @generated
*/
@SuppressWarnings("rawtypes")
- @Override
public Object getAdapter(Class type) {
if (type == IShowInTargetList.class) {
return new IShowInTargetList() {
@@ -186,7 +179,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
return documentProvider;
}
@@ -194,7 +186,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public TransactionalEditingDomain getEditingDomain() {
return editingDomain;
}
@@ -202,7 +193,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected final void setDocumentProvider(IEditorInput input) {
// Already set in the constructor
}
@@ -210,7 +200,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public void gotoMarker(IMarker marker) {
MarkerNavigationService.getInstance().gotoMarker(this, marker);
}
@@ -218,7 +207,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public boolean isSaveAsAllowed() {
return true;
}
@@ -226,7 +214,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public void doSaveAs() {
performSaveAs(new NullProgressMonitor());
}
@@ -234,7 +221,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected void performSaveAs(IProgressMonitor progressMonitor) {
// Nothing
}
@@ -242,7 +228,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public ShowInContext getShowInContext() {
return new ShowInContext(getEditorInput(), getNavigatorSelection());
}
@@ -270,7 +255,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected void configureGraphicalViewer() {
super.configureGraphicalViewer();
DiagramEditorContextMenuProvider provider = new DiagramEditorContextMenuProvider(this,
@@ -282,7 +266,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected TransactionalEditingDomain createEditingDomain() {
// Already configured
return editingDomain;
@@ -291,7 +274,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected void configureDiagramEditDomain() {
super.configureDiagramEditDomain();
getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
@@ -316,7 +298,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();
@@ -335,7 +316,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected void setUndoContext(IUndoContext context) {
if (dirtyState != null) {
dirtyState.dispose();
@@ -348,7 +328,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public boolean isDirty() {
return getDirtyState().isDirty();
}
@@ -356,7 +335,6 @@ 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())) {
@@ -368,7 +346,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
public void dispose() {
// remove palette service listener
// remove preference listener
@@ -392,7 +369,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected PaletteViewer constructPaletteViewer() {
return new PapyrusPaletteViewer();
}
@@ -400,7 +376,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh
/**
* @generated
*/
- @Override
protected PaletteViewerProvider createPaletteViewerProvider() {
getEditDomain().setPaletteRoot(createPaletteRoot(null));
return new PaletteViewerProvider(getEditDomain()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java
index eb092ed5cc2..e3521aea156 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import java.io.IOException;
@@ -40,11 +52,11 @@ import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCo
import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.part.DefaultDiagramEditorUtil;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.part.DefaultDiagramEditorUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
@@ -139,7 +151,7 @@ public class UMLDiagramEditorUtil {
Package model = createInitialModel();
attachModelToResource(model, modelResource);
- Diagram diagram = ViewService.createDiagram(model, PackageEditPart.MODEL_ID,
+ Diagram diagram = ViewService.createDiagram(model, SequenceDiagramEditPart.MODEL_ID,
UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
if (diagram != null) {
diagramResource.getContents().add(diagram);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java
index f7f4112b724..3ee01202ad2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java
@@ -28,7 +28,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.TimeConstraintHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.TimeObservationHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
@@ -57,7 +57,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
@@ -114,7 +114,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
String vid = UMLVisualIDRegistry.getVisualID(view);
if (vid != null) {
switch (vid) {
- case PackageEditPart.VISUAL_ID:
+ case SequenceDiagramEditPart.VISUAL_ID:
return getPackage_SequenceDiagram_SemanticChildren(view);
case InteractionEditPart.VISUAL_ID:
return getInteraction_Shape_SemanticChildren(view);
@@ -163,22 +163,6 @@ public class UMLDiagramUpdater implements DiagramUpdater {
for (Iterator<?> it = modelElement.getFragments().iterator(); it.hasNext();) {
InteractionFragment childElement = (InteractionFragment) it.next();
String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (InteractionUseEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (ConsiderIgnoreFragmentEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (CombinedFragmentEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getFragments().iterator(); it.hasNext();) {
- InteractionFragment childElement = (InteractionFragment) it.next();
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
if (ContinuationEditPart.VISUAL_ID.equals(visualID)) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
@@ -191,80 +175,14 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
public List<UMLNodeDescriptor> getInteraction_SubfragmentCompartment_SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Interaction modelElement = (Interaction) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getFragments().iterator(); it.hasNext();) {
- InteractionFragment childElement = (InteractionFragment) it.next();
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (ConsiderIgnoreFragmentEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (CombinedFragmentEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (InteractionUseEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getLifelines().iterator(); it.hasNext();) {
- Lifeline childElement = (Lifeline) it.next();
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (LifelineEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (ConstraintEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (CommentEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
+ return Collections.emptyList();
}
/**
* @generated
*/
public List<UMLNodeDescriptor> getCombinedFragment_SubfragmentCompartment_SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- CombinedFragment modelElement = (CombinedFragment) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getOperands().iterator(); it.hasNext();) {
- InteractionOperand childElement = (InteractionOperand) it.next();
- String visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (InteractionOperandEditPart.VISUAL_ID.equals(visualID)) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
+ return Collections.emptyList();
}
/**
@@ -303,7 +221,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
// result.add(nextValue);
result.add(new UMLNodeDescriptor(be, visualID));
}
- } else if (ActionExecutionSpecificationEditPart.VISUAL_ID.equals(visualID)) {
+ } else if (CCombinedCompartmentEditPart.VISUAL_ID.equals(visualID)) {
ActionExecutionSpecification ae = (ActionExecutionSpecification) nextValue;
if (ae.getCovereds().size() > 0 && ae.getCovereds().get(0) == modelElement) {
result.add(new UMLNodeDescriptor(ae, visualID));
@@ -374,7 +292,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
String vid = UMLVisualIDRegistry.getVisualID(view);
if (vid != null) {
switch (vid) {
- case PackageEditPart.VISUAL_ID:
+ case SequenceDiagramEditPart.VISUAL_ID:
return getPackage_SequenceDiagram_ContainedLinks(view);
case InteractionEditPart.VISUAL_ID:
return getInteraction_Shape_ContainedLinks(view);
@@ -390,7 +308,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getContinuation_Shape_ContainedLinks(view);
case LifelineEditPart.VISUAL_ID:
return getLifeline_Shape_ContainedLinks(view);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ case CCombinedCompartmentEditPart.VISUAL_ID:
return getActionExecutionSpecification_Shape_ContainedLinks(view);
case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
return getBehaviorExecutionSpecification_Shape_ContainedLinks(view);
@@ -457,7 +375,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getContinuation_Shape_IncomingLinks(view);
case LifelineEditPart.VISUAL_ID:
return getLifeline_Shape_IncomingLinks(view);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ case CCombinedCompartmentEditPart.VISUAL_ID:
return getActionExecutionSpecification_Shape_IncomingLinks(view);
case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
return getBehaviorExecutionSpecification_Shape_IncomingLinks(view);
@@ -524,7 +442,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
return getContinuation_Shape_OutgoingLinks(view);
case LifelineEditPart.VISUAL_ID:
return getLifeline_Shape_OutgoingLinks(view);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ case CCombinedCompartmentEditPart.VISUAL_ID:
return getActionExecutionSpecification_Shape_OutgoingLinks(view);
case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
return getBehaviorExecutionSpecification_Shape_OutgoingLinks(view);
@@ -2655,4 +2573,5 @@ public class UMLDiagramUpdater implements DiagramUpdater {
ContextLinkEditPart.VISUAL_ID));
return result;
}
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDocumentProvider.java
index e3c73bc9b55..1f083e63b15 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDocumentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDocumentProvider.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import java.io.IOException;
@@ -75,7 +73,6 @@ 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,
@@ -96,7 +93,6 @@ 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,
@@ -112,8 +108,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.
+ * 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
@@ -147,7 +144,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected IDocument createEmptyDocument() {
DiagramDocument document = new DiagramDocument();
document.setEditingDomain(createEditingDomain());
@@ -267,7 +263,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public long getModificationStamp(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
@@ -279,7 +274,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public boolean isDeleted(Object element) {
IDiagramDocument document = getDiagramDocument(element);
if (document != null) {
@@ -302,7 +296,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected void disposeElementInfo(Object element, ElementInfo info) {
if (info instanceof ResourceSetInfo) {
ResourceSetInfo resourceSetInfo = (ResourceSetInfo) info;
@@ -314,7 +307,6 @@ 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) {
@@ -336,7 +328,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public boolean isReadOnly(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
@@ -356,7 +347,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public boolean isModifiable(Object element) {
if (!isStateValidated(element)) {
if (element instanceof FileEditorInput || element instanceof URIEditorInput) {
@@ -402,7 +392,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected void doUpdateStateCache(Object element) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
@@ -414,7 +403,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public boolean isSynchronized(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
@@ -426,7 +414,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected ISchedulingRule getResetRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
@@ -446,7 +433,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected ISchedulingRule getSaveRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
@@ -466,7 +452,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected ISchedulingRule getSynchronizeRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
@@ -486,7 +471,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected ISchedulingRule getValidateStateRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
@@ -529,7 +513,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected void doSynchronize(Object element, IProgressMonitor monitor) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
@@ -545,7 +528,6 @@ 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);
@@ -683,7 +665,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public IEditorInput createInputWithEditingDomain(IEditorInput editorInput, TransactionalEditingDomain domain) {
return editorInput;
}
@@ -691,7 +672,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public IDiagramDocument getDiagramDocument(Object element) {
IDocument doc = getDocument(element);
if (doc instanceof IDiagramDocument) {
@@ -703,7 +683,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
protected IRunnableContext getOperationRunner(IProgressMonitor monitor) {
return null;
}
@@ -911,14 +890,12 @@ 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) {
@@ -938,7 +915,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public boolean handleResourceDeleted(Resource resource) {
synchronized (ResourceSetInfo.this) {
if (ResourceSetInfo.this.fCanBeSaved) {
@@ -958,7 +934,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public boolean handleResourceMoved(Resource resource, final URI newURI) {
synchronized (ResourceSetInfo.this) {
if (ResourceSetInfo.this.fCanBeSaved) {
@@ -1009,7 +984,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
/**
* @generated
*/
- @Override
public void notifyChanged(Notification notification) {
if (notification.getNotifier() instanceof ResourceSet) {
super.notifyChanged(notification);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLInitDiagramFileAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLInitDiagramFileAction.java
index f911d7b5286..93529624aba 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLInitDiagramFileAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLInitDiagramFileAction.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import org.eclipse.core.resources.IFile;
@@ -27,7 +25,7 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
@@ -50,7 +48,6 @@ public class UMLInitDiagramFileAction implements IObjectActionDelegate {
/**
* @generated
*/
- @Override
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
this.targetPart = targetPart;
}
@@ -58,7 +55,6 @@ public class UMLInitDiagramFileAction implements IObjectActionDelegate {
/**
* @generated
*/
- @Override
public void selectionChanged(IAction action, ISelection selection) {
domainModelURI = null;
action.setEnabled(false);
@@ -80,7 +76,6 @@ public class UMLInitDiagramFileAction implements IObjectActionDelegate {
/**
* @generated
*/
- @Override
public void run(IAction action) {
TransactionalEditingDomain editingDomain = WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain();
ResourceSet resourceSet = editingDomain.getResourceSet();
@@ -97,7 +92,7 @@ public class UMLInitDiagramFileAction implements IObjectActionDelegate {
return;
}
Wizard wizard = new UMLNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain);
- wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, PackageEditPart.MODEL_ID));
+ wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, SequenceDiagramEditPart.MODEL_ID));
UMLDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLLinkDescriptor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLLinkDescriptor.java
index 1fa4f32dd43..4ada2b404da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLLinkDescriptor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLLinkDescriptor.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import org.eclipse.emf.ecore.EObject;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLMatchingStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLMatchingStrategy.java
index 195bba482fc..36563dafa09 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLMatchingStrategy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLMatchingStrategy.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import org.eclipse.emf.common.ui.URIEditorInput;
@@ -27,7 +25,6 @@ public class UMLMatchingStrategy implements IEditorMatchingStrategy {
/**
* @generated
*/
- @Override
public boolean matches(IEditorReference editorRef, IEditorInput input) {
IEditorInput editorInput;
try {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNewDiagramFileWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNewDiagramFileWizard.java
index d8a3df3e4ae..a0c1e14e50e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNewDiagramFileWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNewDiagramFileWizard.java
@@ -8,9 +8,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import java.io.IOException;
@@ -38,7 +37,7 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
@@ -74,7 +73,7 @@ public class UMLNewDiagramFileWizard extends Wizard {
StructuredSelection.EMPTY);
myFileCreationPage.setTitle(Messages.UMLNewDiagramFileWizard_CreationPageTitle);
myFileCreationPage.setDescription(
- NLS.bind(Messages.UMLNewDiagramFileWizard_CreationPageDescription, PackageEditPart.MODEL_ID));
+ NLS.bind(Messages.UMLNewDiagramFileWizard_CreationPageDescription, SequenceDiagramEditPart.MODEL_ID));
IPath filePath;
String fileName = URI.decode(domainModelURI.trimFileExtension().lastSegment());
if (domainModelURI.isPlatformResource()) {
@@ -127,11 +126,11 @@ public class UMLNewDiagramFileWizard extends Wizard {
throws ExecutionException {
String diagramVID = UMLVisualIDRegistry
.getDiagramVisualID(diagramRootElementSelectionPage.getModelElement());
- if (diagramVID.equals(PackageEditPart.VISUAL_ID)) {
+ if (diagramVID.equals(SequenceDiagramEditPart.VISUAL_ID)) {
return CommandResult.newErrorCommandResult(Messages.UMLNewDiagramFileWizard_IncorrectRootError);
}
Diagram diagram = ViewService.createDiagram(diagramRootElementSelectionPage.getModelElement(),
- PackageEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ SequenceDiagramEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
diagramResource.getContents().add(diagram);
return CommandResult.newOKCommandResult();
}
@@ -181,7 +180,7 @@ public class UMLNewDiagramFileWizard extends Wizard {
}
boolean result = ViewService.getInstance()
.provides(new CreateDiagramViewOperation(new EObjectAdapter(getModelElement()),
- PackageEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
+ SequenceDiagramEditPart.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.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNodeDescriptor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNodeDescriptor.java
index 199fee85aaa..d6ea663e395 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNodeDescriptor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNodeDescriptor.java
@@ -8,9 +8,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import org.eclipse.emf.ecore.EObject;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLUriEditorInputTester.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLUriEditorInputTester.java
index 429f0d5947e..53f6ace6431 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLUriEditorInputTester.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLUriEditorInputTester.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import org.eclipse.core.expressions.PropertyTester;
@@ -24,7 +22,6 @@ public class UMLUriEditorInputTester extends PropertyTester {
/**
* @generated
*/
- @Override
public boolean test(Object receiver, String method, Object[] args, Object expectedValue) {
if (false == receiver instanceof URIEditorInput) {
return false;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java
index 5f5be7079b6..1d2be89322a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java
@@ -22,6 +22,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.structure.DiagramStructure;
import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.DurationObservationHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
@@ -80,6 +81,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncAppliedSte
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantLabelEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart;
@@ -117,8 +119,8 @@ public class UMLVisualIDRegistry {
*/
public static String getVisualID(View view) {
if (view instanceof Diagram) {
- if (PackageEditPart.MODEL_ID.equals(view.getType())) {
- return PackageEditPart.VISUAL_ID;
+ if (SequenceDiagramEditPart.MODEL_ID.equals(view.getType())) {
+ return SequenceDiagramEditPart.VISUAL_ID;
} else {
return "";
}
@@ -162,7 +164,7 @@ public class UMLVisualIDRegistry {
if (domainElement == null) {
return "";
}
- return PackageEditPart.VISUAL_ID;
+ return SequenceDiagramEditPart.VISUAL_ID;
}
/**
@@ -220,7 +222,7 @@ public class UMLVisualIDRegistry {
break;
case LifelineEditPart.VISUAL_ID:
if (UMLPackage.eINSTANCE.getActionExecutionSpecification().isSuperTypeOf(domainElement.eClass())) {
- return ActionExecutionSpecificationEditPart.VISUAL_ID;
+ return CCombinedCompartmentEditPart.VISUAL_ID;
}
if (UMLPackage.eINSTANCE.getBehaviorExecutionSpecification().isSuperTypeOf(domainElement.eClass())) {
return BehaviorExecutionSpecificationEditPart.VISUAL_ID;
@@ -406,12 +408,15 @@ public class UMLVisualIDRegistry {
if (LifelineNameEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
- if (ActionExecutionSpecificationEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ if (CCombinedCompartmentEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
if (BehaviorExecutionSpecificationEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
+ if (ActionExecutionSpecificationEditPart.VISUAL_ID.equals(nodeVisualID)) {
+ return true;
+ }
if (StateInvariantEditPart.VISUAL_ID.equals(nodeVisualID)) {
return true;
}
@@ -728,11 +733,11 @@ public class UMLVisualIDRegistry {
public static boolean isSemanticLeafVisualID(String visualID) {
if (visualID != null) {
switch (visualID) {
- case PackageEditPart.VISUAL_ID:
+ case SequenceDiagramEditPart.VISUAL_ID:
return false;
case InteractionUseEditPart.VISUAL_ID:
case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ case CCombinedCompartmentEditPart.VISUAL_ID:
case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
case ConstraintEditPart.VISUAL_ID:
case CommentEditPart.VISUAL_ID:
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/ValidateAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/ValidateAction.java
index a5fde6638db..be380f7faf7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/ValidateAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/part/ValidateAction.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.part;
import java.lang.reflect.InvocationTargetException;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ActionExecutionSpecificationPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ActionExecutionSpecificationPreferencePage.java
deleted file mode 100644
index d67407876d2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ActionExecutionSpecificationPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class ActionExecutionSpecificationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_ActionExecutionSpecification");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_ActionExecutionSpecification";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 16);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 60);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/BehaviorExecutionSpecificationPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/BehaviorExecutionSpecificationPreferencePage.java
deleted file mode 100644
index 4e0100862ba..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/BehaviorExecutionSpecificationPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class BehaviorExecutionSpecificationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public BehaviorExecutionSpecificationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_BehaviorExecutionSpecification");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_BehaviorExecutionSpecification";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 16);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 60);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/CombinedFragmentPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/CombinedFragmentPreferencePage.java
deleted file mode 100644
index 0d5364ca3e3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/CombinedFragmentPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- * Vincent Lorenzo - vincent.lorenzo@cea.fr - CEA - LIST
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class CombinedFragmentPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public CombinedFragmentPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_CombinedFragment");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_CombinedFragment";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/CommentPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/CommentPreferencePage.java
deleted file mode 100644
index cf6b45a1c28..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/CommentPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class CommentPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public CommentPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Comment");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_Comment";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConsiderIgnoreFragmentPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConsiderIgnoreFragmentPreferencePage.java
deleted file mode 100644
index 805269de502..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConsiderIgnoreFragmentPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- * Vincent Lorenzo - vincent.lorenzo@cea.fr - CEA - LIST
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class ConsiderIgnoreFragmentPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public ConsiderIgnoreFragmentPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_ConsiderIgnoreFragment");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_ConsiderIgnoreFragment";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConstraintPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConstraintPreferencePage.java
deleted file mode 100644
index 1f72315a99c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConstraintPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class ConstraintPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public ConstraintPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Constraint");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_Constraint";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ContinuationPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ContinuationPreferencePage.java
deleted file mode 100644
index f3ac00e5af8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/ContinuationPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class ContinuationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public ContinuationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Continuation");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_Continuation";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionOccurrenceSpecificationPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionOccurrenceSpecificationPreferencePage.java
deleted file mode 100644
index 9ed9db0b72a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionOccurrenceSpecificationPreferencePage.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DestructionOccurrenceSpecificationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public DestructionOccurrenceSpecificationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_DestructionOccurrenceSpecification");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_DestructionOccurrenceSpecification";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramAppearancePreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramAppearancePreferencePage.java
index bce09d42592..35b0ce47633 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramAppearancePreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramAppearancePreferencePage.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.preferences;
import org.eclipse.gmf.runtime.diagram.ui.preferences.AppearancePreferencePage;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramConnectionsPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramConnectionsPreferencePage.java
index 4ec312ed566..0121afbf94c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramConnectionsPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramConnectionsPreferencePage.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.preferences;
import org.eclipse.gmf.runtime.diagram.ui.preferences.ConnectionsPreferencePage;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramGeneralPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramGeneralPreferencePage.java
index ccd73b77bb0..fe1606aa325 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramGeneralPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramGeneralPreferencePage.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,13 +7,12 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.preferences;
import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.DiagramPreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
/**
@@ -27,6 +25,6 @@ public class DiagramGeneralPreferencePage extends DiagramPreferencePage {
*/
public DiagramGeneralPreferencePage() {
setPreferenceStore(UMLDiagramEditorPlugin.getInstance().getPreferenceStore());
- setPreferenceKey(PackageEditPart.MODEL_ID);
+ setPreferenceKey(SequenceDiagramEditPart.MODEL_ID);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPreferenceInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPreferenceInitializer.java
index d15d1754f7c..9b2e4a7bacd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPreferenceInitializer.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPreferenceInitializer.java
@@ -8,7 +8,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
+ * CEA LIST - Initial API and implementation
* Fanch BONNABESSE (ALL4TEC) fanch.bonnabesse@all4tec.net - Bug 512207
*
*****************************************************************************/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPrintingPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPrintingPreferencePage.java
index ed0d60fa802..c7a9f186dd2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPrintingPreferencePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPrintingPreferencePage.java
@@ -1,6 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* 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,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.preferences;
import org.eclipse.gmf.runtime.diagram.ui.preferences.PrintingPreferencePage;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramRulersAndGridPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramRulersAndGridPreferencePage.java
new file mode 100644
index 00000000000..11352122d7f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramRulersAndGridPreferencePage.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.sequence.preferences;
+
+import org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage;
+import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
+
+/**
+ * @generated
+ */
+public class DiagramRulersAndGridPreferencePage extends RulerGridPreferencePage {
+
+ /**
+ * @generated
+ */
+ public DiagramRulersAndGridPreferencePage() {
+ setPreferenceStore(UMLDiagramEditorPlugin.getInstance().getPreferenceStore());
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintInMessagePreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintInMessagePreferencePage.java
deleted file mode 100644
index 00564e5d537..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintInMessagePreferencePage.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DurationConstraintInMessagePreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- UMLDiagramEditorPlugin.getInstance();
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String elementName = "DurationConstraintInMessage";
- PreferenceConverter.setDefault(store, PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- PreferenceConverter.setDefault(store, PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- store.setDefault(PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.GRADIENT_POLICY), false);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(new org.eclipse.swt.graphics.RGB(255, 255, 255), new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintPreferencePage.java
deleted file mode 100644
index 9669bdf84e9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DurationConstraintPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public DurationConstraintPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_DurationConstraint");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_DurationConstraint";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationObservationPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationObservationPreferencePage.java
deleted file mode 100644
index c85ab8b29d3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationObservationPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DurationObservationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public DurationObservationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_DurationObservation");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_DurationObservation";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/GeneralOrderingPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/GeneralOrderingPreferencePage.java
deleted file mode 100644
index 904d212907a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/GeneralOrderingPreferencePage.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class GeneralOrderingPreferencePage extends AbstractPapyrusLinkPreferencePage {
-
- /**
- * @generated
- */
- public GeneralOrderingPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_GeneralOrdering");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionOperandPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionOperandPreferencePage.java
deleted file mode 100644
index 3f1a29d814f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionOperandPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class InteractionOperandPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public InteractionOperandPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_InteractionOperand");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_InteractionOperand";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionPreferencePage.java
deleted file mode 100644
index 42188c91499..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionPreferencePage.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class InteractionPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public static final String compartments[] = { "InteractionCompartment" };
-
- /**
- * @generated
- */
- public InteractionPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Interaction");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_Interaction";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 857);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 757);
- Map<String, Boolean> map = getStaticCompartmentVisibilityPreferences();
- for (String name : map.keySet()) {
- String preferenceName = PreferencesConstantsHelper.getLabelElementConstant(key, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, map.get(name));
- }
- map = getStaticCompartmentTitleVisibilityPreferences();
- for (String name : map.keySet()) {
- String preferenceName = PreferencesConstantsHelper.getLabelElementConstant(key, name, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
- store.setDefault(preferenceName, map.get(name));
- }
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-
- /**
- * @generated
- */
- @Override
- protected void initializeCompartmentsList() {
- for (String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-
- /**
- * @generated
- */
- private static TreeMap<String, Boolean> getStaticCompartmentVisibilityPreferences() {
- TreeMap<String, Boolean> map = new TreeMap();
- map.put("InteractionCompartment", Boolean.TRUE);
- return map;
- }
-
- /**
- * @generated
- */
- private static TreeMap<String, Boolean> getStaticCompartmentTitleVisibilityPreferences() {
- TreeMap<String, Boolean> map = new TreeMap();
- return map;
- }
-
- /**
- * @generated
- */
- @Override
- protected TreeMap<String, Boolean> getCompartmentTitleVisibilityPreferences() {
- return getStaticCompartmentTitleVisibilityPreferences();
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionUsePreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionUsePreferencePage.java
deleted file mode 100644
index dac77c403da..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionUsePreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class InteractionUsePreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public InteractionUsePreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_InteractionUse");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_InteractionUse";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/LifelinePreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/LifelinePreferencePage.java
deleted file mode 100644
index ef99a851c8b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/LifelinePreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class LifelinePreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public LifelinePreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Lifeline");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_Lifeline";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 100);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 250);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessageOccurrenceSpecificationPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessageOccurrenceSpecificationPreferencePage.java
deleted file mode 100644
index 5774cb4ade3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessageOccurrenceSpecificationPreferencePage.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class MessageOccurrenceSpecificationPreferencePage extends AbstractPapyrusLinkPreferencePage {
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- UMLDiagramEditorPlugin.getInstance();
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessagePreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessagePreferencePage.java
deleted file mode 100644
index a565d6c8565..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessagePreferencePage.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class MessagePreferencePage extends AbstractPapyrusLinkPreferencePage {
-
- /**
- * @generated
- */
- public MessagePreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Message");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/StateInvariantPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/StateInvariantPreferencePage.java
deleted file mode 100644
index 2098503a183..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/StateInvariantPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class StateInvariantPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public StateInvariantPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_StateInvariant");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_StateInvariant";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeConstraintPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeConstraintPreferencePage.java
deleted file mode 100644
index 7e5db26da26..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeConstraintPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class TimeConstraintPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public TimeConstraintPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_TimeConstraint");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_TimeConstraint";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeObservationPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeObservationPreferencePage.java
deleted file mode 100644
index 62c9db67047..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeObservationPreferencePage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class TimeObservationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public TimeObservationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_TimeObservation");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- String key = PackageEditPart.MODEL_ID + "_TimeObservation";
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.WIDTH), 40);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(key, PreferencesConstantsHelper.HEIGHT), 40);
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- // org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName,
- // org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
- // Set the default for the gradient
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.GRADIENT_POLICY),false);
- // org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- // store.setDefault(org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.COLOR_GRADIENT),
- // gradientPreferenceConverter.getPreferenceValue());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLEditPartProvider.java
index c255675718a..1ac13ad4142 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLEditPartProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLEditPartProvider.java
@@ -8,13 +8,12 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.providers;
import org.eclipse.papyrus.infra.gmfdiag.common.providers.DefaultEditPartProvider;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.UMLEditPartFactory;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
@@ -27,6 +26,6 @@ public class UMLEditPartProvider extends DefaultEditPartProvider {
* @generated
*/
public UMLEditPartProvider() {
- super(new UMLEditPartFactory(), UMLVisualIDRegistry.TYPED_INSTANCE, PackageEditPart.MODEL_ID);
+ super(new UMLEditPartFactory(), UMLVisualIDRegistry.TYPED_INSTANCE, SequenceDiagramEditPart.MODEL_ID);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java
index bd299bf1495..b1edf58028e 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java
@@ -1,3 +1,15 @@
+
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.providers;
import java.util.HashSet;
@@ -9,10 +21,10 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.providers.DiagramElementTypeImages;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.gmfdiag.common.providers.DiagramElementTypes;
-import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.providers.DiagramElementTypeImages;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
@@ -39,7 +51,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
@@ -78,157 +90,157 @@ public class UMLElementTypes {
* @generated
*/
public static final IElementType Package_SequenceDiagram = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Package_SequenceDiagram"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Package_SequenceDiagram"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Interaction_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Interaction_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Interaction_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType ConsiderIgnoreFragment_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.ConsiderIgnoreFragment_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.ConsiderIgnoreFragment_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType CombinedFragment_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.CombinedFragment_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType InteractionOperand_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.InteractionOperand_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.InteractionOperand_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType InteractionUse_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.InteractionUse_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.InteractionUse_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Continuation_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Continuation_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Continuation_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Lifeline_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Lifeline_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Lifeline_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType ActionExecutionSpecification_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.ActionExecutionSpecification_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.ActionExecutionSpecification_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType BehaviorExecutionSpecification_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.BehaviorExecutionSpecification_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.BehaviorExecutionSpecification_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType StateInvariant_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.StateInvariant_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.StateInvariant_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType CombinedFragment_CoRegionShape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_CoRegionShape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.CombinedFragment_CoRegionShape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType TimeConstraint_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.TimeConstraint_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.TimeConstraint_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType TimeObservation_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.TimeObservation_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.TimeObservation_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType DurationConstraint_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.DurationConstraint_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType DestructionOccurrenceSpecification_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.DestructionOccurrenceSpecification_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.DestructionOccurrenceSpecification_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Constraint_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Constraint_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Constraint_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Comment_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Comment_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Comment_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType DurationConstraint_Shape_CN = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_Shape_CN"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.DurationConstraint_Shape_CN"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType DurationObservation_Shape = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.DurationObservation_Shape"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.DurationObservation_Shape"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Message_SynchEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Message_SynchEdge"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Message_SynchEdge"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Message_AsynchEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Message_AsynchEdge"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Message_AsynchEdge"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Message_ReplyEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Message_ReplyEdge"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Message_ReplyEdge"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Message_CreateEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Message_CreateEdge"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Message_CreateEdge"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Message_DeleteEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Message_DeleteEdge"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Message_DeleteEdge"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Message_LostEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Message_LostEdge"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Message_LostEdge"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Message_FoundEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Message_FoundEdge"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Message_FoundEdge"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Comment_AnnotatedElementEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Comment_AnnotatedElementEdge"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Comment_AnnotatedElementEdge"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Constraint_ConstrainedElementEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Constraint_ConstrainedElementEdge"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Constraint_ConstrainedElementEdge"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType GeneralOrdering_Edge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.GeneralOrdering_Edge"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.GeneralOrdering_Edge"); //$NON-NLS-1$
/**
* @generated
*/
public static final IElementType Constraint_ContextEdge = getElementTypeByUniqueId(
- "org.eclipse.papyrus.uml.diagram.sequence.Constraint_ContextEdge"); //$NON-NLS-1$
+ "org.eclipse.papyrus.umldi.Constraint_ContextEdge"); //$NON-NLS-1$
/**
* @generated
@@ -399,7 +411,7 @@ public class UMLElementTypes {
public static IElementType getElementType(String visualID) {
if (visualID != null) {
switch (visualID) {
- case PackageEditPart.VISUAL_ID:
+ case SequenceDiagramEditPart.VISUAL_ID:
return Package_SequenceDiagram;
case InteractionEditPart.VISUAL_ID:
return Interaction_Shape;
@@ -415,7 +427,7 @@ public class UMLElementTypes {
return Continuation_Shape;
case LifelineEditPart.VISUAL_ID:
return Lifeline_Shape;
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ case CCombinedCompartmentEditPart.VISUAL_ID:
return ActionExecutionSpecification_Shape;
case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
return BehaviorExecutionSpecification_Shape;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLIconProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLIconProvider.java
index fa85d6d6f1b..b25a6c201bf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLIconProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLIconProvider.java
@@ -8,9 +8,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.providers;
import org.eclipse.gmf.runtime.common.ui.services.icon.IIconProvider;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLMarkerNavigationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLMarkerNavigationProvider.java
index 0c435dc0f72..9f7590d3f8c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLMarkerNavigationProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLMarkerNavigationProvider.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.providers;
import java.util.Arrays;
@@ -28,7 +39,6 @@ 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)) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationDecoratorProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationDecoratorProvider.java
index d8053e80bf9..83ece279a8d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationDecoratorProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationDecoratorProvider.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.providers;
import org.eclipse.gef.EditDomain;
@@ -12,7 +23,7 @@ import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
@@ -24,7 +35,6 @@ 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) {
@@ -48,13 +58,12 @@ public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider
/**
* @generated
*/
- @Override
public boolean provides(IOperation operation) {
if (!(operation instanceof CreateDecoratorsOperation)) {
return false;
}
IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation).getDecoratorTarget();
View view = (View) decoratorTarget.getAdapter(View.class);
- return view != null && PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
+ return view != null && SequenceDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationProvider.java
index 2f5f870cc19..3183703de28 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationProvider.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
package org.eclipse.papyrus.uml.diagram.sequence.providers;
import java.util.Arrays;
@@ -16,7 +27,7 @@ import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.sequence.validation.UMLValidationHelper;
@@ -75,7 +86,8 @@ public class UMLValidationProvider {
return false;
}
if (object instanceof View) {
- return constraintsActive && PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID((View) object));
+ return constraintsActive
+ && SequenceDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID((View) object));
}
return true;
}
@@ -88,7 +100,6 @@ public class UMLValidationProvider {
/**
* @generated
*/
- @Override
public boolean selects(Object object) {
return isInDefaultEditorContext(object);
}
@@ -100,11 +111,8 @@ public class UMLValidationProvider {
public static class Ctx_3001 implements IClientSelector {
/**
- * select all moved edit parts which are linked to an occurrence specification
- *
* @generated
*/
- @Override
public boolean selects(Object object) {
if (isInDefaultEditorContext(object) && object instanceof View) {
final String id = UMLVisualIDRegistry.getVisualID((View) object);
@@ -170,7 +178,6 @@ public class UMLValidationProvider {
/**
* @generated
*/
- @Override
public void elementValidated(EObject element, IStatus status) {
defaultStrategy.elementValidated(element, status);
}
@@ -178,7 +185,6 @@ public class UMLValidationProvider {
/**
* @generated
*/
- @Override
public boolean hasNext() {
return defaultStrategy.hasNext();
}
@@ -186,7 +192,6 @@ public class UMLValidationProvider {
/**
* @generated
*/
- @Override
public boolean isClientContextChanged() {
if (preFetchedNextTarget == null) {
preFetchedNextTarget = next();
@@ -198,7 +203,6 @@ public class UMLValidationProvider {
/**
* @generated
*/
- @Override
public EObject next() {
EObject nextTarget = preFetchedNextTarget;
if (nextTarget == null) {
@@ -211,7 +215,6 @@ public class UMLValidationProvider {
/**
* @generated
*/
- @Override
public void startTraversal(Collection traversalRoots, IProgressMonitor monitor) {
defaultStrategy.startTraversal(traversalRoots, monitor);
}
@@ -250,7 +253,6 @@ public class UMLValidationProvider {
/**
* @generated
*/
- @Override
public IStatus validate(IValidationContext ctx) {
Interaction context = (Interaction) ctx.getTarget();
return UMLValidationHelper.validateFragmentsOrder(context, ctx);
@@ -265,7 +267,6 @@ public class UMLValidationProvider {
/**
* @generated
*/
- @Override
public IStatus validate(IValidationContext ctx) {
InteractionOperand context = (InteractionOperand) ctx.getTarget();
return UMLValidationHelper.validateFragmentsOrder(context, ctx);
@@ -278,11 +279,8 @@ public class UMLValidationProvider {
public static class Adapter3 extends AbstractModelConstraint {
/**
- * do not presume on target type
- *
* @generated
*/
- @Override
public IStatus validate(IValidationContext ctx) {
Node context = (Node) ctx.getTarget();
return UMLValidationHelper.validateFragmentsOrder(context, ctx);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java
index 25395c492a0..1d2f1ef6900 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java
@@ -57,6 +57,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstants
import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils;
import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CCombinedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
@@ -116,7 +117,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyNameEditP
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantLabelEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart;
@@ -191,14 +192,14 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*
* @return the unique identifier of the diagram for which views are provided.
*/
- return PackageEditPart.MODEL_ID;
+ return SequenceDiagramEditPart.MODEL_ID;
}
/**
* @generated
*/
protected boolean provides(CreateDiagramViewOperation op) {
- return PackageEditPart.MODEL_ID.equals(op.getSemanticHint())
+ return SequenceDiagramEditPart.MODEL_ID.equals(op.getSemanticHint())
&& UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())) != null
&& !UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())).isEmpty();
}
@@ -237,7 +238,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// return false; // visual id for node EClass should match visual id from element type
//}
} else {
- if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) {
+ if (!SequenceDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
if (visualID != null) {
@@ -249,7 +250,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
case InteractionUseEditPart.VISUAL_ID:
case ContinuationEditPart.VISUAL_ID:
case LifelineEditPart.VISUAL_ID:
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ case CCombinedCompartmentEditPart.VISUAL_ID:
case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
case StateInvariantEditPart.VISUAL_ID:
case TimeConstraintEditPart.VISUAL_ID:
@@ -308,7 +309,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Diagram diagram = NotationFactory.eINSTANCE.createDiagram();
DiagramVersioningUtils.stampCurrentVersion(diagram);
diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle());
- diagram.setType(PackageEditPart.MODEL_ID);
+ diagram.setType(SequenceDiagramEditPart.MODEL_ID);
diagram.setElement(getSemanticElement(semanticAdapter));
diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL);
return diagram;
@@ -344,12 +345,15 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return createContinuation_Shape(domainElement, containerView, index, persisted, preferencesHint);
case LifelineEditPart.VISUAL_ID:
return createLifeline_Shape(domainElement, containerView, index, persisted, preferencesHint);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ case CCombinedCompartmentEditPart.VISUAL_ID:
return createActionExecutionSpecification_Shape(domainElement, containerView, index, persisted,
preferencesHint);
case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
return createBehaviorExecutionSpecification_Shape(domainElement, containerView, index, persisted,
preferencesHint);
+ case ActionExecutionSpecificationEditPart.VISUAL_ID:
+ return createActionExecutionSpecification_Shape(domainElement, containerView, index, persisted,
+ preferencesHint);
case StateInvariantEditPart.VISUAL_ID:
return createStateInvariant_Shape(domainElement, containerView, index, persisted, preferencesHint);
case CombinedFragment2EditPart.VISUAL_ID:
@@ -1239,10 +1243,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
protected void stampShortcut(View containerView, Node target) {
- if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
+ if (!SequenceDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
- shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$
+ shortcutAnnotation.getDetails().put("modelID", SequenceDiagramEditPart.MODEL_ID); //$NON-NLS-1$
target.getEAnnotations().add(shortcutAnnotation);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLVisualTypeProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLVisualTypeProvider.java
index 7328e228ca5..52b70c4aee2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLVisualTypeProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLVisualTypeProvider.java
@@ -1,5 +1,5 @@
-/*****************************************************************************
- * Copyright (c) 2015 Christian W. Damus and others.
+/**
+ * Copyright (c) 2016 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/parts/CustomInteractionEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/parts/CustomInteractionEditPartTN.java
index 5c47ba0ad0e..6bfc8411c52 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/parts/CustomInteractionEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/parts/CustomInteractionEditPartTN.java
@@ -50,7 +50,7 @@ public class CustomInteractionEditPartTN extends InteractionEditPartTN {
@Override
protected IFigure createNodeShape() {
final CustomInteractionRectangleFigure interactionRectangleFigure = new CustomInteractionRectangleFigure();
- interactionRectangleFigure.getCompartmentFigure().setOutline(false);
+ //interactionRectangleFigure.getCompartmentFigure().setOutline(false);
interactionRectangleFigure.getNameLabel().setVisible(false);
// disable the shadow because it stays behind after move then Ctrl+Z
interactionRectangleFigure.setShadow(false);
@@ -67,8 +67,8 @@ public class CustomInteractionEditPartTN extends InteractionEditPartTN {
int consumedHeight = 0;
for (int i = 0; i < children.size(); i++) {
final IFigure child = children.get(i);
- if (child.equals(interactionRectangleFigure.getHeaderLabelContainer())) {
- final int height = Math.max(interactionRectangleFigure.getHeaderLabel().getPreferredSize().height + HEADER_HEIGHT_PADDING, MIN_HEADER_HEIGHT);
+ if (child.equals(interactionRectangleFigure.getNameLabel())) {
+ final int height = Math.max(interactionRectangleFigure.getNameLabel().getPreferredSize().height + HEADER_HEIGHT_PADDING, MIN_HEADER_HEIGHT);
child.setBounds(new Rectangle(clientArea.x, clientArea.y + consumedHeight, clientArea.width, height));
consumedHeight = consumedHeight + height;
} else if (child.equals(interactionRectangleFigure.getCompartmentFigure())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/figures/CustomInteractionRectangleFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/figures/CustomInteractionRectangleFigure.java
index 85a2656f01e..4db58411385 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/figures/CustomInteractionRectangleFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/figures/CustomInteractionRectangleFigure.java
@@ -8,6 +8,8 @@
*******************************************************************************/
package org.eclipse.papyrus.uml.diagram.timing.custom.figures;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.MarginBorder;
import org.eclipse.draw2d.RectangleFigure;
@@ -24,13 +26,10 @@ public class CustomInteractionRectangleFigure extends InteractionRectangleFigure
public CustomInteractionRectangleFigure() {
setLayoutManager(new ToolbarLayout());
- createContents();
}
@Override
- protected void createContents() {
- add(createInteractionFigureHeader());
- add(createContentPane());
+ protected void createContentPane(final List<String> compartmentFigure) {
final int childrenSize = getChildren().size();
add(createTimeRulerCompartment(), childrenSize);
}
@@ -39,30 +38,9 @@ public class CustomInteractionRectangleFigure extends InteractionRectangleFigure
return this.timeRulerCompartment = new TimeRulerFigure();
}
- protected InteractionFigure createInteractionFigureHeader() {
- this.interactionLabel = new PapyrusWrappingLabel() {
-
- @Override
- public Dimension getPreferredSize(final int wHint, final int hHint) {
- final Dimension preferredSize = super.getPreferredSize(wHint, hHint);
- if (preferredSize.width == 0) {
- return preferredSize;
- }
- return new Dimension(preferredSize.width + 2, preferredSize.height + 2);
- }
- };
+
- this.interactionLabelContainer = new InteractionFigure();
- this.interactionLabelContainer.setBorder(new MarginBorder(3, 3, 0, 0));
- this.interactionLabelContainer.setLayoutManager(new LeftToolbarLayout());
- this.interactionLabelContainer.add(this.interactionLabel);
- return this.interactionLabelContainer;
- }
-
- public InteractionFigure getHeaderLabelContainer() {
- return this.interactionLabelContainer;
- }
public RectangleFigure getTimeRulerContainerFigure() {
return this.timeRulerCompartment;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/parts/InteractionEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/parts/InteractionEditPartTN.java
index 31913873fd4..ab01d60514b 100755..100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/parts/InteractionEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/edit/parts/InteractionEditPartTN.java
@@ -1,13 +1,13 @@
/**
* Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.uml.diagram.timing.edit.parts;
@@ -79,6 +79,7 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
protected void createDefaultEditPolicies() {
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
@@ -133,9 +134,11 @@ public class InteractionEditPartTN extends NamedElementEditPart {
}
/**
- *Papyrus codeGen
- *@generated
- **/
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
@@ -144,14 +147,17 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
protected IFigure createNodeShape() {
return primaryShape = new CustomInteractionRectangleFigure();
}
/**
* org.eclipse.papyrus.uml.diagram.timing.custom.figures.CustomInteractionRectangleFigure
+ *
* @generated
*/
+ @Override
public CustomInteractionRectangleFigure getPrimaryShape() {
return (CustomInteractionRectangleFigure) primaryShape;
}
@@ -161,20 +167,20 @@ public class InteractionEditPartTN extends NamedElementEditPart {
*/
protected boolean addFixedChild(EditPart childEditPart) {
if (childEditPart instanceof InteractionNameEditPart) {
- ((InteractionNameEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderLabel());
+ ((InteractionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
if (childEditPart instanceof InteractionCompartmentEditPartTN) {
IFigure pane = getPrimaryShape().getCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((InteractionCompartmentEditPartTN) childEditPart).getFigure());
return true;
}
if (childEditPart instanceof TimeRulerCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getTimeRulerContainerFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((TimeRulerCompartmentEditPartCN) childEditPart).getFigure());
return true;
}
@@ -214,6 +220,7 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
protected void addChildVisual(EditPart childEditPart, int index) {
if (addFixedChild(childEditPart)) {
return;
@@ -224,6 +231,7 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
protected void removeChildVisual(EditPart childEditPart) {
if (removeFixedChild(childEditPart)) {
return;
@@ -234,6 +242,7 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
if (editPart instanceof InteractionCompartmentEditPartTN) {
return getPrimaryShape().getCompartmentFigure();
@@ -250,6 +259,7 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(600, 400);
return result;
@@ -257,12 +267,13 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* 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());
@@ -271,9 +282,12 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* 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) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
@@ -286,6 +300,7 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
public IFigure getContentPane() {
if (contentPane != null) {
return contentPane;
@@ -296,6 +311,7 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
protected void setForegroundColor(Color color) {
if (primaryShape != null) {
primaryShape.setForegroundColor(color);
@@ -305,6 +321,7 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -312,6 +329,7 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
protected void setLineType(int style) {
if (primaryShape instanceof IPapyrusNodeFigure) {
((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
@@ -321,6 +339,7 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(InteractionNameEditPart.VISUAL_ID));
}
@@ -328,6 +347,7 @@ public class InteractionEditPartTN extends NamedElementEditPart {
/**
* @generated
*/
+ @Override
public EditPart getTargetEditPart(Request request) {
if (request instanceof CreateViewAndElementRequest) {
CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request).getViewAndElementDescriptor()
@@ -348,5 +368,4 @@ public class InteractionEditPartTN extends NamedElementEditPart {
}
return super.getTargetEditPart(request);
}
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.di b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.di
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.notation b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.notation
new file mode 100644
index 00000000000..daa3022bdb1
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.notation
@@ -0,0 +1,564 @@
+<?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:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_2XP2YJbIEeaTDudJBcLTVw" type="PapyrusUMLSequenceDiagram" name="Sequence Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_2XP2YZbIEeaTDudJBcLTVw" type="Interaction_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_2XP2YpbIEeaTDudJBcLTVw" type="Interaction_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_2XP2Y5bIEeaTDudJBcLTVw" type="Interaction_SubfragmentCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_4I0hsJbIEeaTDudJBcLTVw" type="Lifeline_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_4I1v0JbIEeaTDudJBcLTVw" type="Lifeline_NameLabel"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_QMO2YJbUEeaTDudJBcLTVw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_QMPdcJbUEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QMPdcZbUEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ciZFUJbVEeaTDudJBcLTVw" type="TimeConstraint_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ciZFUpbVEeaTDudJBcLTVw" type="TimeConstraint_ConstraintLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ciZsYJbVEeaTDudJBcLTVw" x="-53" y="56"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ciZsYZbVEeaTDudJBcLTVw" type="TimeConstraint_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ciZsYpbVEeaTDudJBcLTVw" y="-22"/>
+ </children>
+ <element xmi:type="uml:TimeConstraint" href="model.uml#_ciAq0JbVEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ciZFUZbVEeaTDudJBcLTVw" x="51" y="83" height="1"/>
+ </children>
+ <element xmi:type="uml:Lifeline" href="model.uml#_4IYc0JbIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4I1IwJbIEeaTDudJBcLTVw" x="701" y="10" width="100" height="700"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_4cWhsJbIEeaTDudJBcLTVw" type="Lifeline_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_4cWhspbIEeaTDudJBcLTVw" type="Lifeline_NameLabel"/>
+ <element xmi:type="uml:Lifeline" href="model.uml#_4cQbEJbIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4cWhsZbIEeaTDudJBcLTVw" x="279" y="10" width="100" height="700"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2XP2ZJbIEeaTDudJBcLTVw"/>
+ </children>
+ <element xmi:type="uml:Interaction" href="model.uml#_2T8DsJbIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2XP2ZZbIEeaTDudJBcLTVw"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_2XP2ZpbIEeaTDudJBcLTVw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_2XP2Z5bIEeaTDudJBcLTVw"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_2XP2aJbIEeaTDudJBcLTVw">
+ <owner xmi:type="uml:Model" href="model.uml#_2RLDkJbIEeaTDudJBcLTVw"/>
+ </styles>
+ <element xmi:type="uml:Interaction" href="model.uml#_2T8DsJbIEeaTDudJBcLTVw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_5sn2wJbIEeaTDudJBcLTVw" type="Message_AsynchEdge" source="_4I0hsJbIEeaTDudJBcLTVw" target="_4cWhsJbIEeaTDudJBcLTVw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_5sod0JbIEeaTDudJBcLTVw" type="Message_AsynchNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_5sod0ZbIEeaTDudJBcLTVw" x="1" y="-13"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_5sod0pbIEeaTDudJBcLTVw" type="Message_AsynchStereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_5spE4JbIEeaTDudJBcLTVw" x="1" y="-33"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_5tjD0JbIEeaTDudJBcLTVw" type="MessageEnd_Shape">
+ <element xmi:type="uml:MessageOccurrenceSpecification" href="model.uml#_5sJ8sJbIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5tjD0ZbIEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_5tnVQJbIEeaTDudJBcLTVw" type="MessageEnd_Shape">
+ <element xmi:type="uml:MessageOccurrenceSpecification" href="model.uml#_5sKjwJbIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5tnVQZbIEeaTDudJBcLTVw"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_5sn2wZbIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:LineStyle" xmi:id="_5spr8JbIEeaTDudJBcLTVw"/>
+ <element xmi:type="uml:Message" href="model.uml#_5sD2EJbIEeaTDudJBcLTVw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5sn2wpbIEeaTDudJBcLTVw" points="[0, 0, -404, -22]$[404, 230, 0, 208]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5uNLIJbIEeaTDudJBcLTVw" id="(1.0,0.07772795216741404)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5uNLIZbIEeaTDudJBcLTVw" id="(0.0,0.11061285500747384){L}"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_ZUKecJeIEeaTDudJBcLTVw" type="PapyrusUMLClassDiagram" name="ClassDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_Zum-wJeIEeaTDudJBcLTVw" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Zunl0JeIEeaTDudJBcLTVw" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Zunl0ZeIEeaTDudJBcLTVw" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZuoM4JeIEeaTDudJBcLTVw" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ZuzMAJeIEeaTDudJBcLTVw" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ZuzMAZeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ZuzMApeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ZuzMA5eIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZuzMBJeIEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ZuzMBZeIEeaTDudJBcLTVw" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ZuzMBpeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ZuzMB5eIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ZuzMCJeIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZuzMCZeIEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ZuzzEJeIEeaTDudJBcLTVw" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ZuzzEZeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ZuzzEpeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ZuzzE5eIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZuzzFJeIEeaTDudJBcLTVw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_Zuj7cJeIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Zum-wZeIEeaTDudJBcLTVw" x="334" y="441"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_aDPyAJeIEeaTDudJBcLTVw" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_aDQZEJeIEeaTDudJBcLTVw" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aDQZEZeIEeaTDudJBcLTVw" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aDQZEpeIEeaTDudJBcLTVw" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_aDQZE5eIEeaTDudJBcLTVw" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_aDQZFJeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_aDQZFZeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_aDQZFpeIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aDQZF5eIEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_aDQZGJeIEeaTDudJBcLTVw" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_aDQZGZeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_aDQZGpeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_aDQZG5eIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aDQZHJeIEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_aDQZHZeIEeaTDudJBcLTVw" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_aDQZHpeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_aDQZH5eIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_aDQZIJeIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aDQZIZeIEeaTDudJBcLTVw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_aDN80JeIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aDPyAZeIEeaTDudJBcLTVw" x="560" y="130"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_cK2XsJeIEeaTDudJBcLTVw" type="Comment_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_cK2XspeIEeaTDudJBcLTVw" type="Comment_BodyLabel"/>
+ <element xmi:type="uml:Comment" href="model.uml#_cKzUYJeIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cK2XsZeIEeaTDudJBcLTVw" x="851" y="327"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_033EAJeIEeaTDudJBcLTVw" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_033rEJeIEeaTDudJBcLTVw" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_033rEZeIEeaTDudJBcLTVw" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_033rEpeIEeaTDudJBcLTVw" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_034SIJeIEeaTDudJBcLTVw" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_034SIZeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_034SIpeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_034SI5eIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_034SJJeIEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_034SJZeIEeaTDudJBcLTVw" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_034SJpeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_034SJ5eIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_034SKJeIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_034SKZeIEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_034SKpeIEeaTDudJBcLTVw" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_034SK5eIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_034SLJeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_034SLZeIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_034SLpeIEeaTDudJBcLTVw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_030nwJeIEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_033EAZeIEeaTDudJBcLTVw" x="719" y="435"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Y7JPkJeKEeaTDudJBcLTVw" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Y7KdsJeKEeaTDudJBcLTVw" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Y7KdsZeKEeaTDudJBcLTVw" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Y7KdspeKEeaTDudJBcLTVw" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Y7Kds5eKEeaTDudJBcLTVw" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Y7KdtJeKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Y7KdtZeKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Y7KdtpeKEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y7Kdt5eKEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Y7LEwJeKEeaTDudJBcLTVw" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Y7LEwZeKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Y7LEwpeKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Y7LEw5eKEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y7LExJeKEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Y7LExZeKEeaTDudJBcLTVw" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Y7LExpeKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Y7LEx5eKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Y7LEyJeKEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y7LEyZeKEeaTDudJBcLTVw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_Y7FlMJeKEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Y7JPkZeKEeaTDudJBcLTVw" x="142" y="266"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ZBH7wJeKEeaTDudJBcLTVw" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZBH7wpeKEeaTDudJBcLTVw" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZBIi0JeKEeaTDudJBcLTVw" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZBIi0ZeKEeaTDudJBcLTVw" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ZBIi0peKEeaTDudJBcLTVw" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ZBIi05eKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ZBIi1JeKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ZBIi1ZeKEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZBIi1peKEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ZBIi15eKEeaTDudJBcLTVw" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ZBIi2JeKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ZBIi2ZeKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ZBIi2peKEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZBIi25eKEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ZBJJ4JeKEeaTDudJBcLTVw" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ZBJJ4ZeKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ZBJJ4peKEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ZBJJ45eKEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZBJJ5JeKEeaTDudJBcLTVw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_ZBGGkJeKEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZBH7wZeKEeaTDudJBcLTVw" x="733" y="191"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_ZUKecZeIEeaTDudJBcLTVw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_ZUKecpeIEeaTDudJBcLTVw"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_ZUKec5eIEeaTDudJBcLTVw">
+ <owner xmi:type="uml:Model" href="model.uml#_2RLDkJbIEeaTDudJBcLTVw"/>
+ </styles>
+ <element xmi:type="uml:Model" href="model.uml#_2RLDkJbIEeaTDudJBcLTVw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_av2ZUJeIEeaTDudJBcLTVw" type="Association_Edge" source="_Zum-wJeIEeaTDudJBcLTVw" target="_aDPyAJeIEeaTDudJBcLTVw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_av3AYJeIEeaTDudJBcLTVw" type="Association_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_pS_SoJeIEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_av3AYZeIEeaTDudJBcLTVw" x="-2" y="-16"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_av3AYpeIEeaTDudJBcLTVw" type="Association_NameLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_pTIckJeIEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_av3AY5eIEeaTDudJBcLTVw" x="-1" y="19"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_av3AZJeIEeaTDudJBcLTVw" type="Association_TargetRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_pTPxUJeIEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_av3AZZeIEeaTDudJBcLTVw" x="152" y="51"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_av3AZpeIEeaTDudJBcLTVw" type="Association_SourceRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_pTXGEJeIEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_av3ncJeIEeaTDudJBcLTVw" x="-30" y="51"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_av3ncZeIEeaTDudJBcLTVw" type="Association_SourceMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_pTcloJeIEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_av3ncpeIEeaTDudJBcLTVw" x="57" y="19"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_av3nc5eIEeaTDudJBcLTVw" type="Association_TargetMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_pTiFMJeIEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_av3ndJeIEeaTDudJBcLTVw" x="-56" y="-19"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_av2ZUZeIEeaTDudJBcLTVw"/>
+ <element xmi:type="uml:Association" href="model.uml#_avcJoJeIEeaTDudJBcLTVw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_av2ZUpeIEeaTDudJBcLTVw" points="[378, 441, -643984, -643984]$[667, 174, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_axAP4JeIEeaTDudJBcLTVw" id="(0.26,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_axAP4ZeIEeaTDudJBcLTVw" id="(0.0,0.78)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_1iG64JeIEeaTDudJBcLTVw" type="Association_Edge" source="_Zum-wJeIEeaTDudJBcLTVw" target="_033EAJeIEeaTDudJBcLTVw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_1iHh8JeIEeaTDudJBcLTVw" type="Association_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1iHh8ZeIEeaTDudJBcLTVw" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1iHh8peIEeaTDudJBcLTVw" type="Association_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1iHh85eIEeaTDudJBcLTVw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1iHh9JeIEeaTDudJBcLTVw" type="Association_TargetRoleLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1iHh9ZeIEeaTDudJBcLTVw" x="75" y="-97"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1iHh9peIEeaTDudJBcLTVw" type="Association_SourceRoleLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1iIJAJeIEeaTDudJBcLTVw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1iIJAZeIEeaTDudJBcLTVw" type="Association_SourceMultiplicityLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1iIJApeIEeaTDudJBcLTVw" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1iIJA5eIEeaTDudJBcLTVw" type="Association_TargetMultiplicityLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1iIJBJeIEeaTDudJBcLTVw" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_1iG64ZeIEeaTDudJBcLTVw"/>
+ <element xmi:type="uml:Association" href="model.uml#_1h4RYJeIEeaTDudJBcLTVw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_1iG64peIEeaTDudJBcLTVw" points="[434, 483, -643984, -643984]$[719, 483, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1igjgJeIEeaTDudJBcLTVw" id="(1.0,0.42)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1igjgZeIEeaTDudJBcLTVw" id="(0.0,0.48)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_aPP7wJeKEeaTDudJBcLTVw" type="Association_Edge" source="_Y7JPkJeKEeaTDudJBcLTVw" target="_ZBH7wJeKEeaTDudJBcLTVw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPQi0JeKEeaTDudJBcLTVw" type="Association_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_bbMKcJeKEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPQi0ZeKEeaTDudJBcLTVw" x="2" y="-17"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPQi0peKEeaTDudJBcLTVw" type="Association_NameLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_bbfFYJeKEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPQi05eKEeaTDudJBcLTVw" y="19"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPQi1JeKEeaTDudJBcLTVw" type="Association_TargetRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_bbtH0JeKEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPQi1ZeKEeaTDudJBcLTVw" x="-23" y="-106"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPQi1peKEeaTDudJBcLTVw" type="Association_SourceRoleLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_bb7xUJeKEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPQi15eKEeaTDudJBcLTVw" x="-80" y="47"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPRJ4JeKEeaTDudJBcLTVw" type="Association_SourceMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_bcKa0JeKEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPRJ4ZeKEeaTDudJBcLTVw" x="14" y="19"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_aPRJ4peKEeaTDudJBcLTVw" type="Association_TargetMultiplicityLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_bcX2MJeKEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aPRJ45eKEeaTDudJBcLTVw" x="-48" y="-15"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_aPP7wZeKEeaTDudJBcLTVw"/>
+ <element xmi:type="uml:Association" href="model.uml#_aOwMgJeKEeaTDudJBcLTVw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_aPP7wpeKEeaTDudJBcLTVw" points="[242, 337, -643984, -643984]$[353, 391, -643984, -643984]$[501, 325, -643984, -643984]$[615, 415, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_aP7RMJeKEeaTDudJBcLTVw" id="(1.0,0.71)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_aP7RMZeKEeaTDudJBcLTVw" id="(0.0,1.0)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_mRIOsJeJEeaTDudJBcLTVw">
+ <stylesheets xmi:type="css:StyleSheetReference" xmi:id="_UDyCkJeLEeaTDudJBcLTVw" path="/org.eclipse.papyrus.uml.service.types/model/tt.css"/>
+ </css:ModelStyleSheets>
+ <notation:Diagram xmi:id="_Br_y8JeLEeaTDudJBcLTVw" type="CompositeStructure" name="CompositeDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_CPdFUJeLEeaTDudJBcLTVw" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_CPeTcJeLEeaTDudJBcLTVw" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_CPeTcZeLEeaTDudJBcLTVw" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CPeTcpeLEeaTDudJBcLTVw" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_CPe6gJeLEeaTDudJBcLTVw" type="Class_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_CPe6gZeLEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CPe6gpeLEeaTDudJBcLTVw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_CPaCAJeLEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CPdFUZeLEeaTDudJBcLTVw" x="84" y="82" width="259" height="193"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Cn3lUJeLEeaTDudJBcLTVw" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Cn3lUpeLEeaTDudJBcLTVw" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Cn4MYJeLEeaTDudJBcLTVw" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Cn4zcJeLEeaTDudJBcLTVw" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Cn4zcZeLEeaTDudJBcLTVw" type="Class_StructureCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Cn4zcpeLEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Cn4zc5eLEeaTDudJBcLTVw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_Cn1JEJeLEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Cn3lUZeLEeaTDudJBcLTVw" x="772" y="60" width="148" height="218"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_Br_y8ZeLEeaTDudJBcLTVw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_Br_y8peLEeaTDudJBcLTVw"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_Br_y85eLEeaTDudJBcLTVw">
+ <owner xmi:type="uml:Model" href="model.uml#_2RLDkJbIEeaTDudJBcLTVw"/>
+ </styles>
+ <element xmi:type="uml:Model" href="model.uml#_2RLDkJbIEeaTDudJBcLTVw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_EwNx4JeLEeaTDudJBcLTVw" type="Dependency_Edge" source="_CPdFUJeLEeaTDudJBcLTVw" target="_Cn3lUJeLEeaTDudJBcLTVw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_EwOY8JeLEeaTDudJBcLTVw" type="Dependency_NameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_EwOY8ZeLEeaTDudJBcLTVw" x="-103" y="74"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_EwOY8peLEeaTDudJBcLTVw" type="Dependency_StereotypeLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_EwOY85eLEeaTDudJBcLTVw" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_EwNx4ZeLEeaTDudJBcLTVw"/>
+ <element xmi:type="uml:Dependency" href="model.uml#_EwKHgJeLEeaTDudJBcLTVw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_EwNx4peLEeaTDudJBcLTVw" points="[343, 149, -643984, -643984]$[772, 160, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EwznwJeLEeaTDudJBcLTVw" id="(1.0,0.3471502590673575)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_EwznwZeLEeaTDudJBcLTVw" id="(0.0,0.45871559633027525)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_KA3MIJeLEeaTDudJBcLTVw" type="InternalBlock" name="New Internal Block Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_KA7dkJeLEeaTDudJBcLTVw" type="shape_sysml_block_as_composite">
+ <children xmi:type="notation:DecorationNode" xmi:id="_KA8rsJeLEeaTDudJBcLTVw" type="label_sysml_block_name"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_KA8rsZeLEeaTDudJBcLTVw" type="compartment_sysml_structure">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_KA8rspeLEeaTDudJBcLTVw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_J2WlQJeLEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KA7dkZeLEeaTDudJBcLTVw" x="40" y="40" width="500" height="250"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_KIhTUJeLEeaTDudJBcLTVw" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_KIhTUZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_KIihcJeLEeaTDudJBcLTVw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="model.uml#_J2WlQJeLEeaTDudJBcLTVw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KIhTUpeLEeaTDudJBcLTVw" x="240" y="40"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_KA3MIZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_KA3MIpeLEeaTDudJBcLTVw">
+ <owner xmi:type="uml:Model" href="model.uml#_2RLDkJbIEeaTDudJBcLTVw"/>
+ </styles>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_KDGAwJeLEeaTDudJBcLTVw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <element xmi:type="uml:Class" href="model.uml#_J2WlQJeLEeaTDudJBcLTVw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_KIjIgJeLEeaTDudJBcLTVw" type="StereotypeCommentLink" source="_KA7dkJeLEeaTDudJBcLTVw" target="_KIhTUJeLEeaTDudJBcLTVw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_KIjIgZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_KIjIhZeLEeaTDudJBcLTVw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="model.uml#_J2WlQJeLEeaTDudJBcLTVw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KIjIgpeLEeaTDudJBcLTVw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_KIjIg5eLEeaTDudJBcLTVw"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_KIjIhJeLEeaTDudJBcLTVw"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_LPF50JeLEeaTDudJBcLTVw" type="BlockDefinition" name="New Block Definition Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_MUYG4JeLEeaTDudJBcLTVw" type="shape_sysml_block_as_classifier">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MUYt8JeLEeaTDudJBcLTVw" type="label_sysml_block_name"/>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MUpzsJeLEeaTDudJBcLTVw" type="compartment_sysml_property_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MUpzsZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MUpzspeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MUpzs5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MUpztJeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MUpztZeLEeaTDudJBcLTVw" type="compartment_sysml_part_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MUpztpeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MUpzt5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MUpzuJeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MUpzuZeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MUqawJeLEeaTDudJBcLTVw" type="compartment_sysml_reference_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MUqawZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MUqawpeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MUqaw5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MUqaxJeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MUqaxZeLEeaTDudJBcLTVw" type="compartment_uml_port_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MUqaxpeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MUqax5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MUqayJeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MUqayZeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MUqaypeLEeaTDudJBcLTVw" type="compartment_sysml_flowport_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MUqay5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MUqazJeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MUqazZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MUqazpeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MUrB0JeLEeaTDudJBcLTVw" type="compartment_uml_operation_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MUrB0ZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MUrB0peLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MUrB05eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MUrB1JeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MUrB1ZeLEeaTDudJBcLTVw" type="compartment_sysml_constraint_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MUrB1peLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MUrB15eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MUrB2JeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MUrB2ZeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MUrB2peLEeaTDudJBcLTVw" type="compartment_sysml_value_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MUrB25eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MUrB3JeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MUrB3ZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MUrB3peLEeaTDudJBcLTVw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_MUQLEJeLEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MUYG4ZeLEeaTDudJBcLTVw" x="168" y="76" width="290" height="141"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_MVuxwJeLEeaTDudJBcLTVw" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MVuxwZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_MVuxw5eLEeaTDudJBcLTVw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="model.uml#_MUQLEJeLEeaTDudJBcLTVw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MVuxwpeLEeaTDudJBcLTVw" x="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_MkTZQJeLEeaTDudJBcLTVw" type="shape_sysml_block_as_classifier">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MkUAUJeLEeaTDudJBcLTVw" type="label_sysml_block_name"/>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MkUnYJeLEeaTDudJBcLTVw" type="compartment_sysml_property_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MkUnYZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MkUnYpeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MkUnY5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MkUnZJeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MkVOcJeLEeaTDudJBcLTVw" type="compartment_sysml_part_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MkVOcZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MkVOcpeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MkVOc5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MkVOdJeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MkVOdZeLEeaTDudJBcLTVw" type="compartment_sysml_reference_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MkVOdpeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MkVOd5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MkVOeJeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MkVOeZeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MkVOepeLEeaTDudJBcLTVw" type="compartment_uml_port_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MkV1gJeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MkV1gZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MkV1gpeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MkV1g5eLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MkV1hJeLEeaTDudJBcLTVw" type="compartment_sysml_flowport_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MkV1hZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MkV1hpeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MkV1h5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MkV1iJeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MkV1iZeLEeaTDudJBcLTVw" type="compartment_uml_operation_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MkV1ipeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MkV1i5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MkV1jJeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MkV1jZeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MkWckJeLEeaTDudJBcLTVw" type="compartment_sysml_constraint_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MkWckZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MkWckpeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MkWck5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MkWclJeLEeaTDudJBcLTVw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_MkXDoJeLEeaTDudJBcLTVw" type="compartment_sysml_value_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_MkXDoZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MkXDopeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MkXDo5eLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MkXDpJeLEeaTDudJBcLTVw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_MkMEgJeLEeaTDudJBcLTVw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MkTZQZeLEeaTDudJBcLTVw" x="825" y="144" width="138" height="185"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Mke_dZeLEeaTDudJBcLTVw" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Mke_dpeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_MkfmgJeLEeaTDudJBcLTVw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="model.uml#_MkMEgJeLEeaTDudJBcLTVw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Mke_d5eLEeaTDudJBcLTVw" x="200"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_LPF50ZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_LPF50peLEeaTDudJBcLTVw">
+ <owner xmi:type="uml:Class" href="model.uml#_J2WlQJeLEeaTDudJBcLTVw"/>
+ </styles>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_LPeUUJeLEeaTDudJBcLTVw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+ <element xmi:type="uml:Class" href="model.uml#_J2WlQJeLEeaTDudJBcLTVw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_MVuxxJeLEeaTDudJBcLTVw" type="StereotypeCommentLink" source="_MUYG4JeLEeaTDudJBcLTVw" target="_MVuxwJeLEeaTDudJBcLTVw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_MVuxxZeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_MVvY0peLEeaTDudJBcLTVw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="model.uml#_MUQLEJeLEeaTDudJBcLTVw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_MVuxxpeLEeaTDudJBcLTVw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_MVvY0JeLEeaTDudJBcLTVw"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_MVvY0ZeLEeaTDudJBcLTVw"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_MkfmgZeLEeaTDudJBcLTVw" type="StereotypeCommentLink" source="_MkTZQJeLEeaTDudJBcLTVw" target="_Mke_dZeLEeaTDudJBcLTVw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_MkfmgpeLEeaTDudJBcLTVw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_MkfmhpeLEeaTDudJBcLTVw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="model.uml#_MkMEgJeLEeaTDudJBcLTVw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Mkfmg5eLEeaTDudJBcLTVw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_MkfmhJeLEeaTDudJBcLTVw"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_MkfmhZeLEeaTDudJBcLTVw"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_M-urcJeLEeaTDudJBcLTVw" type="link_sysml_association" source="_MUYG4JeLEeaTDudJBcLTVw" target="_MkTZQJeLEeaTDudJBcLTVw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_M-vSgJeLEeaTDudJBcLTVw" type="linklabel_uml_appliedstereotype">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_NM8toJeLEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_M-vSgZeLEeaTDudJBcLTVw" x="-1" y="-28"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_M-v5kJeLEeaTDudJBcLTVw" type="linklabel_uml_namedelement_name">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_NNEpcJeLEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_M-v5kZeLEeaTDudJBcLTVw" x="1" y="-8"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_M-v5kpeLEeaTDudJBcLTVw" type="linklabel_uml_association_source_role">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_NNLXIJeLEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_M-v5k5eLEeaTDudJBcLTVw" x="-129" y="-63"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_M-v5lJeLEeaTDudJBcLTVw" type="linklabel_uml_association_source_multiplicity">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_NNSr4JeLEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_M-v5lZeLEeaTDudJBcLTVw" x="-133" y="26"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_M-wgoJeLEeaTDudJBcLTVw" type="linklabel_uml_association_target_role">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_NNansJeLEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_M-wgoZeLEeaTDudJBcLTVw" x="133" y="-120"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_M-wgopeLEeaTDudJBcLTVw" type="linklabel_uml_association_target_multiplicity">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_NNh8cJeLEeaTDudJBcLTVw" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_M-wgo5eLEeaTDudJBcLTVw" x="41" y="42"/>
+ </children>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_M-urcZeLEeaTDudJBcLTVw" name="semantic_source_end">
+ <eObjectValue xmi:type="uml:Property" href="model.uml#_M-Z7UZeLEeaTDudJBcLTVw"/>
+ </styles>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_M-urcpeLEeaTDudJBcLTVw" name="semantic_target_end">
+ <eObjectValue xmi:type="uml:Property" href="model.uml#_M-aiYJeLEeaTDudJBcLTVw"/>
+ </styles>
+ <styles xmi:type="notation:FontStyle" xmi:id="_M-urc5eLEeaTDudJBcLTVw"/>
+ <element xmi:type="uml:Association" href="model.uml#_M-XfEJeLEeaTDudJBcLTVw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_M-urdJeLEeaTDudJBcLTVw" points="[458, 130, -643984, -643984]$[810, 149, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_M_b2EJeLEeaTDudJBcLTVw" id="(1.0,0.3829787234042553)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_M_cdIJeLEeaTDudJBcLTVw" id="(0.0,0.3891891891891892)"/>
+ </edges>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.uml b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.uml
new file mode 100644
index 00000000000..29a207535af
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/model.uml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks">
+ <uml:Model xmi:id="_2RLDkJbIEeaTDudJBcLTVw" name="RootElement">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_cKzUYJeIEeaTDudJBcLTVw">
+ <body>sdfsdfqsdf</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Interaction" xmi:id="_2T8DsJbIEeaTDudJBcLTVw" name="Interaction1">
+ <ownedRule xmi:type="uml:TimeConstraint" xmi:id="_ciAq0JbVEeaTDudJBcLTVw" name="TimeConstraint" constrainedElement="_5sJ8sJbIEeaTDudJBcLTVw">
+ <specification xmi:type="uml:TimeInterval" xmi:id="_ciGxcJbVEeaTDudJBcLTVw" name="TimeInterval"/>
+ </ownedRule>
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_4IYc0JbIEeaTDudJBcLTVw" name="Lifeline" coveredBy="_5sJ8sJbIEeaTDudJBcLTVw"/>
+ <lifeline xmi:type="uml:Lifeline" xmi:id="_4cQbEJbIEeaTDudJBcLTVw" name="Lifeline0" coveredBy="_5sKjwJbIEeaTDudJBcLTVw"/>
+ <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_5sJ8sJbIEeaTDudJBcLTVw" name="MessageSend" covered="_4IYc0JbIEeaTDudJBcLTVw" message="_5sD2EJbIEeaTDudJBcLTVw"/>
+ <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_5sKjwJbIEeaTDudJBcLTVw" name="MessageRecv" covered="_4cQbEJbIEeaTDudJBcLTVw" message="_5sD2EJbIEeaTDudJBcLTVw"/>
+ <message xmi:type="uml:Message" xmi:id="_5sD2EJbIEeaTDudJBcLTVw" name="Message" messageSort="asynchCall" receiveEvent="_5sKjwJbIEeaTDudJBcLTVw" sendEvent="_5sJ8sJbIEeaTDudJBcLTVw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Zuj7cJeIEeaTDudJBcLTVw" name="Class1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_avtPYJeIEeaTDudJBcLTVw" name="class2" type="_aDN80JeIEeaTDudJBcLTVw" association="_avcJoJeIEeaTDudJBcLTVw"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_1h5fgJeIEeaTDudJBcLTVw" name="class3" type="_030nwJeIEeaTDudJBcLTVw" association="_1h4RYJeIEeaTDudJBcLTVw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_aDN80JeIEeaTDudJBcLTVw" name="Class2"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_avcJoJeIEeaTDudJBcLTVw" memberEnd="_avtPYJeIEeaTDudJBcLTVw _avtPYZeIEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_avf0AJeIEeaTDudJBcLTVw" source="org.eclipse.papyrus">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_avgbEJeIEeaTDudJBcLTVw" key="nature" value="UML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_avtPYZeIEeaTDudJBcLTVw" name="class1" type="_Zuj7cJeIEeaTDudJBcLTVw" association="_avcJoJeIEeaTDudJBcLTVw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_030nwJeIEeaTDudJBcLTVw" name="Class3"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_1h4RYJeIEeaTDudJBcLTVw" memberEnd="_1h5fgJeIEeaTDudJBcLTVw _1h6GkJeIEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1h44cJeIEeaTDudJBcLTVw" source="org.eclipse.papyrus">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1h44cZeIEeaTDudJBcLTVw" key="nature" value="UML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_1h6GkJeIEeaTDudJBcLTVw" name="class1" type="_Zuj7cJeIEeaTDudJBcLTVw" association="_1h4RYJeIEeaTDudJBcLTVw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Y7FlMJeKEeaTDudJBcLTVw" name="Class4">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_aOxaoZeKEeaTDudJBcLTVw" name="class5" type="_ZBGGkJeKEeaTDudJBcLTVw" association="_aOwMgJeKEeaTDudJBcLTVw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_ZBGGkJeKEeaTDudJBcLTVw" name="Class5"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_aOwMgJeKEeaTDudJBcLTVw" memberEnd="_aOxaoZeKEeaTDudJBcLTVw _aOyBsJeKEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_aOwzkJeKEeaTDudJBcLTVw" source="org.eclipse.papyrus">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_aOxaoJeKEeaTDudJBcLTVw" key="nature" value="UML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_aOyBsJeKEeaTDudJBcLTVw" name="class4" type="_Y7FlMJeKEeaTDudJBcLTVw" association="_aOwMgJeKEeaTDudJBcLTVw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_CPaCAJeLEeaTDudJBcLTVw" name="Class6"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Cn1JEJeLEeaTDudJBcLTVw" name="Class7"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_EwKHgJeLEeaTDudJBcLTVw" name="qswsdxf" client="_CPaCAJeLEeaTDudJBcLTVw" supplier="_Cn1JEJeLEeaTDudJBcLTVw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_J2WlQJeLEeaTDudJBcLTVw" name="Block1">
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_MUQLEJeLEeaTDudJBcLTVw" name="Block1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_M-Z7UZeLEeaTDudJBcLTVw" name="block2_1" type="_MkMEgJeLEeaTDudJBcLTVw" association="_M-XfEJeLEeaTDudJBcLTVw"/>
+ </nestedClassifier>
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_MkMEgJeLEeaTDudJBcLTVw" name="Block2">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_M-aiYJeLEeaTDudJBcLTVw" name="block1_1" type="_MUQLEJeLEeaTDudJBcLTVw" association="_M-XfEJeLEeaTDudJBcLTVw"/>
+ </nestedClassifier>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_M-XfEJeLEeaTDudJBcLTVw" memberEnd="_M-Z7UZeLEeaTDudJBcLTVw _M-aiYJeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_M-ZUQJeLEeaTDudJBcLTVw" source="org.eclipse.papyrus">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_M-Z7UJeLEeaTDudJBcLTVw" key="nature" value="SysML_Nature"/>
+ </eAnnotations>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_IkeGoJeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IkiYEJeLEeaTDudJBcLTVw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_Ikk0UJeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Ikk0UZeLEeaTDudJBcLTVw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_Ikn3oJeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IkoesJeLEeaTDudJBcLTVw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_Ikps0JeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IkqT4JeLEeaTDudJBcLTVw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_Ikq68JeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IkriAJeLEeaTDudJBcLTVw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_IksJEJeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IkswIJeLEeaTDudJBcLTVw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_IktXMJeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Ikt-QJeLEeaTDudJBcLTVw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_IkulUJeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IkulUZeLEeaTDudJBcLTVw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_IkvzcJeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IkvzcZeLEeaTDudJBcLTVw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_IkxBkJeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IkxBkZeLEeaTDudJBcLTVw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_IkyPsJeLEeaTDudJBcLTVw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Iky2wJeLEeaTDudJBcLTVw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_J2a2sJeLEeaTDudJBcLTVw" base_Class="_J2WlQJeLEeaTDudJBcLTVw"/>
+ <Blocks:Block xmi:id="_MURZMJeLEeaTDudJBcLTVw" base_Class="_MUQLEJeLEeaTDudJBcLTVw"/>
+ <Blocks:Block xmi:id="_MkMrkJeLEeaTDudJBcLTVw" base_Class="_MkMEgJeLEeaTDudJBcLTVw"/>
+</xmi:XMI>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/model/tt.css b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/tt.css
new file mode 100644
index 00000000000..45886b92e8e
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/tt.css
@@ -0,0 +1,11 @@
+Association > Label:sourceMultiplicity {
+ leftMarginLabel:100
+}
+
+Association > Label:sourceRole {
+ leftMarginLabel:100
+}
+
+Association > Label:targetRole {
+ leftMarginLabel:100
+} \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations
index bcbc467e2cd..8f47f8b58dc 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations
@@ -538,7 +538,7 @@
<iconEntry xmi:id="_Scr6klYCEeS0WsAAtVmToA" iconPath="/icons/full/obj16/InstanceValue.gif" bundleId="org.eclipse.uml2.uml.edit"/>
<eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//InstanceValue"/>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_SctIsVYCEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.uml.Interaction" name="UML::Interaction" hint="UML::Interaction" editHelperClassName="org.eclipse.papyrus.uml.service.types.helper.ElementEditHelper">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_SctIsVYCEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.uml.Interaction" name="UML::Interaction" hint="UML::Interaction" editHelperClassName="org.eclipse.papyrus.uml.service.types.helper.InteractionEditHelper">
<iconEntry xmi:id="_SctIslYCEeS0WsAAtVmToA" iconPath="/icons/full/obj16/Interaction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
<eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//Interaction"/>
</elementTypeConfigurations>
@@ -586,7 +586,7 @@
<iconEntry xmi:id="_Scz2VlYCEeS0WsAAtVmToA" iconPath="/icons/full/obj16/JoinNode.gif" bundleId="org.eclipse.uml2.uml.edit"/>
<eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//JoinNode"/>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_Scz2V1YCEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.uml.Lifeline" name="UML::Lifeline" hint="UML::Lifeline" editHelperClassName="org.eclipse.papyrus.uml.service.types.helper.LifelineEditHelper">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="_Scz2V1YCEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.uml.Lifeline" name="UML::Lifeline" hint="UML::Lifeline" editHelperClassName="org.eclipse.papyrus.uml.service.types.helper.LifelineEditHelper">
<iconEntry xmi:id="_Scz2WFYCEeS0WsAAtVmToA" iconPath="/icons/full/obj16/Lifeline.gif" bundleId="org.eclipse.uml2.uml.edit"/>
<eClass href="http://www.eclipse.org/uml2/5.0.0/UML#//Lifeline"/>
</elementTypeConfigurations>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations
index 5b035d70c60..fc2f3997c04 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations
@@ -3393,4 +3393,4 @@
<specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#_SdM4AVYCEeS0WsAAtVmToA"/>
</elementTypeConfigurations>
<elementTypeConfigurations xsi:type="elementtypesconfigurations:ExternallyRegisteredType" xmi:id="_1U1kgEOBEeay77YZlFOXVQ" identifier="org.eclipse.gmf.runtime.emf.type.core.null" name="org.eclipse.gmf.runtime.emf.type.core.null"/>
-</elementtypesconfigurations:ElementTypeSetConfiguration>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src-gen/org/eclipse/papyrus/uml/service/types/element/UMLElementTypes.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src-gen/org/eclipse/papyrus/uml/service/types/element/UMLElementTypes.java
index 2ca19bc86d7..f0e095c3d79 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src-gen/org/eclipse/papyrus/uml/service/types/element/UMLElementTypes.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src-gen/org/eclipse/papyrus/uml/service/types/element/UMLElementTypes.java
@@ -825,6 +825,6 @@ public class UMLElementTypes extends AbstractElementTypeEnumerator {
public static final IHintedType TRACE = (IHintedType) getElementType("org.eclipse.papyrus.uml.Trace"); //$NON-NLS-1$
/** IElementType for UML Refine */
- public static final IHintedType REFINE = (IHintedType) getElementType("org.eclipse.papyrus.uml.Refine"); //$NON-NLS-1$
+ public static final IHintedType REFINE = (IHintedType) getElementType("org.eclipse.papyrus.uml.Refine"); //$NON-NLS-1$
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/CombinedFragmentDestroyCommand.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/CombinedFragmentDestroyCommand.java
index 3758529f357..4c92d0572f6 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/CombinedFragmentDestroyCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/CombinedFragmentDestroyCommand.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2017 CEA LIST and others.
+ * Copyright (c) 2016 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.service.types.command;
@@ -20,50 +21,28 @@ import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.papyrus.commands.Activator;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.uml2.uml.CombinedFragment;
-/**
- * Get the command to destroy {@link CombinedFragment}.
- */
+
public class CombinedFragmentDestroyCommand extends AbstractTransactionalCommand {
- /** The element edit service. */
private IElementEditService provider;
- /** The request to destroy the element. */
private DestroyElementRequest req;
- /**
- *
- * Constructor.
- *
- * @param domain
- * the editing domain
- * @param provider
- * the element edit service
- * @param req
- * the destroy element request
- */
public CombinedFragmentDestroyCommand(TransactionalEditingDomain domain, IElementEditService provider, DestroyElementRequest req) {
super(domain, null, null);
this.provider = provider;
this.req = req;
}
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ICommand deleteCommand = provider.getEditCommand(req);
try {
deleteCommand.execute(monitor, info);
} catch (ExecutionException e) {
- Activator.log.error(e);
+ e.printStackTrace();
}
return CommandResult.newOKCommandResult();
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/MoveOperandFragmentsCommand.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/MoveOperandFragmentsCommand.java
index eba4064f6ee..3a6423e674e 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/MoveOperandFragmentsCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/MoveOperandFragmentsCommand.java
@@ -104,5 +104,5 @@ public class MoveOperandFragmentsCommand extends EditElementCommand {
}
sourceOperand.getFragments().clear();
return CommandResult.newOKCommandResult();
- }
+ }
} \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/SelectAndDeleteCommand.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/SelectAndDeleteCommand.java
index 3f56e5aa6fe..d9002aace14 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/SelectAndDeleteCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/SelectAndDeleteCommand.java
@@ -144,5 +144,5 @@ public class SelectAndDeleteCommand extends PopupMenuCommand {
public Image getImage(Object object) {
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_ETOOL_DELETE);
}
- }
+ }
} \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/SetMessageSort.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/SetMessageSort.java
index ead54df2388..c69cd99d2e2 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/SetMessageSort.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/SetMessageSort.java
@@ -28,7 +28,7 @@ import org.eclipse.uml2.uml.MessageSort;
public class SetMessageSort extends EditElementCommand {
/** The {@link MessageSort} to set. */
- private final MessageSort messageSort;
+ private final MessageSort messageSort;
/** The {@link Message} to set. */
private Message message;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CommentEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/BehaviorExecutionSpecificationEditHelper.java
index dbae12d5ba0..47b58a9b097 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CommentEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/BehaviorExecutionSpecificationEditHelper.java
@@ -1,20 +1,19 @@
/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
+ * Copyright (c) 2016 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:
- * Atos Origin - Initial API and implementation
- *
+ * CEA LIST - Initial API and implementation
+ *
*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-/**
- * @generated
- */
-public class CommentEditHelper extends UMLBaseEditHelper {
+package org.eclipse.papyrus.uml.service.types.helper;
+
+public class BehaviorExecutionSpecificationEditHelper extends ExecutionSpecificationEditHelper {
+
+
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/CombinedFragmentEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/CombinedFragmentEditHelper.java
index d85b9be1f1f..f95e478de3e 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/CombinedFragmentEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/CombinedFragmentEditHelper.java
@@ -16,25 +16,32 @@ package org.eclipse.papyrus.uml.service.types.helper;
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.CompositeCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+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.service.types.command.CombinedFragmentDestroyCommand;
+import org.eclipse.papyrus.uml.service.types.command.MoveOperandFragmentsCommand;
+import org.eclipse.papyrus.uml.service.types.command.SelectAndDeleteCommand;
+import org.eclipse.papyrus.uml.service.types.request.MoveOperandFragmentEditRequest;
import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
import org.eclipse.uml2.uml.CombinedFragment;
import org.eclipse.uml2.uml.InteractionOperand;
import org.eclipse.uml2.uml.UMLFactory;
-/**
- * {@link ElementEditHelper} for {@link CombinedFragment}.
- */
public class CombinedFragmentEditHelper extends ElementEditHelper {
/**
- * {@inheritDoc}
- *
* @see org.eclipse.papyrus.uml.service.types.helper.ElementEditHelper#getConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest)
+ *
+ * @param req
+ * @return
*/
@Override
protected ICommand getConfigureCommand(final ConfigureRequest req) {
@@ -52,6 +59,48 @@ public class CombinedFragmentEditHelper extends ElementEditHelper {
};
return CompositeCommand.compose(configureCommand, super.getConfigureCommand(req));
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper#getDestroyElementCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest)
+ *
+ * @param req
+ * @return
+ */
+ @Override
+ protected ICommand getDestroyElementCommand(DestroyElementRequest req) {
+ return super.getDestroyElementCommand(req);
+// EObject elementToDestroy = req.getElementToDestroy();
+// if (elementToDestroy instanceof CombinedFragment) {
+// CombinedFragment combinedFragment = (CombinedFragment) elementToDestroy;
+// IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToDestroy);
+// if (provider != null) {
+// // Retrieve delete command from the Element Edit service
+// ICommand deleteCommand = super.getDestroyElementCommand(req);
+//// if (deleteCommand != null) {
+//// if (elementToDestroy instanceof CombinedFragment) {
+////
+//// CompositeCommand deleteAll = new CompositeCommand(req.getLabel());
+//// deleteAll.add(deleteCommand);
+//// CompositeCommand deleteCfOnly = new CompositeCommand(req.getLabel());
+////
+//// // remove children from operands and append to parent combined fragment
+//// for (InteractionOperand op : combinedFragment.getOperands()) {
+//// deleteCfOnly.add(new MoveOperandFragmentsCommand(combinedFragment, op, new MoveOperandFragmentEditRequest(req.getEditingDomain(), combinedFragment)));
+//// }
+//// deleteCfOnly.add(new CombinedFragmentDestroyCommand(req.getEditingDomain(), provider, req));
+////
+//// return new SelectAndDeleteCommand(deleteAll, deleteCfOnly, new String[] { "Delete all", "Keep contents" });
+//// } else {
+// return deleteCommand;
+//// }
+//// }
+// }
+// }
+// return UnexecutableCommand.INSTANCE;
+
+
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ConsiderIgnoreFragmentEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ConsiderIgnoreFragmentEditHelper.java
index c50f3c75612..795e4ddd6db 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ConsiderIgnoreFragmentEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ConsiderIgnoreFragmentEditHelper.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2017 CEA LIST and others.
+ * Copyright (c) 2016 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
@@ -24,16 +24,9 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.uml2.uml.ConsiderIgnoreFragment;
import org.eclipse.uml2.uml.InteractionOperatorKind;
-/**
- * {@link ElementEditHelper} for {@link ConsiderIgnoreFragment}.
- */
public class ConsiderIgnoreFragmentEditHelper extends CombinedFragmentEditHelper {
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.uml.service.types.helper.CombinedFragmentEditHelper#getConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest)
- */
+
protected ICommand getConfigureCommand(final ConfigureRequest req) {
ICommand configureCommand = new ConfigureElementCommand(req) {
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ExecutionSpecificationEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ExecutionSpecificationEditHelper.java
index eed480cb0d0..e50f342d91b 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ExecutionSpecificationEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ExecutionSpecificationEditHelper.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2017 CEA LIST and others.
+ * Copyright (c) 2016 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
@@ -17,16 +17,25 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
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.service.types.utils.SequenceRequestConstant;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
import org.eclipse.uml2.uml.ExecutionSpecification;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.InteractionFragment;
@@ -35,20 +44,22 @@ import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.Message;
import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
import org.eclipse.uml2.uml.OccurrenceSpecification;
+import org.eclipse.uml2.uml.UMLFactory;
-/**
- * {@link ElementEditHelper} for {@link ExecutionSpecification}.
- */
public abstract class ExecutionSpecificationEditHelper extends ElementEditHelper {
+
+
+
/**
- * {@inheritDoc}
- *
* @see org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper#getDestroyElementCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest)
+ *
+ * @param req
+ * @return
*/
@Override
- protected ICommand getDestroyElementCommand(final DestroyElementRequest req) {
+ protected ICommand getDestroyElementCommand(DestroyElementRequest req) {
CompositeCommand deleteElementsCommand = new CompositeCommand(req.getLabel());
EObject elementToDestroy = req.getElementToDestroy();
@@ -80,14 +91,9 @@ public abstract class ExecutionSpecificationEditHelper extends ElementEditHelper
}
/**
- * Destroy Intermediate Interaction fragments.
- *
* @param es
- * The ExecutionSpecification to clear.
* @param editingDomain
- * the editing domain
* @param compositeCommand
- * The command to complete
*/
protected void destroyIntermediateInteractionFragments(ExecutionSpecification es, TransactionalEditingDomain editingDomain, CompositeCommand compositeCommand) {
OccurrenceSpecification start = es.getStart();
@@ -138,19 +144,6 @@ public abstract class ExecutionSpecificationEditHelper extends ElementEditHelper
}
}
- /**
- * Find the intermediates.
- *
- * @param fragments
- * THe list of {@link InteractionFragment}
- * @param finish
- * the finish {@link OccurrenceSpecification}
- * @param coveredLifeline
- * the covered {@link Lifeline}
- * @param found
- * true if intermediates have been found
- * @return the list intermediates InteractionFragment
- */
protected List<InteractionFragment> findIntermediates(List<InteractionFragment> fragments, OccurrenceSpecification finish, Lifeline coveredLifeline, boolean found) {
List<InteractionFragment> result = new ArrayList<InteractionFragment>();
for (InteractionFragment interactionFragment : fragments) {
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/InteractionEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/InteractionEditHelper.java
new file mode 100644
index 00000000000..4e931df6b1b
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/InteractionEditHelper.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.service.types.helper;
+
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+
+public class InteractionEditHelper extends ElementEditHelper {
+
+ /**
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper#getEditContextCommand(org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest)
+ *
+ * @param req
+ * @return
+ */
+ @Override
+ protected ICommand getEditContextCommand(GetEditContextRequest req) {
+ System.err.println("Ici");
+ return super.getEditContextCommand(req);
+ }
+
+
+
+
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/LifelineEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/LifelineEditHelper.java
index d9b3e35728e..0c0b4e7a7a4 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/LifelineEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/LifelineEditHelper.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2017 CEA LIST.
+ * Copyright (c) 2010 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -8,7 +8,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * CEA LIST - Initial API and implementation
+ *
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.uml.service.types.helper;
@@ -31,15 +32,12 @@ import org.eclipse.uml2.uml.InteractionOperand;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.UMLPackage;
-/**
- * {@link ElementEditHelper} for {@link Lifeline}.
- */
public class LifelineEditHelper extends ElementEditHelper {
/**
- * {@inheritDoc}
- *
* @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper#configureRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ *
+ * @param request
*/
@Override
protected void configureRequest(IEditCommandRequest request) {
@@ -76,12 +74,13 @@ public class LifelineEditHelper extends ElementEditHelper {
/**
- * {@inheritDoc}
- *
* @see org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper#getDestroyElementCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest)
+ *
+ * @param req
+ * @return
*/
@Override
- protected ICommand getDestroyElementCommand(final DestroyElementRequest req) {
+ protected ICommand getDestroyElementCommand(DestroyElementRequest req) {
EObject objectToDelete = req.getElementToDestroy();
if (objectToDelete instanceof Lifeline) {
Lifeline lifeline = (Lifeline) objectToDelete;
@@ -110,4 +109,6 @@ public class LifelineEditHelper extends ElementEditHelper {
return UnexecutableCommand.INSTANCE;
}
+
+
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/MessageEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/MessageEditHelper.java
index 361f038265d..e174d3d4646 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/MessageEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/MessageEditHelper.java
@@ -18,6 +18,8 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.EditingDomain;
@@ -26,6 +28,9 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.command.IdentityCommand;
import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.CreateRelationshipCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
@@ -33,14 +38,20 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.service.types.command.MessageAsyncReorientCommand;
+import org.eclipse.papyrus.uml.service.types.command.SetMessageSort;
+import org.eclipse.papyrus.uml.service.types.command.MessageCreateReorientCommand;
import org.eclipse.papyrus.uml.service.types.command.MessageDeleteReorientCommand;
import org.eclipse.papyrus.uml.service.types.command.MessageFoundReorientCommand;
import org.eclipse.papyrus.uml.service.types.command.MessageLostReorientCommand;
import org.eclipse.papyrus.uml.service.types.command.MessageReplyReorientCommand;
import org.eclipse.papyrus.uml.service.types.command.MessageSyncReorientCommand;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
import org.eclipse.papyrus.uml.service.types.utils.MessageUtils;
import org.eclipse.papyrus.uml.tools.utils.ExecutionSpecificationUtil;
+import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
import org.eclipse.uml2.uml.ExecutionSpecification;
import org.eclipse.uml2.uml.Gate;
import org.eclipse.uml2.uml.Interaction;
@@ -66,17 +77,15 @@ public class MessageEditHelper extends ElementEditHelper {
/**
* {@inheritDoc}
- *
- * @see org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper#getCreateRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest)
*/
@Override
- protected ICommand getCreateRelationshipCommand(final CreateRelationshipRequest request) {
+ protected ICommand getCreateRelationshipCommand(CreateRelationshipRequest request) {
EObject source = request.getSource();
EObject target = request.getTarget();
boolean noSourceOrTarget = (source == null || target == null);
boolean noSourceAndTarget = (source == null && target == null);
- if (noSourceAndTarget) {
+ if (!noSourceAndTarget && !canCreate(source, target)) {
// Abort creation.
return UnexecutableCommand.INSTANCE;
}
@@ -85,16 +94,27 @@ public class MessageEditHelper extends ElementEditHelper {
// that the create relationship gesture is enabled.
return IdentityCommand.INSTANCE;
}
+ IElementType elementType = request.getElementType();
+ EObject owner= request.getContainer();
return super.getCreateRelationshipCommand(request);
}
+ /**
+ * @param source
+ * @param target
+ * @return
+ */
+ private boolean canCreate(EObject source, EObject target) {
+ // TODO Auto-generated method stub
+ return true;
+ }
+
- protected boolean isReadOnly(final EObject eObject) {
+ protected boolean isReadOnly(EObject eObject) {
EditingDomain editingDomain = AdapterFactoryEditingDomain.getEditingDomainFor(eObject);
- boolean isReadOnly = (null != eObject.eResource()) && (editingDomain.isReadOnly(eObject.eResource()));
+ boolean isReadOnly = (eObject.eResource() != null) && (editingDomain.isReadOnly(eObject.eResource()));
return isReadOnly;
}
-
/**
* @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getBeforeConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest)
*
@@ -184,7 +204,7 @@ public class MessageEditHelper extends ElementEditHelper {
reorientCommand = new MessageReplyReorientCommand(req);
} else if (msgToReorient.getMessageSort() == MessageSort.CREATE_MESSAGE_LITERAL) {
- // reorientCommand = new MessageCreateReorientCommand(req);
+ //reorientCommand = new MessageCreateReorientCommand(req);
reorientCommand = UnexecutableCommand.INSTANCE;
} else if (msgToReorient.getMessageSort() == MessageSort.DELETE_MESSAGE_LITERAL) {
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ObservationEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ObservationEditHelper.java
index eb4eb406d0e..85393361520 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ObservationEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ObservationEditHelper.java
@@ -48,7 +48,7 @@ public class ObservationEditHelper extends ElementEditHelper {
}
}
}
- return super.getEditContextCommand(req);
+ return super.getEditContextCommand(req);
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/TimeConstraintEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/TimeConstraintEditHelper.java
index b496ab583fa..a448d304866 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/TimeConstraintEditHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/TimeConstraintEditHelper.java
@@ -13,7 +13,13 @@
package org.eclipse.papyrus.uml.service.types.helper;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.ValueSpecification;
public class TimeConstraintEditHelper extends ConstraintEditHelper {
@@ -23,4 +29,5 @@ public class TimeConstraintEditHelper extends ConstraintEditHelper {
return UMLFactory.eINSTANCE.createTimeInterval();
}
+
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/ExecutionSpecificationHelperAdvice.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/ExecutionSpecificationHelperAdvice.java
index a650129e62e..ba72f5e13ea 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/ExecutionSpecificationHelperAdvice.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/ExecutionSpecificationHelperAdvice.java
@@ -26,6 +26,7 @@ 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.common.core.command.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
@@ -33,14 +34,18 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.InteractionFragmentHelper;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
import org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant;
import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
import org.eclipse.uml2.uml.ExecutionSpecification;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.InteractionFragment;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageEnd;
import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
import org.eclipse.uml2.uml.MessageSort;
import org.eclipse.uml2.uml.OccurrenceSpecification;
@@ -55,15 +60,13 @@ public class ExecutionSpecificationHelperAdvice extends AbstractEditHelperAdvice
/**
* Create an execution Occurrence
*
- * @param execution
- * the execution that references the execution occurrences always !=null
- * @param lifeline
- * the lifeLine that is covered by the execution occurrences ,always !=null
+ * @param execution the execution that references the execution occurrences always !=null
+ * @param lifeline the lifeLine that is covered by the execution occurrences ,always !=null
*/
public static ExecutionOccurrenceSpecification createOccurenceSpecification(ExecutionSpecification execution, Lifeline lifeline) {
- ExecutionOccurrenceSpecification occurrenceSpecification = UMLFactory.eINSTANCE.createExecutionOccurrenceSpecification();
+ ExecutionOccurrenceSpecification occurrenceSpecification=UMLFactory.eINSTANCE.createExecutionOccurrenceSpecification();
occurrenceSpecification.setCovered(lifeline);
- ((Interaction) execution.getOwner()).getFragments().add(occurrenceSpecification);
+ ((Interaction)execution.getOwner()).getFragments().add(occurrenceSpecification);
return occurrenceSpecification;
}
@@ -80,6 +83,8 @@ public class ExecutionSpecificationHelperAdvice extends AbstractEditHelperAdvice
@Override
protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+ final ExecutionSpecification execution = (ExecutionSpecification) request.getElementToConfigure();
+ IElementType elementType = request.getTypeToConfigure();
return new ConfigureElementCommand(request) {
@Override
@@ -93,27 +98,29 @@ public class ExecutionSpecificationHelperAdvice extends AbstractEditHelperAdvice
final ExecutionSpecification execution = (ExecutionSpecification) request.getElementToConfigure();
- Object replaceStart = request.getParameters().get(SequenceRequestConstant.REPLACE_EXECUTION_SPECIFICATION_START);
- if (replaceStart instanceof MessageOccurrenceSpecification) {
- execution.setStart((MessageOccurrenceSpecification) replaceStart);
- } else {
- // create Occurrence SpecStart
- ExecutionOccurrenceSpecification start = createOccurenceSpecification(execution, coveredLifeline);
- start.setName(execution.getName() + "Start");
+ Object replaceStart= request.getParameters().get(SequenceRequestConstant.REPLACE_EXECUTION_SPECIFICATION_START);
+ if(replaceStart instanceof MessageOccurrenceSpecification ){
+ execution.setStart((MessageOccurrenceSpecification)replaceStart);
+ }
+ else{
+ //create Occurrence SpecStart
+ ExecutionOccurrenceSpecification start=createOccurenceSpecification(execution, coveredLifeline);
+ start.setName(execution.getName()+"Start");
start.setExecution(execution);
execution.setStart(start);
}
- // add covered for the execution
+ //add covered for the execution
coveredLifeline.getCoveredBys().add(execution);
execution.getCovereds().add(coveredLifeline);
- // create Occurrence SpecFinish
- Object replaceFinish = request.getParameters().get(SequenceRequestConstant.REPLACE_EXECUTION_SPECIFICATION_FINISH);
- if (replaceFinish instanceof MessageOccurrenceSpecification) {
- execution.setFinish((MessageOccurrenceSpecification) replaceFinish);
- } else {
- ExecutionOccurrenceSpecification finish = createOccurenceSpecification(execution, coveredLifeline);
- finish.setName(execution.getName() + "Finish");
+ //create Occurrence SpecFinish
+ Object replaceFinish= request.getParameters().get(SequenceRequestConstant.REPLACE_EXECUTION_SPECIFICATION_FINISH);
+ if(replaceFinish instanceof MessageOccurrenceSpecification ){
+ execution.setFinish((MessageOccurrenceSpecification)replaceFinish);
+ }
+ else{
+ ExecutionOccurrenceSpecification finish=createOccurenceSpecification(execution, coveredLifeline);
+ finish.setName(execution.getName()+"Finish");
finish.setExecution(execution);
execution.setFinish(finish);
}
@@ -133,7 +140,7 @@ public class ExecutionSpecificationHelperAdvice extends AbstractEditHelperAdvice
* @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getBeforeDestroyDependentsCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest)
*
* @param request
- * the request
+ * the request
* @return the command to execute before the edit helper work is done
*/
@Override
@@ -141,16 +148,16 @@ public class ExecutionSpecificationHelperAdvice extends AbstractEditHelperAdvice
List<EObject> dependentsToDestroy = new ArrayList<EObject>();
- ExecutionSpecification es = (ExecutionSpecification) request.getElementToDestroy();
+ ExecutionSpecification es = (ExecutionSpecification)request.getElementToDestroy();
// Check whether start - finish referenced OccurrenceSpecification should be added to the dependents list
OccurrenceSpecification osStart = es.getStart();
- if (shouldDestroyOccurrenceSpecification(es, osStart)) {
+ if(shouldDestroyOccurrenceSpecification(es, osStart)) {
dependentsToDestroy.add(osStart);
}
OccurrenceSpecification osFinish = es.getFinish();
- if (shouldDestroyOccurrenceSpecification(es, osFinish)) {
+ if(shouldDestroyOccurrenceSpecification(es, osFinish)) {
dependentsToDestroy.add(osFinish);
}
@@ -158,12 +165,12 @@ public class ExecutionSpecificationHelperAdvice extends AbstractEditHelperAdvice
// find initiating MOS of a synch message
InteractionFragment previousIft = InteractionFragmentHelper.findPreviousFragment(osStart, es.getOwner());
- while (previousIft != null) {
+ while(previousIft != null) {
// keep the first ift with the same lifelines, and check it
- if (coveredLifelines.equals(new HashSet<Lifeline>(previousIft.getCovereds()))) {
- if (previousIft instanceof MessageOccurrenceSpecification) {
- Message msg = ((MessageOccurrenceSpecification) previousIft).getMessage();
- if (msg != null && MessageSort.SYNCH_CALL_LITERAL.equals(msg.getMessageSort())) {
+ if(coveredLifelines.equals(new HashSet<Lifeline>(previousIft.getCovereds()))) {
+ if(previousIft instanceof MessageOccurrenceSpecification) {
+ Message msg = ((MessageOccurrenceSpecification)previousIft).getMessage();
+ if(msg != null && MessageSort.SYNCH_CALL_LITERAL.equals(msg.getMessageSort())) {
dependentsToDestroy.add(previousIft);
}
}
@@ -174,9 +181,9 @@ public class ExecutionSpecificationHelperAdvice extends AbstractEditHelperAdvice
// find MOS between the start and finish
InteractionFragment fragment = osStart;
- while (fragment != null && !fragment.equals(osFinish)) {
+ while(fragment != null && !fragment.equals(osFinish)) {
// remove MOS if it have the same covered lifelines as the ES
- if (fragment instanceof MessageOccurrenceSpecification && coveredLifelines.equals(new HashSet<Lifeline>(fragment.getCovereds()))) {
+ if(fragment instanceof MessageOccurrenceSpecification && coveredLifelines.equals(new HashSet<Lifeline>(fragment.getCovereds()))) {
dependentsToDestroy.add(fragment);
}
@@ -184,7 +191,7 @@ public class ExecutionSpecificationHelperAdvice extends AbstractEditHelperAdvice
}
// return command to destroy dependents
- if (!dependentsToDestroy.isEmpty()) {
+ if(!dependentsToDestroy.isEmpty()) {
return request.getDestroyDependentsCommand(dependentsToDestroy);
}
@@ -202,10 +209,10 @@ public class ExecutionSpecificationHelperAdvice extends AbstractEditHelperAdvice
* </pre>
*
* @param es
- * {@link ExecutionSpecification} which references {@link OccurrenceSpecification} (by means of #start/#finish references)
+ * {@link ExecutionSpecification} which references {@link OccurrenceSpecification} (by means of #start/#finish references)
* @param os
- * start or finish {@link OccurrenceSpecification} which defines the duration of {@link ExecutionSpecification}
- * @return true in case {@link OccurrenceSpecification} should be destroyed
+ * start or finish {@link OccurrenceSpecification} which defines the duration of {@link ExecutionSpecification}
+ * @return true in case {@link OccurrenceSpecification} should be destroyed
*/
private boolean shouldDestroyOccurrenceSpecification(ExecutionSpecification es, OccurrenceSpecification os) {
return os instanceof ExecutionOccurrenceSpecification
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/GeneralOrderingHelperAdvice.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/GeneralOrderingHelperAdvice.java
index ae4986b806d..748e02c7b71 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/GeneralOrderingHelperAdvice.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/GeneralOrderingHelperAdvice.java
@@ -15,6 +15,10 @@
package org.eclipse.papyrus.uml.service.types.helper.advice;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -23,6 +27,7 @@ import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.GetEditContextCommand;
import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
@@ -32,13 +37,19 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipReques
import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant;
+import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.GeneralOrdering;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
+import org.eclipse.uml2.uml.MessageSort;
+import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.OccurrenceSpecification;
+import org.eclipse.uml2.uml.TimeConstraint;
import org.eclipse.uml2.uml.UMLPackage;
/**
- * This advice add automatically the constrained element (occurrence specification) for a time constraint
- *
+ * This advice add automatically the constrained element (occurrence specification) for a time constraint
* @since 3.0
*/
public class GeneralOrderingHelperAdvice extends AbstractEditHelperAdvice {
@@ -54,17 +65,17 @@ public class GeneralOrderingHelperAdvice extends AbstractEditHelperAdvice {
final GeneralOrdering generalOrdering = (GeneralOrdering) request.getElementToConfigure();
- {// set Before
+ {//set Before
Object paramObject = this.getRequest().getParameter(CreateRelationshipRequest.SOURCE);
if (paramObject instanceof OccurrenceSpecification) {
- generalOrdering.setBefore((OccurrenceSpecification) paramObject);
+ generalOrdering.setBefore((OccurrenceSpecification)paramObject);
}
}
- {// set After
+ {//set After
- Object paramObject = this.getRequest().getParameter(CreateRelationshipRequest.TARGET);
+ Object paramObject = this.getRequest().getParameter(CreateRelationshipRequest.TARGET);
if (paramObject instanceof OccurrenceSpecification) {
- generalOrdering.setAfter((OccurrenceSpecification) paramObject);
+ generalOrdering.setAfter((OccurrenceSpecification)paramObject);
}
}
@@ -90,24 +101,27 @@ public class GeneralOrderingHelperAdvice extends AbstractEditHelperAdvice {
SetRequest setTypeRequest = null;
if (request.getDirection() == ReorientRelationshipRequest.REORIENT_SOURCE) {
- Object paramObject = request.getNewRelationshipEnd();
+ Object paramObject =request.getNewRelationshipEnd();
System.out.println(paramObject);
if (paramObject instanceof OccurrenceSpecification) {
- setTypeRequest = new SetRequest((OccurrenceSpecification) paramObject, UMLPackage.eINSTANCE.getGeneralOrdering_Before(), generalOrdering);
- } else {
+ setTypeRequest = new SetRequest((OccurrenceSpecification)paramObject, UMLPackage.eINSTANCE.getGeneralOrdering_Before(), generalOrdering);
+ }
+ else{
return UnexecutableCommand.INSTANCE;
}
- } else {
- Object paramObject = request.getNewRelationshipEnd();
+ }
+ else{
+ Object paramObject =request.getNewRelationshipEnd();
if (paramObject instanceof OccurrenceSpecification) {
- setTypeRequest = new SetRequest((OccurrenceSpecification) paramObject, UMLPackage.eINSTANCE.getGeneralOrdering_After(), generalOrdering);
- } else {
+ setTypeRequest = new SetRequest((OccurrenceSpecification)paramObject, UMLPackage.eINSTANCE.getGeneralOrdering_After(), generalOrdering);
+ }
+ else{
return UnexecutableCommand.INSTANCE;
}
if (setTypeRequest != null) {
// Propagate parameters to the set request
- // setTypeRequest.addParameters(request.getParameters());
+ //setTypeRequest.addParameters(request.getParameters());
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(generalOrdering);
if (provider != null) {
@@ -118,7 +132,6 @@ public class GeneralOrderingHelperAdvice extends AbstractEditHelperAdvice {
}
return gmfCommand;
}
-
/**
* @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
*
@@ -127,11 +140,11 @@ public class GeneralOrderingHelperAdvice extends AbstractEditHelperAdvice {
*/
@Override
public boolean approveRequest(IEditCommandRequest request) {
- if (request instanceof GetEditContextRequest) {
- GetEditContextRequest contextRequest = (GetEditContextRequest) request;
- IEditCommandRequest editCommandRequest = contextRequest.getEditCommandRequest();
- if (editCommandRequest instanceof CreateRelationshipRequest) {
- CreateRelationshipRequest relationshipRequest = (CreateRelationshipRequest) editCommandRequest;
+ if (request instanceof GetEditContextRequest){
+ GetEditContextRequest contextRequest= (GetEditContextRequest)request;
+ IEditCommandRequest editCommandRequest=contextRequest.getEditCommandRequest();
+ if(editCommandRequest instanceof CreateRelationshipRequest){
+ CreateRelationshipRequest relationshipRequest= (CreateRelationshipRequest)editCommandRequest;
if (relationshipRequest.getSource() == null && relationshipRequest.getTarget() == null) {
return false;
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/MessageHelperAdvice.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/MessageHelperAdvice.java
index 131ff319749..e878c91db12 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/MessageHelperAdvice.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/MessageHelperAdvice.java
@@ -35,10 +35,14 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.diagram.common.util.MessageDirection;
+import org.eclipse.papyrus.uml.service.types.Activator;
+import org.eclipse.papyrus.uml.service.types.command.SetMessageSort;
import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
import org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant;
import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Interaction;
@@ -90,7 +94,6 @@ public class MessageHelperAdvice extends AbstractEditHelperAdvice {
return result;
}
-
/**
* <pre>
* {@inheritDoc}
@@ -104,16 +107,19 @@ public class MessageHelperAdvice extends AbstractEditHelperAdvice {
@Override
protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ final Message message = (Message) request.getElementToConfigure();
final Element source = getSource(request);
final Element target = getTarget(request);
+ IElementType elementType = request.getTypeToConfigure();
if ((source == null) || (target == null)) {
return UnexecutableCommand.INSTANCE;
}
- if ((!(target instanceof Lifeline)) && (!(target instanceof Interaction))) {
+ if ((!(target instanceof Lifeline))&&(!(target instanceof Interaction))){
return UnexecutableCommand.INSTANCE;
}
- if ((!(target instanceof Lifeline)) && (!(target instanceof Interaction))) {
+ if ((!(target instanceof Lifeline))&&(!(target instanceof Interaction))){
return UnexecutableCommand.INSTANCE;
}
return new ConfigureElementCommand(request) {
@@ -123,64 +129,65 @@ public class MessageHelperAdvice extends AbstractEditHelperAdvice {
final Message message = (Message) request.getElementToConfigure();
final Element source = getSource(request);
final Element target = getTarget(request);
- MessageEnd previousSentEvent = (MessageEnd) request.getParameters().get(SequenceRequestConstant.PREVIOUS_EVENT);
- MessageEnd previousReceiveEvent = (MessageEnd) request.getParameters().get(SequenceRequestConstant.SECOND_PREVIOUS_EVENT);
+ MessageEnd previousSentEvent = (MessageEnd)request.getParameters().get(SequenceRequestConstant.PREVIOUS_EVENT);
+ MessageEnd previousReceiveEvent = (MessageEnd)request.getParameters().get(SequenceRequestConstant.SECOND_PREVIOUS_EVENT);
IElementType elementType = request.getTypeToConfigure();
if (ElementUtil.isTypeOf(elementType, UMLElementTypes.COMPLETE_ASYNCH_CALL)) {
- createSendEvent(message, source, previousSentEvent);
- createReceiveEvent(message, target, previousReceiveEvent);
+ createSenEvent(message, source,previousSentEvent);
+ createReceiveEvent(message, target,previousReceiveEvent);
message.setMessageSort(MessageSort.ASYNCH_CALL_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.COMPLETE_ASYNCH_SIGNAL)) {
- createSendEvent(message, source, previousSentEvent);
- createReceiveEvent(message, target, previousReceiveEvent);
+ createSenEvent(message, source,previousSentEvent);
+ createReceiveEvent(message, target,previousReceiveEvent);
message.setMessageSort(MessageSort.ASYNCH_SIGNAL_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.COMPLETE_CREATE_MESSAGE)) {
- createSendEvent(message, source, previousSentEvent);
- createReceiveEvent(message, target, previousReceiveEvent);
+ createSenEvent(message, source,previousSentEvent);
+ createReceiveEvent(message, target,previousReceiveEvent);
message.setMessageSort(MessageSort.CREATE_MESSAGE_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.COMPLETE_DELETE_MESSAGE)) {
- createSendEvent(message, source, previousSentEvent);
+ createSenEvent(message, source,previousSentEvent);
createDestroyReceiveEvent(message, target);
message.setMessageSort(MessageSort.DELETE_MESSAGE_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.COMPLETE_REPLY)) {
- createSendEvent(message, source, previousSentEvent);
- createReceiveEvent(message, target, previousReceiveEvent);
+ createSenEvent(message, source,previousSentEvent);
+ createReceiveEvent(message, target,previousReceiveEvent);
message.setMessageSort(MessageSort.REPLY_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.COMPLETE_SYNCH_CALL)) {
- createSendEvent(message, source, previousSentEvent);
- createReceiveEvent(message, target, previousReceiveEvent);
+ createSenEvent(message, source,previousSentEvent);
+ createReceiveEvent(message, target,previousReceiveEvent);
message.setMessageSort(MessageSort.SYNCH_CALL_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.FOUND_ASYNCH_CALL)) {
- createReceiveEvent(message, target, previousReceiveEvent);
+ createReceiveEvent(message, target,previousReceiveEvent);
message.setMessageSort(MessageSort.ASYNCH_CALL_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.FOUND_ASYNCH_SIGNAL)) {
- createReceiveEvent(message, target, previousReceiveEvent);
+ createReceiveEvent(message, target,previousReceiveEvent);
message.setMessageSort(MessageSort.ASYNCH_SIGNAL_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.FOUND_CREATE_MESSAGE)) {
- createReceiveEvent(message, target, previousReceiveEvent);
+ createReceiveEvent(message, target,previousReceiveEvent);
message.setMessageSort(MessageSort.CREATE_MESSAGE_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.FOUND_DELETE_MESSAGE)) {
createDestroyReceiveEvent(message, target);
message.setMessageSort(MessageSort.DELETE_MESSAGE_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.FOUND_REPLY)) {
- createReceiveEvent(message, target, previousReceiveEvent);
+ createReceiveEvent(message, target,previousReceiveEvent);
message.setMessageSort(MessageSort.REPLY_LITERAL);
- } else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.LOST_ASYNCH_CALL)) {
- createSendEvent(message, source, previousSentEvent);
+ } else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.LOST_ASYNCH_CALL)) {
+ createSenEvent(message, source,previousSentEvent);
message.setMessageSort(MessageSort.ASYNCH_CALL_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.LOST_ASYNCH_SIGNAL)) {
- createSendEvent(message, source, previousSentEvent);
+ createSenEvent(message, source,previousSentEvent);
message.setMessageSort(MessageSort.ASYNCH_SIGNAL_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.LOST_CREATE_MESSAGE)) {
- createSendEvent(message, source, previousSentEvent);
+ createSenEvent(message, source,previousSentEvent);
message.setMessageSort(MessageSort.CREATE_MESSAGE_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.LOST_DELETE_MESSAGE)) {
- createSendEvent(message, source, previousSentEvent);
+ createSenEvent(message, source,previousSentEvent);
message.setMessageSort(MessageSort.DELETE_MESSAGE_LITERAL);
} else if (ElementUtil.isTypeOf(elementType, UMLElementTypes.LOST_REPLY)) {
- createSendEvent(message, source, previousSentEvent);
+ createSenEvent(message, source,previousSentEvent);
message.setMessageSort(MessageSort.REPLY_LITERAL);
- }
+ }
+
return CommandResult.newOKCommandResult(message);
}
@@ -190,8 +197,8 @@ public class MessageHelperAdvice extends AbstractEditHelperAdvice {
*/
private void createDestroyReceiveEvent(final Message message, final Element source) {
// Create source and target ends
- MessageEnd sendEvent = createDestroyMessageEnd(message, (Lifeline) source);
- sendEvent.setName(message.getName() + "ReceiveDestroyEvent");
+ MessageEnd sendEvent = createDestroyMessageEnd(message,(Lifeline)source);
+ sendEvent.setName(message.getName()+"ReceiveDestroyEvent");
message.setReceiveEvent(sendEvent);
}
@@ -200,10 +207,10 @@ public class MessageHelperAdvice extends AbstractEditHelperAdvice {
* @param message
* @param source
*/
- private void createSendEvent(final Message message, final Element source, final MessageEnd previous) {
+ private void createSenEvent(final Message message, final Element source, final MessageEnd previous) {
// Create source and target ends
- MessageEnd sendEvent = createMessageEnd(message, (Lifeline) source, previous);
- sendEvent.setName(message.getName() + "SendEvent");
+ MessageEnd sendEvent = createMessageEnd(message,(Lifeline)source,previous);
+ sendEvent.setName(message.getName()+"SendEvent");
message.setSendEvent(sendEvent);
}
@@ -212,8 +219,8 @@ public class MessageHelperAdvice extends AbstractEditHelperAdvice {
* @param target
*/
private void createReceiveEvent(final Message message, final Element target, final MessageEnd previous) {
- MessageEnd receiveEvent = createMessageEnd(message, (Lifeline) target, previous);
- receiveEvent.setName(message.getName() + "ReceiveEvent");
+ MessageEnd receiveEvent = createMessageEnd(message,(Lifeline) target, previous);
+ receiveEvent.setName(message.getName()+"ReceiveEvent");
message.setReceiveEvent(receiveEvent);
}
};
@@ -222,39 +229,35 @@ public class MessageHelperAdvice extends AbstractEditHelperAdvice {
/**
* Create a MessageEnd
*
- * @param message
- * the message that reference the message end always !=null
- * @param lifeline
- * the lifeLine where is set the message end ,always !=null
+ * @param message the message that reference the message end always !=null
+ * @param lifeline the lifeLine where is set the message end ,always !=null
* @since 3.0
*/
public static MessageEnd createMessageEnd(Message message, Lifeline lifeline, final MessageEnd previous) {
- MessageOccurrenceSpecification messageOccurrenceSpecification = UMLFactory.eINSTANCE.createMessageOccurrenceSpecification();
- if (previous == null) {
+ MessageOccurrenceSpecification messageOccurrenceSpecification=UMLFactory.eINSTANCE.createMessageOccurrenceSpecification();
+ if(previous==null){
messageOccurrenceSpecification.setCovered(lifeline);
- } else {
- lifeline.getCoveredBys().add(lifeline.getCoveredBys().indexOf(previous) + 1, messageOccurrenceSpecification);
+ }else{
+ lifeline.getCoveredBys().add(lifeline.getCoveredBys().indexOf(previous)+1, messageOccurrenceSpecification);
}
messageOccurrenceSpecification.setMessage(message);
messageOccurrenceSpecification.setMessage(message);
- ((Interaction) message.getOwner()).getFragments().add(messageOccurrenceSpecification);
+ ((Interaction)message.getOwner()).getFragments().add(messageOccurrenceSpecification);
return messageOccurrenceSpecification;
}
/**
* Create a MessageEnd
*
- * @param message
- * the message that reference the message end always !=null
- * @param lifeline
- * the lifeLine where is set the message end ,always !=null
+ * @param message the message that reference the message end always !=null
+ * @param lifeline the lifeLine where is set the message end ,always !=null
* @since 3.0
*/
public static MessageEnd createDestroyMessageEnd(Message message, Lifeline lifeline) {
- DestructionOccurrenceSpecification messageOccurrenceSpecification = UMLFactory.eINSTANCE.createDestructionOccurrenceSpecification();
+ DestructionOccurrenceSpecification messageOccurrenceSpecification=UMLFactory.eINSTANCE.createDestructionOccurrenceSpecification();
messageOccurrenceSpecification.setCovered(lifeline);
messageOccurrenceSpecification.setMessage(message);
- ((Interaction) message.getOwner()).getFragments().add(messageOccurrenceSpecification);
+ ((Interaction)message.getOwner()).getFragments().add(messageOccurrenceSpecification);
return messageOccurrenceSpecification;
}
@@ -269,7 +272,7 @@ public class MessageHelperAdvice extends AbstractEditHelperAdvice {
* @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getBeforeDestroyDependentsCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest)
*
* @param request
- * the request
+ * the request
* @return the command to execute before the edit helper work is done
*/
@Override
@@ -277,22 +280,22 @@ public class MessageHelperAdvice extends AbstractEditHelperAdvice {
List<EObject> dependentsToDestroy = new ArrayList<EObject>();
- Message message = (Message) request.getElementToDestroy();
+ Message message = (Message)request.getElementToDestroy();
// Add send - receive referenced MessageEnd to the dependents list
// if they are not used by another element.
MessageEnd sendEvent = message.getSendEvent();
- if ((sendEvent != null) && (!isSharedEvent(sendEvent, message))) {
+ if((sendEvent != null) && (!isSharedEvent(sendEvent, message))) {
dependentsToDestroy.add(sendEvent);
}
MessageEnd recvEvent = message.getReceiveEvent();
- if ((recvEvent != null) && (!isSharedEvent(recvEvent, message))) {
+ if((recvEvent != null) && (!isSharedEvent(recvEvent, message))) {
dependentsToDestroy.add(recvEvent);
}
- // return command to destroy dependents MessageEnd
- if (!dependentsToDestroy.isEmpty()) {
+ // return command to destroy dependents MessageEnd
+ if(!dependentsToDestroy.isEmpty()) {
return request.getDestroyDependentsCommand(dependentsToDestroy);
}
@@ -318,7 +321,7 @@ public class MessageHelperAdvice extends AbstractEditHelperAdvice {
Set<EObject> crossReferences = new HashSet<EObject>();
for (Setting setting : EMFHelper.getUsages(usedObject)) {
EObject eObj = setting.getEObject();
- if (!setting.getEStructuralFeature().equals(UMLPackage.eINSTANCE.getLifeline_CoveredBy())) {
+ if( !setting.getEStructuralFeature().equals(UMLPackage.eINSTANCE.getLifeline_CoveredBy())){
if (eObj.eClass().getEPackage().equals(mmPackage)) {
crossReferences.add(eObj);
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/OccurrenceSpecificationHelperAdvice.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/OccurrenceSpecificationHelperAdvice.java
index 91f4a554480..39f7f91f764 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/OccurrenceSpecificationHelperAdvice.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/OccurrenceSpecificationHelperAdvice.java
@@ -109,7 +109,7 @@ public class OccurrenceSpecificationHelperAdvice extends AbstractEditHelperAdvic
if(!dependentsToDestroy.isEmpty()) {
return request.getDestroyDependentsCommand(dependentsToDestroy);
- }
+ }
return null;
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/request/MoveOperandFragmentEditRequest.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/request/MoveOperandFragmentEditRequest.java
index b59fc19b171..b52ba651f88 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/request/MoveOperandFragmentEditRequest.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/request/MoveOperandFragmentEditRequest.java
@@ -35,7 +35,7 @@ public class MoveOperandFragmentEditRequest extends AbstractEditCommandRequest {
* @param editingDomain
* the editing domain
* @param elementToEdit
- * the element to edit
+ * the element to edit
*/
public MoveOperandFragmentEditRequest(TransactionalEditingDomain editingDomain, Element elementToEdit) {
super(editingDomain);
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/ElementUtil.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/ElementUtil.java
index 0fec8840c0a..a2807be031b 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/ElementUtil.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/ElementUtil.java
@@ -141,6 +141,6 @@ public class ElementUtil {
if (supers.contains(typeTomatch)) {
return true;
}
- return false;
+ return false;
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/MessageUtils.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/MessageUtils.java
index feaa61f8236..cd6c0519362 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/MessageUtils.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/MessageUtils.java
@@ -16,7 +16,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.uml2.uml.Message;
/**
- * Utility class for {@link Message}.
+ * Utility class for {@link Message}.
*
*/
public class MessageUtils {
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/SequenceRequestConstant.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/SequenceRequestConstant.java
index 777fed28b40..92d09d973da 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/SequenceRequestConstant.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/utils/SequenceRequestConstant.java
@@ -37,5 +37,5 @@ public interface SequenceRequestConstant {
public static final String REPLACE_EXECUTION_SPECIFICATION_START = "REPLACE_EXECUTION_SPECIFICATION_START"; //$NON-NLS-1$
/** the finish of Execution specification can be replace by an event of a message */
public static final String REPLACE_EXECUTION_SPECIFICATION_FINISH = "REPLACE_EXECUTION_SPECIFICATION_FINISH"; //$NON-NLS-1$
-
+
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF
index 6fd60977e18..8e028bf8a8c 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF
@@ -29,4 +29,4 @@ Bundle-Name: %Bundle-Name
Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.uml.diagram.sequence.tests.Activator
Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.sequence.tests;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7 \ No newline at end of file
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/LifelineXYLayoutEditPolicyTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/LifelineXYLayoutEditPolicyTest.java
index 7a12ec8d6e2..43a3912521a 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/LifelineXYLayoutEditPolicyTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/LifelineXYLayoutEditPolicyTest.java
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertTrue;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OLDLifelineXYLayoutEditPolicy;
import org.junit.Test;
public class LifelineXYLayoutEditPolicyTest {
@@ -32,17 +32,17 @@ public class LifelineXYLayoutEditPolicyTest {
figure.setMaximumSize(new Dimension(100, 200));
figure.setMinimumSize(new Dimension(0, 30));
Dimension sizeDelta = new Dimension(30, 40);
- Dimension newSizeDelta = LifelineXYLayoutEditPolicy.adaptSizeDeltaToMaxHeight(figure, sizeDelta);
+ Dimension newSizeDelta = OLDLifelineXYLayoutEditPolicy.adaptSizeDeltaToMaxHeight(figure, sizeDelta);
assertFalse("Original dimension modified", sizeDelta == newSizeDelta);
assertEquals("Width can't change", 30, newSizeDelta.width);
assertEquals("Height change", 40, newSizeDelta.height);
sizeDelta = new Dimension(30, 190);
- newSizeDelta = LifelineXYLayoutEditPolicy.adaptSizeDeltaToMaxHeight(figure, sizeDelta);
+ newSizeDelta = OLDLifelineXYLayoutEditPolicy.adaptSizeDeltaToMaxHeight(figure, sizeDelta);
assertFalse("Original dimension modified", sizeDelta == newSizeDelta);
assertEquals("Width can't change", 30, newSizeDelta.width);
assertEquals("Height don't change", 180, newSizeDelta.height);
sizeDelta = new Dimension(30, 0);
- newSizeDelta = LifelineXYLayoutEditPolicy.adaptSizeDeltaToMaxHeight(figure, sizeDelta);
+ newSizeDelta = OLDLifelineXYLayoutEditPolicy.adaptSizeDeltaToMaxHeight(figure, sizeDelta);
assertFalse("Original dimension modified", sizeDelta == newSizeDelta);
assertEquals("Width can't change", 30, newSizeDelta.width);
assertEquals("Height don't change", 10, newSizeDelta.height);
@@ -52,15 +52,15 @@ public class LifelineXYLayoutEditPolicyTest {
public void testIsAffixedToRight() {
Rectangle leftFigure = new Rectangle(10, 10, 10, 10);
Rectangle rightFigure = new Rectangle(15, 15, 10, 10);
- assertTrue("Left figure is not on the left of the right figure", LifelineXYLayoutEditPolicy.isAffixedToRight(leftFigure, rightFigure));
- assertFalse("Right figure is on the left of the left figure", LifelineXYLayoutEditPolicy.isAffixedToRight(rightFigure, leftFigure));
+ assertTrue("Left figure is not on the left of the right figure", OLDLifelineXYLayoutEditPolicy.isAffixedToRight(leftFigure, rightFigure));
+ assertFalse("Right figure is on the left of the left figure", OLDLifelineXYLayoutEditPolicy.isAffixedToRight(rightFigure, leftFigure));
}
@Test
public void testGetRealMoveDelta() {
Rectangle oldRelativeBounds = new Rectangle(10, 10, 10, 10);
Rectangle newRelativeBounds = new Rectangle(15, 20, 25, 30);
- Rectangle absoluteBounds = LifelineXYLayoutEditPolicy.getRealMoveDelta(oldRelativeBounds, newRelativeBounds);
+ Rectangle absoluteBounds = OLDLifelineXYLayoutEditPolicy.getRealMoveDelta(oldRelativeBounds, newRelativeBounds);
assertEquals("Wrong x", 5, absoluteBounds.x);
assertEquals("Wrong y", 10, absoluteBounds.y);
assertEquals("Wrong width", 15, absoluteBounds.width);
@@ -74,7 +74,7 @@ public class LifelineXYLayoutEditPolicyTest {
Figure childFigure = new Figure();
childFigure.setBounds(new Rectangle(20, 30, 50, 50));
childFigure.setParent(parentFigure);
- Rectangle absoluteChild = LifelineXYLayoutEditPolicy.getRelativeBounds(childFigure);
+ Rectangle absoluteChild = OLDLifelineXYLayoutEditPolicy.getRelativeBounds(childFigure);
assertEquals("Wrong x", 10, absoluteChild.x);
assertEquals("Wrong y", 10, absoluteChild.y);
assertEquals("Wrong width", 50, absoluteChild.width);
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestCombinedFragmentName_382951.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestCombinedFragmentName_382951.java
index a1d7ceb9962..bf14cb4d2b2 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestCombinedFragmentName_382951.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestCombinedFragmentName_382951.java
@@ -29,7 +29,7 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomCombinedFragmentEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDCustomCombinedFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomConsiderIgnoreFragmentEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.sequence.tests.ISequenceDiagramTestsConstants;
@@ -75,7 +75,7 @@ public class TestCombinedFragmentName_382951 extends TestTopNode {
store.putBoolean(COMBINED_FRAGMENT_KEY, true);
createNode(UMLElementTypes.CombinedFragment_Shape, getRootEditPart(), new Point(10, 80), new Dimension(100, 100));
- CustomCombinedFragmentEditPart cep = (CustomCombinedFragmentEditPart)getRootEditPart().getChildren().get(0);
+ OLDCustomCombinedFragmentEditPart cep = (OLDCustomCombinedFragmentEditPart)getRootEditPart().getChildren().get(0);
CombinedFragment cf = (CombinedFragment)cep.resolveSemanticElement();
WrappingLabel label = cep.getTitleLabel();
assertTrue(TEST_THE_EXECUTION, label.isVisible());
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestDecompositionCombinedFragment_364813.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestDecompositionCombinedFragment_364813.java
index 48c95513d51..6e5ee1259a7 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestDecompositionCombinedFragment_364813.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestDecompositionCombinedFragment_364813.java
@@ -49,7 +49,7 @@ import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.sequence.tests.ISequenceDiagramTestsConstants;
@@ -152,7 +152,7 @@ public class TestDecompositionCombinedFragment_364813 extends TestTopNode {
createNode(UMLElementTypes.CombinedFragment_Shape, getRootEditPart(), new Point(200, 120), new Dimension(200, 200));
Interaction interaction = (Interaction) getRootSemanticModel();
- CustomLifelineEditPart lifeline1 = (CustomLifelineEditPart) getRootEditPart().getChildren().get(0);
+ OLDLifelineEditPart lifeline1 = (OLDLifelineEditPart) getRootEditPart().getChildren().get(0);
Classifier p = interaction.getNestedClassifier("Person");
changeRepresents(lifeline1, p.getFeature("company"));
assertTrue(CREATION + INITIALIZATION_TEST, !lifeline1.isInlineMode());
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestDecompositionMove_364812.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestDecompositionMove_364812.java
index 98dae48fbb3..6d5e79e5754 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestDecompositionMove_364812.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestDecompositionMove_364812.java
@@ -54,7 +54,7 @@ import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.sequence.tests.ISequenceDiagramTestsConstants;
@@ -233,7 +233,7 @@ public class TestDecompositionMove_364812 extends TestTopNode {
createNode(UMLElementTypes.Lifeline_Shape, getRootEditPart(), new Point(100, 100), new Dimension(300, 200));
Interaction interaction = (Interaction) getRootSemanticModel();
- CustomLifelineEditPart lifeline1 = (CustomLifelineEditPart) getRootEditPart().getChildren().get(0);
+ OLDLifelineEditPart lifeline1 = (OLDLifelineEditPart) getRootEditPart().getChildren().get(0);
Classifier p = interaction.getNestedClassifier("Person");
changeRepresents(lifeline1, p.getFeature("company"));
assertTrue(CREATION + INITIALIZATION_TEST, !lifeline1.isInlineMode());
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestLifelineLabelCustomize_383722.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestLifelineLabelCustomize_383722.java
index d9b1dfb5217..17a41bdbd15 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestLifelineLabelCustomize_383722.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/TestLifelineLabelCustomize_383722.java
@@ -47,7 +47,7 @@ import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.sequence.tests.ISequenceDiagramTestsConstants;
@@ -88,7 +88,7 @@ public class TestLifelineLabelCustomize_383722 extends TestTopNode {
public static final int SHOW_LIFELINE_NAME = 1 << 4;
- public static final String LABEL_DISPLAY_PREFERENCE = PackageEditPart.MODEL_ID + "_Lifeline.label.display";
+ public static final String LABEL_DISPLAY_PREFERENCE = SequenceDiagramEditPart.MODEL_ID + "_Lifeline.label.display";
private static final String UML_REPLACEMENT_TEMPLATE = "><nestedClassifier xmi:type=\"uml:Class\" xmi:id=\"_zAqbcIP8EeGnt9CMb_JfYQ\" name=\"Person\">" + "<ownedAttribute xmi:id=\"__-RhYIP8EeGnt9CMb_JfYQ\" name=\"company\" isStatic=\"true\" type=\"_6imi4IP8EeGnt9CMb_JfYQ\"/>" + "</nestedClassifier>" + "<nestedClassifier xmi:type=\"uml:Class\" xmi:id=\"_6imi4IP8EeGnt9CMb_JfYQ\" name=\"Company\">" + "<ownedAttribute xmi:type=\"uml:Port\" xmi:id=\"_1oQd4IP-EeGnt9CMb_JfYQ\" name=\"port1\">" + "<type xmi:type=\"uml:PrimitiveType\" href=\"pathmap://UML_METAMODELS/Ecore.metamodel.uml#EShort\"/>" + "</ownedAttribute>" + "<ownedAttribute xmi:id=\"_CVUmYIP_EeGnt9CMb_JfYQ\" name=\"Property1\">" + "<type xmi:type=\"uml:PrimitiveType\" href=\"pathmap://UML_METAMODELS/Ecore.metamodel.uml#EDouble\"/>" + "</ownedAttribute>" + "</nestedClassifier>" + "</packagedElement>" + "<packageImport xmi:id=\"_q19q4YP8EeGnt9CMb_JfYQ\">" + "<importedPackage xmi:type=\"uml:Model\" href=\"pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0\"/>" + "</packageImport>";
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/AbstractNodeTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/AbstractNodeTest.java
index 74ef1bdd305..d6cfebb1fdc 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/AbstractNodeTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/AbstractNodeTest.java
@@ -295,7 +295,7 @@ public abstract class AbstractNodeTest extends TestTopNode {
location = eventAndLocation.getKey();
events = eventAndLocation.getValue();
}
- request.getExtendedData().put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
+ request.getExtendedData().put(org.eclipse.papyrus.uml.service.types.utils.SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
request.getExtendedData().put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION, location);
if(location != null) {
request.setLocation(location);
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestElementIcon_396799.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestElementIcon_396799.java
index 61384872a9e..647e7d44753 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestElementIcon_396799.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestElementIcon_396799.java
@@ -194,7 +194,7 @@ public class TestElementIcon_396799 extends AbstractNodeTest {
public void testCombinedFragment() {
CombinedFragmentEditPart cf = (CombinedFragmentEditPart) createNode(UMLElementTypes.CombinedFragment_Shape, getRootEditPart(), new Point(100, 100), new Dimension(200, 200));
assertNotNull(cf);
- testElementIcon(cf.getPrimaryShape().getHeaderLabel(), cf.getNotationView(), true);
+ testElementIcon(cf.getPrimaryShape().getNameLabel(), cf.getNotationView(), true);
}
@Test
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestExecutionSpecificationPosition_395462.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestExecutionSpecificationPosition_395462.java
index 36d35e518a9..b67f5b7a848 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestExecutionSpecificationPosition_395462.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/m7/TestExecutionSpecificationPosition_395462.java
@@ -52,7 +52,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CustomLifelineEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.OLDLifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineNameEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -252,12 +252,12 @@ public class TestExecutionSpecificationPosition_395462 extends AbstractNodeTest
assertNotNull(PREPARE_MODEL, booksProperty);
// set represents;
setRepresents(host, booksProperty);
- assertTrue(host instanceof CustomLifelineEditPart);
+ assertTrue(host instanceof OLDLifelineEditPart);
// create PartDecomposition
Rectangle bounds = getAbsoluteBounds(host);
LifelineEditPart lifeline = createLifeline(host, new Point(bounds.x + 40, bounds.y + 1), authorProperty);
assertNotNull(PREPARE_MODEL, lifeline);
- assertTrue(((CustomLifelineEditPart) host).isInlineMode());
+ assertTrue(((OLDLifelineEditPart) host).isInlineMode());
Rectangle b1 = getAbsoluteBounds(lifeline);
AbstractExecutionSpecificationEditPart es = createExecutionSpecification(lifeline, b1.getCenter(), null);
assertNotNull(es);
@@ -339,7 +339,8 @@ public class TestExecutionSpecificationPosition_395462 extends AbstractNodeTest
getDiagramCommandStack().execute(command);
waitForComplete();
// waiting until dialog closed.
- while (true) {
+ int i=0;
+ while (i<1000000) {
if (!result.isEmpty()) {
result.get(0).close();
Shell shell = result.get(0).getShell();
@@ -348,6 +349,7 @@ public class TestExecutionSpecificationPosition_395462 extends AbstractNodeTest
}
break;
}
+ i++;
}
// return the created EditPart.
List<? extends ViewDescriptor> viewDescriptors = createReq.getViewDescriptors();
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/CreateSequenceDiagramCommand.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/CreateSequenceDiagramCommand.java
index e71123b1873..d4d58fad1d2 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/CreateSequenceDiagramCommand.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/CreateSequenceDiagramCommand.java
@@ -16,7 +16,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.tests.canonical;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
import org.eclipse.papyrus.uml.diagram.common.commands.CreateBehavioredClassifierDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.SequenceDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.uml2.uml.UMLPackage;
@@ -31,7 +31,7 @@ public class CreateSequenceDiagramCommand extends CreateBehavioredClassifierDiag
*/
@Override
protected String getDiagramNotationID() {
- return PackageEditPart.MODEL_ID;
+ return SequenceDiagramEditPart.MODEL_ID;
}
/**
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestChildNode.java
index f795bf115dc..88c809cfe44 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestChildNode.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestChildNode.java
@@ -46,6 +46,7 @@ public abstract class TestChildNode extends AbstractPapyrusTestCase {
protected abstract CreateViewRequest createViewRequestShapeContainer();
protected GraphicalEditPart rootPart;
+ private Command command;
protected GraphicalEditPart getRootEditPart() {
if (rootPart == null) {
@@ -160,17 +161,21 @@ public abstract class TestChildNode extends AbstractPapyrusTestCase {
* @param type
* the type
*/
- public void testToCreateChildNode(IElementType type, IChildTestProvider provider) {
+ public void testToCreateChildNode(IElementType type, final IChildTestProvider provider) {
// CREATION
assertTrue(CREATION + INITIALIZATION_TEST, provider.getEditPartChildrenSize() == 0);
assertTrue(CREATION + INITIALIZATION_TEST, !provider.hasSemanticChild() || provider.getSemanticChildrenSize() == 0);
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getRootEditPart().getDiagramPreferencesHint());
-
+ final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getRootEditPart().getDiagramPreferencesHint());
requestcreation.setLocation(provider.getChildLocation(provider.getParentEditPart()));
+ command = null;
+ Display.getDefault().syncExec(new Runnable() {
- Command command = provider.getParentEditPart().getCommand(requestcreation);
+ public void run() {
+ command = provider.getParentEditPart().getCommand(requestcreation);
+ }
+ });
assertNotNull(CREATION + COMMAND_NULL, command);
assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestSequenceDiagramChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestSequenceDiagramChildNode.java
index 58e9a230e3f..70f949a6318 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestSequenceDiagramChildNode.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestSequenceDiagramChildNode.java
@@ -32,6 +32,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
+import org.eclipse.papyrus.junit.utils.DisplayUtils;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.sequence.tests.ISequenceDiagramTestsConstants;
@@ -229,9 +230,10 @@ public class TestSequenceDiagramChildNode extends TestChildNode {
}
public Point getChildLocation(GraphicalEditPart parentEditPart) {
- IFigure f = ((LifelineEditPart)parentEditPart).getPrimaryShape().getFigureLifelineDotLineFigure();
- Rectangle b = f.getBounds().getCopy();
- f.translateToAbsolute(b);
+ IFigure LifelineFigure = ((LifelineEditPart)parentEditPart).getPrimaryShape();
+ DisplayUtils.flushEventLoop();
+ Rectangle b = LifelineFigure.getBounds().getCopy();
+ LifelineFigure.translateToAbsolute(b);
return b.getCenter().getCopy().translate(0, 50);
}
};
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestSequenceDiagramLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestSequenceDiagramLink.java
index 95989fe13b5..4bda77d9ae4 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestSequenceDiagramLink.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/canonical/TestSequenceDiagramLink.java
@@ -114,6 +114,7 @@ public class TestSequenceDiagramLink extends TestLink {
testToManageLink(UMLElementTypes.Lifeline_Shape, UMLElementTypes.Lifeline_Shape, UMLElementTypes.Message_CreateEdge, lifelineProvider, false);
}
+ @SuppressWarnings("unchecked")
@Override
public CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target, ILinkTestProvider provider) {
CreateConnectionViewRequest request = super.createConnectionViewRequest(type, source, target, provider);
@@ -227,7 +228,7 @@ public class TestSequenceDiagramLink extends TestLink {
public Point getConnectionSourceLocation(EditPart part) {
if(part instanceof LifelineEditPart) {
- IFigure f = ((LifelineEditPart)part).getPrimaryShape().getFigureLifelineDotLineFigure();
+ IFigure f = ((LifelineEditPart)part).getPrimaryShape();
return getCenter(f);
}
if(part instanceof AbstractExecutionSpecificationEditPart || part instanceof InteractionEditPart) { // found message
@@ -238,7 +239,7 @@ public class TestSequenceDiagramLink extends TestLink {
public Point getConnectionTargetLocation(EditPart part) {
if(part instanceof LifelineEditPart) {
- IFigure f = ((LifelineEditPart)part).getPrimaryShape().getFigureLifelineDotLineFigure();
+ IFigure f = ((LifelineEditPart)part).getPrimaryShape();
return getCenter(f);
}
if(part instanceof AbstractExecutionSpecificationEditPart || part instanceof InteractionEditPart) {
@@ -253,7 +254,7 @@ public class TestSequenceDiagramLink extends TestLink {
}
public Point getChildLocation(GraphicalEditPart parentEditPart) {
- IFigure f = ((LifelineEditPart)parentEditPart).getPrimaryShape().getFigureLifelineDotLineFigure();
+ IFigure f = ((LifelineEditPart)parentEditPart).getPrimaryShape();
return getCenter(f).translate(0, 1);
}

Back to the top