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/ActionExecutionSpecificationEditHelper.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/CommentEditHelper.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/BehaviorExecutionSpecificationEditHelper.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CombinedFragmentEditHelper.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/MessageEditHelper.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/ConsiderIgnoreFragmentEditHelper.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/