Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.classpath14
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.options7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.settings/sequenceDiagram.gmfgen.prefs6
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/META-INF/MANIFEST.MF63
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/about.html28
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/build.properties16
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramCommand.java57
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramWithNavigationHandler.java25
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/ObservationLinkMetamodelType.java38
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramCreationCondition.java35
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramEditorFactory.java30
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/UmlSequenceDiagramForMultiEditor.java117
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/ChangeEdgeTargetCommand.java79
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateElementAndNodeCommand.java185
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateLocatedConnectionViewCommand.java239
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeObservationCreateCommand.java108
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomZOrderCommand.java57
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/PromptCreateElementAndNodeCommand.java139
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/draw2d/routers/MessageRouter.java796
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java390
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractMessageEditPart.java194
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationEndEditPart.java595
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionFragmentEditPart.java206
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCreationEditPolicy.java162
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemComponentEditPolicy.java90
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CreationOnMessageEditPolicy.java124
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomConnectionHandleEditPolicy.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java1188
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomExternalLabelPrimaryDragRoleEditPolicy.java67
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DeleteTimeElementWithoutEventPolicy.java461
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionEventComponentEditPolicy.java43
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ElementCreationWithMessageEditPolicy.java117
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationComponentEditPolicy.java71
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExternalLabelPrimaryDragRoleEditPolicy.java69
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/HighlightConnectionPartEditPolicy.java46
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCompartmentXYLayoutEditPolicy.java789
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandComponentEditPolicy.java90
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandDragDropEditPolicy.java71
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandLayoutEditPolicy.java108
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineAppliedStereotypeNodeLabelDisplayEditPolicy.java39
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java237
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineCreationEditPolicy.java202
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineLabelEditPolicy.java207
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineXYLayoutEditPolicy.java927
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageConnectionEditPolicy.java54
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageConnectionLineSegEditPolicy.java332
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageLabelEditPolicy.java1000
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MoveableNonResizableLabelEditPolicy.java184
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ObservationLinkPolicy.java728
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/RemoveOrphanViewPolicy.java34
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/SequenceGraphicalNodeEditPolicy.java517
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeRelatedSelectionEditPolicy.java39
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java129
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java56
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DestructionEventFigure.java66
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/EllipseDecoration.java51
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionOperandFigure.java45
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionUseRectangleFigure.java59
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifelineDotLineCustomFigure.java188
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/CenterLocator.java232
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/ContinuationLocator.java83
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/TimeMarkElementPositionLocator.java386
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/DurationObservationParser.java120
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/InteractionUseCustomParsers.java146
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/LifelineCustomParsers.java198
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/MessageCustomParser.java111
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/TimeConstraintParser.java273
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/TimeObservationParser.java122
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPolicyProvider.java94
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/service/DurationCreationTool.java471
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentDeleteHelper.java323
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CommandHelper.java1203
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/DestructionOccurrenceUtil.java71
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/EventHelper.java234
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/HighlightUtil.java272
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperatorKindCompatibleMapping.java40
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionUseUtil.java49
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineCoveredByUpdater.java138
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineLabelHelper.java170
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageCreateHelper.java263
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineModelChildrenHelper.java90
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineResizeHelper.java106
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LoopOperatorUtil.java53
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/MessageStyleElementFactory.java56
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/NotificationHelper.java74
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationMoveHelper.java1126
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperandBoundsComputeHelper.java837
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/PreferencesModelElementFactory.java14
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/ReconnectMessageHelper.java182
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SelectOrCreateDialog.java647
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceDeleteHelper.java371
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceLinkMappingHelper.java126
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceRequestConstant.java54
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java1713
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/FragmentOrderingKeeper.java823
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/UMLValidationHelper.java106
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/incomingLinksNavigatorGroup.gifbin709 -> 0 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linkSourceNavigatorGroup.gifbin709 -> 0 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linkTargetNavigatorGroup.gifbin709 -> 0 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linksNavigatorGroup.gifbin709 -> 0 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/obj16/Diagram_Sequence.gifbin92 -> 0 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/obj16/UMLDiagramFile.gifbin339 -> 0 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/outgoingLinksNavigatorGroup.gifbin709 -> 0 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/wizban/NewUMLWizard.gifbin2466 -> 0 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/messages.properties201
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/Environment.xmi12
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/seq.ctx59
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/CombinedFragmentTitle.xwt9
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/ConsiderIgnoreFragmentTitle.xwt9
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/MessageStyle.xwt32
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfgen7475
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfgraph912
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfmap1066
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmftool376
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.trace221
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/plugin.properties78
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/plugin.xml1533
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/Activator.java65
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java137
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java133
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java135
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java146
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementCreateCommand.java106
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementReorientCommand.java169
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java129
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java170
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementCreateCommand.java106
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementReorientCommand.java169
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java138
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java154
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java130
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java176
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java128
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java191
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingCreateCommand.java186
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingReorientCommand.java157
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java138
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java193
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java138
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java191
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2CreateCommand.java191
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2ReorientCommand.java171
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3CreateCommand.java184
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3ReorientCommand.java171
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4CreateCommand.java184
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4ReorientCommand.java173
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5CreateCommand.java247
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5ReorientCommand.java171
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6CreateCommand.java183
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6ReorientCommand.java174
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7CreateCommand.java183
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7ReorientCommand.java174
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageCreateCommand.java185
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageReorientCommand.java179
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java130
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java168
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java175
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/UMLReorientConnectionViewCommand.java80
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ActionExecutionSpecificationEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/AnchorHelper.java195
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/BehaviorExecutionSpecificationEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CombinedFragmentEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CommentEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConsiderIgnoreFragmentEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConstraintEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ContinuationEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DestructionEventEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintInMessageEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationObservationEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/GeneralOrderingEditHelper.java7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionOperandEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionUseEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/LifelineEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageOccurrenceSpecificationEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/PackageEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/StateInvariantEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeConstraintEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeObservationEditHelper.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java110
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java1120
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationNameEditPart.java753
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java1117
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java1033
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentCombinedFragmentCompartmentEditPart.java277
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentEditPart.java1733
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentAnnotatedElementEditPart.java101
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentBodyEditPart.java758
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentEditPart.java1144
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConsiderIgnoreFragmentEditPart.java1113
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Constraint2EditPart.java759
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintConstrainedElementEditPart.java101
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintEditPart.java1185
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintNameEditPart.java757
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationEditPart.java1144
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationNameEditPart.java778
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java1042
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java777
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java1335
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java777
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java1237
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java772
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java771
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java777
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java1157
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java773
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingAppliedStereotypeEditPart.java730
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingEditPart.java258
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionEditPart.java1351
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionInteractionCompartmentEditPart.java144
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionNameEditPart.java756
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandEditPart.java1879
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseEditPart.java1351
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseName2EditPart.java758
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseNameEditPart.java750
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java2286
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineNameEditPart.java768
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message2EditPart.java269
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message3EditPart.java271
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message4EditPart.java272
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message5EditPart.java273
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message6EditPart.java278
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message7EditPart.java286
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncAppliedStereotypeEditPart.java723
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateAppliedStereotypeEditPart.java723
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteAppliedStereotypeEditPart.java723
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEditPart.java276
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEndEditPart.java664
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java743
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostAppliedStereotypeEditPart.java723
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName2EditPart.java722
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName3EditPart.java722
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName4EditPart.java736
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName5EditPart.java722
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName6EditPart.java722
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName7EditPart.java722
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageNameEditPart.java722
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyAppliedStereotypeEditPart.java723
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncAppliedStereotypeEditPart.java723
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ObservationLinkEditPart.java202
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/PackageEditPart.java186
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantEditPart.java1235
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantNameEditPart.java778
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java777
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java1248
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java771
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java777
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java1171
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java944
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java410
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ActionExecutionSpecificationItemSemanticEditPolicy.java276
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/BehaviorExecutionSpecificationItemSemanticEditPolicy.java275
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragment2ItemSemanticEditPolicy.java225
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentCanonicalEditPolicy.java172
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java102
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemSemanticEditPolicy.java215
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java60
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentItemSemanticEditPolicy.java212
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConsiderIgnoreFragmentItemSemanticEditPolicy.java210
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java59
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintItemSemanticEditPolicy.java212
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContinuationItemSemanticEditPolicy.java212
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicy.java223
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintInMessageItemSemanticEditPolicy.java212
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintItemSemanticEditPolicy.java212
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationObservationItemSemanticEditPolicy.java212
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GeneralOrderingItemSemanticEditPolicy.java188
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCanonicalEditPolicy.java186
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentCanonicalEditPolicy.java201
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java71
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java219
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandCanonicalEditPolicy.java195
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java299
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionUseItemSemanticEditPolicy.java212
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineCanonicalEditPolicy.java204
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java290
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineSelectionEditPolicy.java286
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message2ItemSemanticEditPolicy.java230
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message3ItemSemanticEditPolicy.java228
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message4ItemSemanticEditPolicy.java233
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message5ItemSemanticEditPolicy.java228
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message6ItemSemanticEditPolicy.java228
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message7ItemSemanticEditPolicy.java228
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageItemSemanticEditPolicy.java228
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OpenDiagramEditPolicy.java197
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageCanonicalEditPolicy.java592
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java79
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/StateInvariantItemSemanticEditPolicy.java212
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeConstraintItemSemanticEditPolicy.java212
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeObservationItemSemanticEditPolicy.java212
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java693
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextNonResizableEditPolicy.java236
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextSelectionEditPolicy.java220
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLAbstractExpression.java166
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLOCLFactory.java181
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLAbstractNavigatorItem.java71
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorContentProvider.java230
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorItem.java119
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorLabelProvider.java107
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorActionProvider.java181
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java2549
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorGroup.java110
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorItem.java97
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java741
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLinkHelper.java128
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorSorter.java40
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/parsers/AbstractParser.java431
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/parsers/MessageFormatParser.java202
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/DeleteElementAction.java4
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/DiagramEditorContextMenuProvider.java62
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/LoadResourceAction.java43
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java1031
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/ModelElementSelectionPage.java156
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizard.java167
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizardPage.java96
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramActionBarContributor.java60
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java567
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorPlugin.java343
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java378
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdateCommand.java91
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java2518
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDocumentProvider.java988
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLInitDiagramFileAction.java99
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLLinkDescriptor.java105
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLMatchingStrategy.java47
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNewDiagramFileWizard.java174
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNodeDescriptor.java55
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLPaletteFactory.java697
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLUriEditorInputTester.java35
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java962
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/ValidateAction.java254
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ActionExecutionSpecificationPreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/BehaviorExecutionSpecificationPreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CombinedFragmentPreferencePage.java94
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CommentPreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConsiderIgnoreFragmentPreferencePage.java95
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConstraintPreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ContinuationPreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionEventPreferencePage.java65
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionOccurrenceSpecificationPreferencePage.java51
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramAppearancePreferencePage.java31
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramConnectionsPreferencePage.java31
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramGeneralPreferencePage.java33
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPreferenceInitializer.java84
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPrintingPreferencePage.java31
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramRulersAndGridPreferencePage.java31
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintInMessagePreferencePage.java52
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintPreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationObservationPreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/GeneralOrderingPreferencePage.java36
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionOperandPreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionPreferencePage.java118
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionUsePreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/LifelinePreferencePage.java222
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessageOccurrenceSpecificationPreferencePage.java40
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessagePreferencePage.java214
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/StateInvariantPreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeConstraintPreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeObservationPreferencePage.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/ElementInitializers.java613
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLEditPartProvider.java158
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java525
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLIconProvider.java44
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLMarkerNavigationProvider.java81
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLModelingAssistantProvider.java527
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLParserProvider.java751
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationDecoratorProvider.java59
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationProvider.java322
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java1435
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/sheet/UMLPropertySection.java123
-rw-r--r--deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/sheet/UMLSheetLabelProvider.java91
375 files changed, 0 insertions, 128979 deletions
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.classpath b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.classpath
deleted file mode 100644
index 0a6d19dd7e7..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.classpath
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="custom-src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
- <accessrules>
- <accessrule kind="nonaccessible" pattern="javax/swing/**"/>
- <accessrule kind="discouraged" pattern="java/awt/**"/>
- <accessrule kind="discouraged" pattern="org/eclipse/swt/layout/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.options b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.options
deleted file mode 100644
index e280f1a9a6b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.options
+++ /dev/null
@@ -1,7 +0,0 @@
-# Tracing options for the org.eclipse.papyrus.uml.diagram.sequence plug-in
-
-# Common issues
-org.eclipse.papyrus.uml.diagram.sequence/debug=false
-
-# Visual IDs
-org.eclipse.papyrus.uml.diagram.sequence/debug/visualID=false
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.project b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.project
deleted file mode 100644
index d7d275116ac..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.diagram.sequence</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.settings/org.eclipse.jdt.core.prefs b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 653db0f115c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Wed Aug 05 15:49:35 CEST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.settings/sequenceDiagram.gmfgen.prefs b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.settings/sequenceDiagram.gmfgen.prefs
deleted file mode 100644
index 4d17984eb1a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/.settings/sequenceDiagram.gmfgen.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-eclipse.preferences.version=1
-generate_rcp=false
-ignore_gmfgen_validation=true
-ignore_mapmodel_validation=true
-use_map_mode=true
-use_runtime_figures=true
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/META-INF/MANIFEST.MF
deleted file mode 100644
index 67422fbcb57..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,63 +0,0 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.sequence,
- org.eclipse.papyrus.uml.diagram.sequence.edit.parts,
- org.eclipse.papyrus.uml.diagram.sequence.edit.policies,
- org.eclipse.papyrus.uml.diagram.sequence.part,
- org.eclipse.papyrus.uml.diagram.sequence.providers
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.expressions,
- org.eclipse.ui.navigator,
- org.eclipse.ui.navigator.resources,
- org.eclipse.gmf.runtime.diagram.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="0.10.0",
- org.eclipse.papyrus.extensionpoints.editors;bundle-version="0.10.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.10.0",
- org.eclipse.jface,
- org.eclipse.gmf.runtime.emf.core,
- org.eclipse.gmf.runtime.emf.commands.core,
- org.eclipse.gmf.runtime.emf.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui,
- org.eclipse.gmf.runtime.diagram.ui.providers,
- org.eclipse.gmf.runtime.diagram.ui.providers.ide,
- org.eclipse.gmf.runtime.diagram.ui.render,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.gmf.runtime.draw2d.ui,
- org.eclipse.uml2.uml,
- org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.0",
- org.eclipse.gmf.runtime.notation,
- org.eclipse.papyrus.uml.service.types;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="0.10.0",
- org.eclipse.papyrus.uml.appearance;bundle-version="0.10.0",
- org.eclipse.ocl.ecore;bundle-version="3.2.0",
- org.eclipse.papyrus.infra.core;bundle-version="0.10.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.10.0",
- org.eclipse.papyrus.uml.tools;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.extendedtypes;bundle-version="0.10.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="0.10.0",
- org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.emf;bundle-version="0.10.0",
- org.eclipse.emf.databinding;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.tools;bundle-version="0.10.0",
- org.eclipse.papyrus.views.properties;bundle-version="0.10.0",
- org.eclipse.papyrus.views.properties.model;bundle-version="0.10.0"
-Bundle-Vendor: %providerName
-Eclipse-LazyStart: true
-Bundle-Version: 0.10.0.qualifier
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.sequence.part.UMLDia
- gramEditorPlugin
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.sequence;singleto
- n:=true
-
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/about.html b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/about.html
deleted file mode 100644
index 82d49bf5f81..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/build.properties b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/build.properties
deleted file mode 100644
index 607bca21e83..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-#Mon Sep 12 09:29:49 CEST 2011
-bin.includes = META-INF/,\
- .,\
- .options,\
- icons/,\
- messages.properties,\
- plugin.properties,\
- plugin.xml,\
- about.html,\
- model/prop/
-output..=bin/
-jars.compile.order=.
-src.includes = about.html
-source..=src/,custom-src/
-bin..=bin/
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramCommand.java
deleted file mode 100644
index 03e5c385d8c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramCommand.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence;
-
-import org.eclipse.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.part.UMLDiagramEditorPlugin;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * Define a command to create a new Sequence Diagram. This command is used by all UI (toolbar,
- * outline, creation wizards) to create a new Sequence Diagram.
- */
-public class CreateSequenceDiagramCommand extends CreateBehavioredClassifierDiagramCommand {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getDiagramNotationID() {
- return PackageEditPart.MODEL_ID;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected PreferencesHint getPreferenceHint() {
- return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getDefaultDiagramName() {
- return "SeqDiagram"; //$NON-NLS-1$
- }
-
- @Override
- protected EClass getBehaviorEClass() {
- return UMLPackage.eINSTANCE.getInteraction();
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramWithNavigationHandler.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramWithNavigationHandler.java
deleted file mode 100644
index 4b2f56c87c2..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-
-public class CreateSequenceDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateSequenceDiagramWithNavigationHandler() {
- super(new CreateSequenceDiagramCommand(), new SequenceDiagramCreationCondition());
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/ObservationLinkMetamodelType.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/ObservationLinkMetamodelType.java
deleted file mode 100644
index b1b26cd645b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/ObservationLinkMetamodelType.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence;
-
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.gmf.runtime.emf.type.core.MetamodelType;
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper;
-import org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.MetamodelTypeDescriptor;
-import org.eclipse.gmf.runtime.emf.type.core.internal.l10n.EMFTypeCoreMessages;
-
-public class ObservationLinkMetamodelType extends MetamodelType {
-
- public static final String ID = "org.eclipse.papyrus.uml.diagram.sequence.emf.type.core.observationlink"; //$NON-NLS-1$
-
- private static final ObservationLinkMetamodelType INSTANCE = new ObservationLinkMetamodelType();
- private static final MetamodelTypeDescriptor DESCRIPTOR_INSTANCE = new MetamodelTypeDescriptor(
- INSTANCE);
-
- /**
- * Initializes me.
- */
- private ObservationLinkMetamodelType() {
- super(ID, null, EMFTypeCoreMessages.defaultEditHelper_name,
- EcorePackage.Literals.EOBJECT, new DefaultEditHelper());
- }
-
- public static ObservationLinkMetamodelType getInstance() {
- return INSTANCE;
- }
-
- public static MetamodelTypeDescriptor getDescriptorInstance() {
- return DESCRIPTOR_INSTANCE;
- }
-
- private static class DefaultEditHelper extends AbstractEditHelper {
- DefaultEditHelper() {
- super();
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramCreationCondition.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramCreationCondition.java
deleted file mode 100644
index 51c75bae096..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramCreationCondition.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * Atos Origin - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.uml2.uml.Interaction;
-
-/**
- * SequenceDiagramCreationCondition class allows to check if a Sequence diagram can be added to the
- * selected element.
- */
-public class SequenceDiagramCreationCondition extends PerspectiveContextDependence {
-
- /**
- * @return whether the diagram can be created.
- */
- public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- // TODO : to specify according to the spec
- return selectedElement instanceof Interaction;
- }
- return false;
- }
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramEditorFactory.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramEditorFactory.java
deleted file mode 100644
index 32c702571bb..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramEditorFactory.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence;
-
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-
-/**
- * The editor factory to launch the sequence diagram.
- */
-public class SequenceDiagramEditorFactory extends GmfEditorFactory {
-
- /**
- * Instantiates a new sequence diagram editor factory.
- */
- public SequenceDiagramEditorFactory() {
- super(UmlSequenceDiagramForMultiEditor.class, PackageEditPart.MODEL_ID);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/UmlSequenceDiagramForMultiEditor.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/UmlSequenceDiagramForMultiEditor.java
deleted file mode 100644
index 21941bf46e5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/UmlSequenceDiagramForMultiEditor.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.editor.BackboneException;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-
-/**
- * Editor used in multitabs editor.
- */
-public class UmlSequenceDiagramForMultiEditor extends UMLDiagramEditor {
-
- /**
- * The location of diagram icon in the plug-in
- */
- private static final String DIAG_IMG_PATH = "icons/obj16/Diagram_Sequence.gif";
-
- /**
- * The image descriptor of the diagram icon
- */
- private static final ImageDescriptor DIAG_IMG_DESC = UMLDiagramEditorPlugin.getBundledImageDescriptor(UmlSequenceDiagramForMultiEditor.DIAG_IMG_PATH);
-
- /** The editor splitter. */
- private Composite splitter;
-
- /**
- * Constructor for SashSystem v2. Context and required objects are retrieved from the
- * ServiceRegistry.
- *
- * @throws BackboneException
- * @throws ServiceException
- */
- public UmlSequenceDiagramForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException {
- super(servicesRegistry, diagram);
-
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- super.init(site, input);
- setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setInput(IEditorInput input) {
- try {
- // Provide an URI with fragment in order to reuse the same Resource
- // and set the diagram to the fragment.
- URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(getDiagram()));
- doSetInput(uriInput, true);
- } catch (CoreException x) {
- String title = "Problem opening";
- String msg = "Cannot open input element:";
- Shell shell = getSite().getShell();
- ErrorDialog.openError(shell, title, msg, x.getStatus());
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void createGraphicalViewer(Composite parent) {
- splitter = parent;
- super.createGraphicalViewer(parent);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setFocus() {
- splitter.setFocus();
- super.setFocus();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getEditingDomainID() {
- return "org.eclipse.papyrus.uml.diagram.sequence.EditingDomain";
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/ChangeEdgeTargetCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/ChangeEdgeTargetCommand.java
deleted file mode 100644
index 2fe630f70dd..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/ChangeEdgeTargetCommand.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.ConnectionViewDescriptor;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.IdentityAnchor;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-
-
-/**
- * Command used to change the target of an edge.
- * It create an IdentityAnchor to attach the edge.
- *
- * @author Mathieu Velten
- *
- */
-public class ChangeEdgeTargetCommand extends AbstractTransactionalCommand {
-
- protected CreateElementAndNodeCommand createElementAndNodeCommand;
-
- protected ConnectionViewDescriptor descriptor;
-
- protected String anchorId;
-
- /**
- *
- * @param editingDomain
- * the editing domain.
- * @param createElementAndNodeCommand
- * used to retrieve the target new node of the edge.
- * @param descriptor
- * used to retrieve the edge.
- * @param anchorId
- * the identity of the anchor which will be created to attach the edge.
- */
- public ChangeEdgeTargetCommand(TransactionalEditingDomain editingDomain, CreateElementAndNodeCommand createElementAndNodeCommand, ConnectionViewDescriptor descriptor, String anchorId) {
- super(editingDomain, "Change message graphical target", null);
- this.createElementAndNodeCommand = createElementAndNodeCommand;
- this.descriptor = descriptor;
- this.anchorId = anchorId;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- // retrieve the edge from the descriptor
- Object obj = descriptor.getAdapter(Edge.class);
-
- if(obj instanceof Edge) {
- Edge edge = (Edge)obj;
- edge.setTarget(createElementAndNodeCommand.getCreatedView());
-
- IdentityAnchor anchor = NotationFactory.eINSTANCE.createIdentityAnchor();
- anchor.setId(anchorId);
-
- edge.setTargetAnchor(anchor);
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateElementAndNodeCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateElementAndNodeCommand.java
deleted file mode 100644
index 2a65a13a786..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateElementAndNodeCommand.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.HashMap;
-import java.util.List;
-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.draw2d.geometry.Point;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * Command to create an element and its associated view.
- *
- * @author Mathieu Velten
- *
- */
-public class CreateElementAndNodeCommand extends AbstractTransactionalCommand {
-
- protected ShapeNodeEditPart nodeEditPart;
-
- protected Point location;
-
- protected EObject parent, element;
-
- protected TransactionalEditingDomain editingDomain;
-
- protected Command elementCreationCommand;
-
- protected Command nodeCreationCommand;
-
- protected Map<String, Object> createElementRequestParameters = new HashMap<String, Object>();
-
- protected IHintedType elementType;
-
- protected CreateViewRequest createViewRequest;
-
- private List affectedFiles;
-
- /**
- *
- * @param editingDomain
- * editingDomain the editing domain.
- * @param nodeEditPart
- * the editpart of the graphical parent of the node to create.
- * @param parent
- * the parent of the element to create.
- * @param elementType
- * the GMF type of the element which will be created.
- * @param location
- * the location where to create the element figure.
- */
- public CreateElementAndNodeCommand(TransactionalEditingDomain editingDomain, ShapeNodeEditPart nodeEditPart, EObject parent, IHintedType elementType, Point location) {
- super(editingDomain, "Create element and node command", null);
- this.nodeEditPart = nodeEditPart;
- this.location = location;
- this.parent = parent;
- this.editingDomain = editingDomain;
- this.elementType = elementType;
- }
-
- public List getAffectedFiles() {
- if (affectedFiles == null) {
- if (getCreatedView() != null) {
- affectedFiles = getWorkspaceFiles(getCreatedView());
- } else {
- affectedFiles = super.getAffectedFiles();
- }
- }
- return affectedFiles;
- }
-
- /**
- * put a parameter which will be add to the parameters of the element creation request.
- *
- * @param key
- * @param value
- */
- public void putCreateElementRequestParameter(String key, Object value) {
- createElementRequestParameters.put(key, value);
- }
-
- /**
- * retrieve the view associated with the created execution specification
- *
- * @return the view or null if not created/founded
- */
- public View getCreatedView() {
- if(createViewRequest != null) {
- List l = (List)createViewRequest.getNewObject();
- if(!l.isEmpty() && l.get(0) instanceof ViewDescriptor) {
- return (View)((ViewDescriptor)l.get(0)).getAdapter(View.class);
- }
- }
- return null;
- }
-
- public void undo() {
- if(nodeCreationCommand != null && nodeCreationCommand.canUndo()) {
- nodeCreationCommand.undo();
- }
- if(elementCreationCommand != null && elementCreationCommand.canUndo()) {
- elementCreationCommand.undo();
- }
- }
-
- /**
- * Create the element in the model.
- *
- * @return the element.
- */
- protected EObject createModelElement() {
-
- CreateElementRequest req = new CreateElementRequest(editingDomain, parent, elementType);
- req.addParameters(createElementRequestParameters);
-
- elementCreationCommand = nodeEditPart.getCommand(new EditCommandRequestWrapper(req));
-
- if(elementCreationCommand != null) {
- elementCreationCommand.execute();
- EObject result = req.getNewElement();
- if(result instanceof EObject) {
- return (EObject)result;
- }
- }
- return null;
- }
-
- /**
- * Create and execute the command to create the associated view.
- * The element needs to be created first using createModelElement.
- */
- protected void createElementView() {
- if(nodeEditPart != null) {
- // check if execution specification is already drawn
- if(getCreatedView() == null) {
- ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(new EObjectAdapter((EObject)element), Node.class, elementType.getSemanticHint(), nodeEditPart.getDiagramPreferencesHint());
- createViewRequest = new CreateViewRequest(descriptor);
- createViewRequest.setLocation(location);
- nodeCreationCommand = nodeEditPart.getCommand(createViewRequest);
- if(nodeCreationCommand != null && nodeCreationCommand.canExecute()) {
- nodeCreationCommand.execute();
- }
- }
- }
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- element = createModelElement();
- // create the view for the execution specification
- if(element != null) {
- createElementView();
- }
- return CommandResult.newOKCommandResult();
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateLocatedConnectionViewCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateLocatedConnectionViewCommand.java
deleted file mode 100644
index 5e180818161..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CreateLocatedConnectionViewCommand.java
+++ /dev/null
@@ -1,239 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.ConnectionViewDescriptor;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.infra.widgets.toolbox.notification.Type;
-import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
-import org.eclipse.papyrus.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-
-/**
- * This class is used to create a connection view which source and target locations are defined. This is useful for connections linked to an
- * Occurrence Specification, which is located at a particular predefined point.
- *
- * @author vhemery
- */
-public class CreateLocatedConnectionViewCommand extends CommonDeferredCreateConnectionViewCommand {
-
- /** Point where source must be drawn */
- private Point sourceLocation;
-
- /** Point where target must be drawn */
- private Point targetLocation;
-
- /**
- * {@inheritDoc}
- */
- public CreateLocatedConnectionViewCommand(TransactionalEditingDomain editingDomain, String semanticHint, IAdaptable sourceViewAdapter, IAdaptable targetViewAdapter, EditPartViewer viewer, PreferencesHint preferencesHint, ConnectionViewDescriptor viewDescriptor, ICommand command) {
- super(editingDomain, semanticHint, sourceViewAdapter, targetViewAdapter, viewer, preferencesHint, viewDescriptor, command);
- }
-
- /**
- * {@inheritDoc}
- */
- public CreateLocatedConnectionViewCommand(TransactionalEditingDomain editingDomain, EObject element, IAdaptable sourceViewAdapter, IAdaptable targetViewAdapter, EditPartViewer viewer, PreferencesHint preferencesHint, ICommand command) {
- super(editingDomain, element, sourceViewAdapter, targetViewAdapter, viewer, preferencesHint, command);
- }
-
- /**
- * Creates a connection view between the source and target.
- *
- * @throws ExecutionException
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info, IGraphicalEditPart sourceEditPart, IGraphicalEditPart targetEditPart) throws ExecutionException {
-
- // If these are null, then the diagram's editparts may not
- // have been refreshed yet.
- Assert.isNotNull(sourceEditPart);
- Assert.isNotNull(targetEditPart);
-
- // use the String semanticHint to create a view
- // modification in order to fix the bug
- CreateConnectionViewRequest createRequest = new CreateConnectionViewRequest(viewDescriptor);
- createConnectionCmd = getCreateCommand(createRequest, sourceEditPart, targetEditPart);
-
- if(createConnectionCmd != null && createConnectionCmd.canExecute()) {
- createConnectionCmd.execute();
- if(element != null) {
- ((View)(createRequest.getConnectionViewDescriptor().getAdapter(View.class))).setElement(element);
- }
- } else {
- // connection can not be created
- handleErrorMessage(createRequest, sourceEditPart, targetEditPart);
- }
- viewer = null;// for garbage collection
- return CommandResult.newOKCommandResult();
- }
-
- /**
- * Method getCreateCommand Gets the command given a request, source and target edit parts. (No semantic element required.)
- * This method is similar to {@link CreateConnectionViewRequest#getCreateCommand(CreateConnectionViewRequest, EditPart, EditPart)}, except it
- * fixes source and target locations
- *
- * @param request
- * creation request
- * @param sourceEditPart
- * source edit part
- * @param targetEditPart
- * target edit part
- * @return <code>Command</code> to create the connection at appropriate locations
- */
- protected Command getCreateCommand(CreateConnectionViewRequest request, EditPart sourceEditPart, EditPart targetEditPart) {
- EditPart newSourceEditPart = sourceEditPart;
- // set appropriated source edit part
- if(sourceEditPart instanceof LifelineEditPart && sourceLocation != null) {
- newSourceEditPart = SequenceUtil.findPartToReconnectTo((LifelineEditPart)sourceEditPart, sourceLocation);
- }
- EditPart newTargetEditPart = targetEditPart;
- // set appropriated target edit part
- if(targetEditPart instanceof LifelineEditPart && targetLocation != null) {
- newTargetEditPart = SequenceUtil.findPartToReconnectTo((LifelineEditPart)targetEditPart, targetLocation);
- }
-
- Assert.isNotNull(request);
- Assert.isNotNull(sourceEditPart);
- Assert.isNotNull(targetEditPart);
- Assert.isNotNull(newSourceEditPart);
- Assert.isNotNull(newTargetEditPart);
-
- request.setSourceEditPart(sourceEditPart);
- request.setTargetEditPart(targetEditPart);
-
- request.setType(RequestConstants.REQ_CONNECTION_START);
- // set source location
- request.setLocation(sourceLocation);
- newSourceEditPart.getCommand(request);
-
- request.setType(RequestConstants.REQ_CONNECTION_END);
- // set target location
- request.setLocation(targetLocation);
- return newTargetEditPart.getCommand(request);
- }
-
- /**
- * Set the locations where source and target points must be drawn.
- *
- * @param sourcePoint
- * point where to draw source or null
- * @param targetPoint
- * point where to draw target or null
- */
- public void setLocations(Point sourcePoint, Point targetPoint) {
- sourceLocation = sourcePoint;
- targetLocation = targetPoint;
- }
-
- /**
- * Handle the failure by reporting an adequate error message
- *
- * @param createRequest
- * the creation request that didn't success
- * @param sourceEditPart
- * the link source edit part
- * @param targetEditPart
- * the target source edit part
- */
- private void handleErrorMessage(CreateConnectionViewRequest createRequest, IGraphicalEditPart sourceEditPart, IGraphicalEditPart targetEditPart) {
- String hint = createRequest.getConnectionViewDescriptor().getSemanticHint();
- boolean isMessage = isMessageHint(hint);
- boolean uphill = sourceLocation != null && targetLocation != null && sourceLocation.y > targetLocation.y;
- if(isMessage && uphill) {
- reportCanNotDropUphillMessage(sourceLocation.y - targetLocation.y, sourceEditPart, targetEditPart);
- } else {
- reportDefaultMessage(sourceEditPart, targetEditPart);
- }
- }
-
- /**
- * Test if hint is for a message creation
- *
- * @param hint
- * hint to test
- * @return true if message hint
- */
- private boolean isMessageHint(String hint) {
- List<String> messageHints = new ArrayList<String>(7);
- String messageHint = ((IHintedType)UMLElementTypes.Message_4003).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4004).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4005).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4006).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4007).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4008).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4009).getSemanticHint();
- messageHints.add(messageHint);
- return messageHints.contains(hint);
- }
-
- /**
- * Report a message telling that the message can not be dropped because it goes uphill.
- *
- * @param delta
- * the missing delta between the two lifelines
- * @param sourceEditPart
- * the source of the message
- * @param targetEditPart
- * the target of the message
- */
- private void reportCanNotDropUphillMessage(int delta, IGraphicalEditPart sourceEditPart, IGraphicalEditPart targetEditPart) {
- EObject source = sourceEditPart.resolveSemanticElement();
- String sourceText = EMFCoreUtil.getQualifiedName(source, true);
- EObject target = targetEditPart.resolveSemanticElement();
- String targetText = EMFCoreUtil.getQualifiedName(target, true);
- String txt = NLS.bind(Messages.DropError_UphillMessageTxt, new Object[]{ sourceText, targetText, delta });
- NotificationBuilder notif = NotificationBuilder.createAsyncPopup(Messages.DropError_UphillMessageTitle, txt);
- notif.setType(Type.WARNING);
- notif.run();
- }
-
- /**
- * Report a message telling that the link drop unexpectedly failed.
- *
- * @param sourceEditPart
- * the source of the link
- * @param targetEditPart
- * the target of the link
- */
- private void reportDefaultMessage(IGraphicalEditPart sourceEditPart, IGraphicalEditPart targetEditPart) {
- EObject source = sourceEditPart.resolveSemanticElement();
- String sourceText = EMFCoreUtil.getQualifiedName(source, true);
- EObject target = targetEditPart.resolveSemanticElement();
- String targetText = EMFCoreUtil.getQualifiedName(target, true);
- String txt = NLS.bind(Messages.DropError_DefaultTxt, sourceText, targetText);
- NotificationBuilder notif = NotificationBuilder.createAsyncPopup(Messages.DropError_DefaultTitle, txt);
- notif.setType(Type.ERROR);
- notif.run();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeObservationCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeObservationCreateCommand.java
deleted file mode 100644
index df47c81eb18..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeObservationCreateCommand.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.TimeObservation;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * Command for creating time observation element
- *
- */
-public class CustomTimeObservationCreateCommand extends EditElementCommand {
- private EClass eClass = null;
-
- private EObject eObject = null;
-
- public CustomTimeObservationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- public static CustomTimeObservationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CustomTimeObservationCreateCommand(req, eObject);
- }
-
- public CustomTimeObservationCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- public boolean canExecute() {
-
- return true;
-
- }
-
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- TimeObservation newElement = UMLFactory.eINSTANCE.createTimeObservation();
-
- // 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_TimeObservation_3020(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- protected void doConfigure(TimeObservation newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomZOrderCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomZOrderCommand.java
deleted file mode 100644
index 3639ea8225b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomZOrderCommand.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * ZOrder command with a custom index
- */
-public class CustomZOrderCommand extends AbstractTransactionalCommand {
-
- protected View view;
-
- protected View containerView;
-
- private int index;
-
- /**
- * @param editingDomain
- * the editing domain through which model changes are made
- * @param label
- * @param view
- */
- public CustomZOrderCommand(TransactionalEditingDomain editingDomain, View view, int index) {
- super(editingDomain, "change ZOrder", getWorkspaceFiles(view));
-
- this.view = view;
- this.index = index;
- containerView = ViewUtil.getContainerView(view);
-
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- ViewUtil.repositionChildAt(containerView, view, index);
- return CommandResult.newOKCommandResult();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/PromptCreateElementAndNodeCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/PromptCreateElementAndNodeCommand.java
deleted file mode 100644
index 52474d3a6d1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/PromptCreateElementAndNodeCommand.java
+++ /dev/null
@@ -1,139 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.command;
-
-import java.util.ArrayList;
-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.draw2d.geometry.Point;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.requests.CreateConnectionRequest;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CreateOrSelectElementCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest.ConnectionViewDescriptor;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.jface.viewers.ILabelProvider;
-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.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.InteractionFragment;
-
-public class PromptCreateElementAndNodeCommand extends
- CreateOrSelectElementCommand {
- private static final List<IElementType> executionTypes = new ArrayList<IElementType>();
- static {
- executionTypes.add(UMLElementTypes.ActionExecutionSpecification_3006);
- executionTypes.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- }
- private final CompoundCommand command;
- private TransactionalEditingDomain editingDomain;
- private ConnectionViewDescriptor descriptor;
- private ShapeNodeEditPart targetEP;
- private EObject target;
- private Point location;
- private InteractionFragment container;
- private CreateConnectionRequest request;
- private EditPart sourceEP;
-
- public PromptCreateElementAndNodeCommand(Command createCommand,
- TransactionalEditingDomain editingDomain,
- ConnectionViewDescriptor descriptor, ShapeNodeEditPart targetEP,
- EObject target, EditPart sourceEP, CreateConnectionRequest request, InteractionFragment container) {
- super(Display.getCurrent().getActiveShell(), executionTypes);
- this.editingDomain = editingDomain;
- this.descriptor = descriptor;
- this.targetEP = targetEP;
- this.target = target;
- this.sourceEP = sourceEP;
- this.request = request;
- this.location = request.getLocation();
- this.container = container;
- command = new CompoundCommand();
- command.add(createCommand);
- }
-
- protected CommandResult doExecuteWithResult(
- IProgressMonitor progressMonitor, IAdaptable info)
- throws ExecutionException {
- sourceEP.eraseSourceFeedback(request);
- targetEP.eraseSourceFeedback(request);
-
- CommandResult cmdResult = super.doExecuteWithResult(progressMonitor,
- info);
- if (!cmdResult.getStatus().isOK()) {
- return cmdResult;
- }
- IHintedType connectionType = (IHintedType) cmdResult.getReturnValue();
-
- CreateElementAndNodeCommand createExecutionSpecificationCommand = new CreateElementAndNodeCommand(
- editingDomain, (ShapeNodeEditPart) targetEP, target,
- connectionType, location);
- createExecutionSpecificationCommand.putCreateElementRequestParameter(
- SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER,
- container);
- command.add(new ICommandProxy(createExecutionSpecificationCommand));
-
- // put the anchor at the top of the figure
- ChangeEdgeTargetCommand changeTargetCommand = new ChangeEdgeTargetCommand(
- editingDomain, createExecutionSpecificationCommand, descriptor,
- "(0.5, 0.0)");
- command.add(new ICommandProxy(changeTargetCommand));
-
- command.execute();
-
- return CommandResult.newOKCommandResult(descriptor);
- }
-
- public boolean canUndo() {
- return command != null && command.canUndo();
- }
-
- protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor,
- IAdaptable info) throws ExecutionException {
- if (command != null) {
- command.redo();
- }
- return super.doRedoWithResult(progressMonitor, info);
- }
-
- protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor,
- IAdaptable info) throws ExecutionException {
- if (command != null) {
- command.undo();
- }
- return super.doUndoWithResult(progressMonitor, info);
- }
-
- protected ILabelProvider getLabelProvider() {
- return new LabelProvider() {
-
- @Override
- public String getText(Object object) {
- if (object instanceof IHintedType) {
- IHintedType elementType = (IHintedType) object;
- switch (UMLVisualIDRegistry.getVisualID(elementType
- .getSemanticHint())) {
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- return Messages.createActionExecutionSpecification2CreationTool_title;
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- return Messages.createBehaviorExecutionSpecification3CreationTool_title;
- }
- }
- return super.getText(object);
- }
- };
-
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/draw2d/routers/MessageRouter.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/draw2d/routers/MessageRouter.java
deleted file mode 100644
index a2c39fc6107..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/draw2d/routers/MessageRouter.java
+++ /dev/null
@@ -1,796 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.draw2d.routers;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.PrecisionPoint;
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Ray;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.common.core.util.StringStatics;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.OrthogonalConnectionAnchor;
-import org.eclipse.gmf.runtime.draw2d.ui.geometry.PointListUtilities;
-import org.eclipse.gmf.runtime.draw2d.ui.internal.routers.ObliqueRouter;
-import org.eclipse.gmf.runtime.draw2d.ui.internal.routers.OrthogonalRouterUtilities;
-import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart.LifelineFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart.MessageCreate;
-
-/**
- * A multi behavior router which enable to draw message.
- * It can behave as an oblique router (with no bendpoint), or as an horizontal router (with no bendpoint),
- * or as a rectilinear router with 2 bendpoints.
- *
- * @author mvelten and vhemery
- */
-@SuppressWarnings({ "restriction", "deprecation" })
-public class MessageRouter extends ObliqueRouter {
-
- private static final int MAX_DELTA = 10;
-
- public static enum RouterKind {
- HORIZONTAL, OBLIQUE, SELF;
-
- public static RouterKind getKind(Connection conn, PointList newLine) {
- if(isSelfConnection(conn)) {
- return SELF;
- }
- if(isHorizontalConnection(conn, newLine)) {
- return HORIZONTAL;
- }
- return OBLIQUE;
- }
-
- private static boolean isHorizontalConnection(Connection conn, PointList newLine) {
- if(!(conn instanceof Message2EditPart.MessageAsync)) {
- return false;
- }
- Point sourcePoint = newLine.getFirstPoint();
- Point targetPoint = newLine.getLastPoint();
- return Math.abs(sourcePoint.y - targetPoint.y) <= MAX_DELTA;
- }
-
- /**
- * It is self if the parent lifeline is the same.
- */
- private static boolean isSelfConnection(Connection conn) {
- if(conn == null || conn.getSourceAnchor() == null || conn.getTargetAnchor() == null) {
- return false;
- }
- IFigure sourceLifeline = conn.getSourceAnchor().getOwner();
- while(sourceLifeline != null && !(sourceLifeline instanceof LifelineFigure)) {
- sourceLifeline = sourceLifeline.getParent();
- }
- IFigure targetLifeline = conn.getTargetAnchor().getOwner();
- while(targetLifeline != null && !(targetLifeline instanceof LifelineFigure)) {
- targetLifeline = targetLifeline.getParent();
- }
-
- return sourceLifeline != null && sourceLifeline.equals(targetLifeline);
- }
- }
-
- @Override
- public void routeLine(Connection conn, int nestedRoutingDepth, PointList newLine) {
- Point sourcePoint, targetPoint;
- switch(RouterKind.getKind(conn, newLine)) {
- case HORIZONTAL:
- originalRectilinearRouteLine(conn, nestedRoutingDepth, newLine);
-
- // force 2 bendpoints on the same Y coordinate
- sourcePoint = newLine.getFirstPoint();
- targetPoint = newLine.getLastPoint();
- targetPoint.y = sourcePoint.y;
- newLine.removeAllPoints();
- newLine.addPoint(sourcePoint);
- newLine.addPoint(targetPoint);
- break;
- case OBLIQUE:
- super.routeLine(conn, nestedRoutingDepth, newLine);
- adjustCreateEndpoint(conn, newLine);
-
- // force 2 bendpoints only
- if(newLine.size() > 2) {
- sourcePoint = newLine.getFirstPoint();
- targetPoint = newLine.getLastPoint();
- newLine.removeAllPoints();
- newLine.addPoint(sourcePoint);
- newLine.addPoint(targetPoint);
- }
- break;
- case SELF:
- // Handle special routing: self connections and intersecting shapes connections
- if(checkSelfRelConnection(conn, newLine)) {
- super.resetEndPointsToEdge(conn, newLine);
- OrthogonalRouterUtilities.transformToOrthogonalPointList(newLine, getOffShapeDirection(getAnchorOffRectangleDirection(newLine.getFirstPoint(), sourceBoundsRelativeToConnection(conn))), getOffShapeDirection(getAnchorOffRectangleDirection(newLine.getLastPoint(), targetBoundsRelativeToConnection(conn))));
- removeRedundantPoints(newLine);
- return;
- }
- break;
- }
- }
-
- protected boolean checkShapesIntersect(Connection conn, PointList newLine) {
- if(conn.getTargetAnchor().getOwner() instanceof AnchorHelper.CombinedFragmentNodeFigure){
- return false;
- }
- return super.checkShapesIntersect(conn, newLine);
- }
-
- protected void adjustCreateEndpoint(Connection conn, PointList newLine) {
- if(conn instanceof MessageCreate){
- if(newLine.size() >= 2){
- Point start = newLine.getFirstPoint();
- Point end = newLine.getLastPoint();
- if(start.y != end.y){
- start.y = end.y;
- newLine.setPoint(start, 0);
- }
- }
- }
- }
-
- @Override
- protected void getSelfRelVertices(Connection conn, PointList newLine) {
-
- rectilinearResetEndPointsToEdge(conn, newLine);
-
- IFigure owner = conn.getSourceAnchor().getOwner();
- Point middle = owner.getBounds().getCenter();
-
- // ensure that the end points are anchored properly to the shape.
- Point ptS2 = newLine.getPoint(0);
- Point ptS1 = conn.getSourceAnchor().getReferencePoint();
- conn.translateToRelative(ptS1);
- Point ptAbsS2 = new Point(ptS2);
- conn.translateToAbsolute(ptAbsS2);
- Point ptEdge = conn.getSourceAnchor().getLocation(ptAbsS2);
- conn.translateToRelative(ptEdge);
- ptS1 = getStraightEdgePoint(ptEdge, ptS1, ptS2);
-
- Point ptE2 = newLine.getPoint(newLine.size() - 1);
- Point ptE1 = conn.getTargetAnchor().getReferencePoint();
- conn.translateToRelative(ptE1);
- Point ptAbsE2 = new Point(ptE2);
- conn.translateToAbsolute(ptAbsE2);
- ptEdge = conn.getTargetAnchor().getLocation(ptAbsE2);
- conn.translateToRelative(ptEdge);
- ptE1 = getStraightEdgePoint(ptEdge, ptE1, ptE2);
-
- newLine.removeAllPoints();
- newLine.addPoint(ptS1);
-
- // insert two points
- Point extraPoint1 = ptS2.getTranslated(ptE2).scale(0.5);
- if(isOnRightHand(conn, owner, middle)){
- extraPoint1.translate(SELFRELSIZEINIT, 0);
- } else {
- extraPoint1.translate(-SELFRELSIZEINIT, 0);
- }
- Point extraPoint2 = extraPoint1.getCopy();
-
- if(isFeedback(conn)) {
- extraPoint1.y = ptS2.y;
- extraPoint2.y = ptE2.y;
- } else {
- extraPoint1.y = ptS1.y;
- extraPoint2.y = ptE1.y;
- }
- newLine.addPoint(extraPoint1);
- newLine.addPoint(extraPoint2);
-
- newLine.addPoint(ptE1);
- }
-
- protected boolean isOnRightHand(Connection conn, IFigure owner, Point middle) {
- boolean right = true;
- if(conn.getTargetAnchor() instanceof AnchorHelper.SideAnchor){
- AnchorHelper.SideAnchor anchor = ( AnchorHelper.SideAnchor) conn.getTargetAnchor();
- right = anchor.isRight();
- }else{
- PointList list = conn.getPoints();
- if(list.getPoint(0).x > list.getPoint(1).x)
- right = false;
- }
- return right;
- }
-
- @Override
- protected boolean checkSelfRelConnection(Connection conn, PointList newLine) {
- if(RouterKind.getKind(conn, newLine).equals(RouterKind.SELF)) {
- getSelfRelVertices(conn, newLine);
- return true;
- }
- return false;
- }
-
- /**
- * All the code after this comment is copied from RectilinearRouter and RouterHelper
- *
- * Copyright (c) 2002, 2010 IBM Corporation and others.
- */
-
- private void originalRectilinearRouteLine(Connection conn, int nestedRoutingDepth, PointList newLine) {
-
- boolean skipNormalization = (routerFlags & ROUTER_FLAG_SKIPNORMALIZATION) != 0;
-
- // if we are reorienting, then just default to the super class implementation and
- // don't try to do rectilinear routing.
- if(isReorienting(conn)) {
- super.routeLine(conn, nestedRoutingDepth, newLine);
- return;
- }
-
- /*
- * Remove and store former anchor points. Anchor points will be re-calculated anyway.
- * However, the old anchor points may be useful if connection didn't have any bend points
- * except the anchor points.
- */
- Point lastStartAnchor = newLine.removePoint(0);
- Point lastEndAnchor = newLine.removePoint(newLine.size() - 1);
-
- /*
- * Check if connection is rectilinear and if not make it rectilinear
- */
- if(!OrthogonalRouterUtilities.isRectilinear(newLine)) {
- OrthogonalRouterUtilities.transformToOrthogonalPointList(newLine, PositionConstants.NONE, PositionConstants.NONE);
- }
-
- removeRedundantPoints(newLine);
-
- /*
- * Remove unnecessary points that are contained within source and/or target shapes
- * as well as insert extra points if all points are within source and/or target shapes
- */
- removePointsInViews(conn, newLine, lastStartAnchor, lastEndAnchor);
-
- Dimension tolerance = new Dimension(3, 0);
- if(!isFeedback(conn))
- tolerance = (Dimension)MapModeUtil.getMapMode(conn).DPtoLP(tolerance);
-
- /*
- * Normalize polyline to eliminate extra segments. (This makes 3 segments collapsing into
- * one, while line segments are moved)
- */
- if(!skipNormalization) {
- if(PointListUtilities.normalizeSegments(newLine, tolerance.width)) {
- /*
- * Normalization can make our polyline not rectilinear. Hence, we need to normalize
- * segments of polyline to straight line tolerance.
- */
- normalizeToStraightLineTolerance(newLine, tolerance.width);
- }
- }
-
- /*
- * Normalization is not touching the end points, hence we'd like to handle this here.
- * If distance between start and end (which are the only points in a polyline) points
- * is too short we'll remove one of the points
- */
- if(newLine.size() == 2) {
- Ray middleSeg = new Ray(newLine.getFirstPoint(), newLine.getLastPoint());
- if(middleSeg.length() <= tolerance.width) {
- newLine.removePoint(0);
- }
- }
-
- /*
- * Calculate connection anchor points and possibly some extra routing work to keep
- * the connection rectilinear if anchor points make it not rectilinear.
- */
- rectilinearResetEndPointsToEdge(conn, newLine);
-
- if(nestedRoutingDepth < 1 && !isValidRectilinearLine(conn, newLine)) {
- routeLine(conn, ++nestedRoutingDepth, newLine);
- }
- }
-
- /**
- * Rectilinear polyline is invalid if:
- * 1. First bend point is within the source
- * 2. Last bend point is within the target
- * 3. First bend point and source anchor are on different sides of the source shape
- * 4. Last bend point and target anchor are on different sides of the target shape
- *
- * @param conn
- * connection
- * @param line
- * rectilinear polyline
- * @return <code>true</code> if the line is valid
- */
- private boolean isValidRectilinearLine(Connection conn, PointList line) {
- if(!(conn.getSourceAnchor().getOwner() instanceof Connection)) {
- Rectangle source = new PrecisionRectangle(FigureUtilities.getAnchorableFigureBounds(conn.getSourceAnchor().getOwner()));
- conn.getSourceAnchor().getOwner().translateToAbsolute(source);
- conn.translateToRelative(source);
- if(source.contains(line.getPoint(1))) {
- return false;
- }
- int firstSegmentOrientation = line.getFirstPoint().x == line.getPoint(1).x ? PositionConstants.VERTICAL : PositionConstants.HORIZONTAL;
- if(getOutisePointOffRectanglePosition(line.getPoint(1), source) != getAnchorLocationBasedOnSegmentOrientation(line.getFirstPoint(), source, firstSegmentOrientation)) {
- return false;
- }
- }
- if(!(conn.getTargetAnchor().getOwner() instanceof Connection)) {
- Rectangle target = new PrecisionRectangle(FigureUtilities.getAnchorableFigureBounds(conn.getTargetAnchor().getOwner()));
- conn.getTargetAnchor().getOwner().translateToAbsolute(target);
- conn.translateToRelative(target);
- if(target.contains(line.getPoint(line.size() - 2))) {
- return false;
- }
- int lastSegmentOrientation = line.getLastPoint().x == line.getPoint(line.size() - 2).x ? PositionConstants.VERTICAL : PositionConstants.HORIZONTAL;
- if(getOutisePointOffRectanglePosition(line.getPoint(line.size() - 2), target) != getAnchorLocationBasedOnSegmentOrientation(line.getLastPoint(), target, lastSegmentOrientation)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Calculates geographic position of a point located outside the given rectangle relative
- * to the rectangle
- *
- * @param p
- * point outside of rectangle
- * @param r
- * the rectangle
- * @return geographic position of the point relative to the recatangle
- */
- private int getOutisePointOffRectanglePosition(Point p, Rectangle r) {
- int position = PositionConstants.NONE;
- if(r.x > p.x) {
- position |= PositionConstants.WEST;
- } else if(r.x + r.width < p.x) {
- position |= PositionConstants.EAST;
- }
- if(r.y > p.y) {
- position |= PositionConstants.NORTH;
- } else if(r.y + r.height < p.y) {
- position |= PositionConstants.SOUTH;
- }
- return position;
- }
-
- /**
- * Given the coordinates of the connection anchor point the shape's rectangle and the
- * orientation of the first rectilinear connection segment that comes out from the anchor
- * point the method detemines on which geographic side of the rectangle the anchor point
- * is located on.
- *
- * @param anchorPoint
- * coordinates of the anchor point
- * @param rectangle
- * the shape's bounding rectangle
- * @param segmentOrientation
- * orinetation of the segment coming out from the anchor point
- * @return geographic position of the anchor point relative to the rectangle
- */
- private int getAnchorLocationBasedOnSegmentOrientation(Point anchorPoint, Rectangle rectangle, int segmentOrientation) {
- if(segmentOrientation == PositionConstants.VERTICAL) {
- if(Math.abs(anchorPoint.y - rectangle.y) < Math.abs(anchorPoint.y - rectangle.y - rectangle.height)) {
- return PositionConstants.NORTH;
- } else {
- return PositionConstants.SOUTH;
- }
- } else if(segmentOrientation == PositionConstants.HORIZONTAL) {
- if(Math.abs(anchorPoint.x - rectangle.x) < Math.abs(anchorPoint.x - rectangle.x - rectangle.width)) {
- return PositionConstants.WEST;
- } else {
- return PositionConstants.EAST;
- }
- }
- return PositionConstants.NONE;
- }
-
- /**
- * Goes through line segments of a polyline and makes strict straight segments
- * from nearly straight segments.
- *
- * @param line
- * polyline
- * @param tolerance
- * tolerance value specifying nearly straight lines.
- */
- private void normalizeToStraightLineTolerance(PointList line, int tolerance) {
- for(int i = 0; i < line.size() - 1; i++) {
- Point pt1 = line.getPoint(i);
- Point pt2 = line.getPoint(i + 1);
- if(Math.abs(pt1.x - pt2.x) < tolerance) {
- line.setPoint(new Point(pt1.x, pt2.y), i + 1);
- } else if(Math.abs(pt1.y - pt2.y) < tolerance) {
- line.setPoint(new Point(pt2.x, pt1.y), i + 1);
- }
- }
- }
-
- /**
- * Removes consecutive points contained within the source shape and removes consecutive
- * points contained within the target shape. If all points have been removed an extra point
- * outside source and target shapes will be added.
- *
- * @param conn
- * connection
- * @param newLine
- * polyline of the connection (routed connection)
- * @param start
- * old start anchor point
- * @param end
- * old end anchor point
- */
- private void removePointsInViews(Connection conn, PointList newLine, Point start, Point end) {
- /*
- * Get the bounds of anchorable figure of the source and target and translate it to
- * connection relative coordinates.
- */
- PrecisionRectangle source = conn.getSourceAnchor().getOwner() != null ? new PrecisionRectangle(FigureUtilities.getAnchorableFigureBounds(conn.getSourceAnchor().getOwner())) : null;
- PrecisionRectangle target = conn.getTargetAnchor().getOwner() != null ? new PrecisionRectangle(FigureUtilities.getAnchorableFigureBounds(conn.getTargetAnchor().getOwner())) : null;
- if(source != null) {
- conn.getSourceAnchor().getOwner().translateToAbsolute(source);
- conn.translateToRelative(source);
- }
- if(target != null) {
- conn.getTargetAnchor().getOwner().translateToAbsolute(target);
- conn.translateToRelative(target);
- }
-
- Point lastRemovedFromSource = null;
- Point lastRemovedFromTarget = null;
-
- /*
- * Starting from the first point of polyline remove points that are contained
- * within the source shape until the first point outside is found.
- * Remember the point that was removed from the source shape last for a possible
- * case of all points removed from polyline.
- */
- if(!(conn.getSourceAnchor().getOwner() instanceof Connection) && newLine.size() != 0 && source.contains(new PrecisionPoint(newLine.getFirstPoint()))) {
- lastRemovedFromSource = newLine.removePoint(0);
- for(int i = 0; i < newLine.size() && source.contains(new PrecisionPoint(newLine.getPoint(i))); i++) {
- lastRemovedFromSource = newLine.removePoint(i--);
- }
- }
-
- /*
- * Starting from the end point of polyline remove points that are contained
- * within the target shape until the first point outside is found.
- * Remember the point that was removed from the target shape last for a possible
- * case of all points removed from polyline.
- */
- if(!(conn.getTargetAnchor().getOwner() instanceof Connection) && newLine.size() != 0 && target.contains(new PrecisionPoint(newLine.getLastPoint()))) {
- lastRemovedFromTarget = newLine.removePoint(newLine.size() - 1);
- for(int i = newLine.size(); i > 0 && target.contains(new PrecisionPoint(newLine.getPoint(i - 1))); i--) {
- lastRemovedFromTarget = newLine.removePoint(i - 1);
- }
- }
-
- /*
- * Handle the special case of all points removed from polyline.
- */
- if(newLine.size() == 0) {
- Dimension tolerance = new Dimension(1, 0);
- if(!isFeedback(conn))
- tolerance = (Dimension)MapModeUtil.getMapMode(conn).DPtoLP(tolerance);
- int toleranceValue = tolerance.width;
- if(lastRemovedFromSource == null) {
- lastRemovedFromSource = start;
- }
- if(lastRemovedFromTarget == null) {
- lastRemovedFromTarget = end;
- }
- /*
- * If last point removed from source and the points removed from target form
- * a vertical or horizontal line we'll find a point located on this line and is
- * outside of source and target shape and insert it in the polyline.
- * The check for vertical and horizontal segment is using tolerance value, because
- * bend point location extracted from RelativeBendpoint can have precision errors due
- * to non-integer weight factors.
- */
- if(Math.abs(lastRemovedFromSource.x - lastRemovedFromTarget.x) < toleranceValue) {
- // Vertical
- if(source.preciseY < target.preciseY) {
- newLine.addPoint(lastRemovedFromSource.x, (source.getBottom().y + target.getTop().y) / 2);
- } else {
- newLine.addPoint(lastRemovedFromSource.x, (source.getTop().y + target.getBottom().y) / 2);
- }
- } else if(Math.abs(lastRemovedFromSource.y - lastRemovedFromTarget.y) < toleranceValue) {
- // Horizontal
- if(source.preciseX < target.preciseX) {
- newLine.addPoint((source.getRight().x + target.getLeft().x) / 2, lastRemovedFromSource.y);
- } else {
- newLine.addPoint((source.getLeft().x + target.getRight().x) / 2, lastRemovedFromSource.y);
- }
- } else if((conn.getSourceAnchor() instanceof BaseSlidableAnchor && StringStatics.BLANK.equals(((BaseSlidableAnchor)conn.getSourceAnchor()).getTerminal()) && (conn.getTargetAnchor() instanceof BaseSlidableAnchor && StringStatics.BLANK.equals(((BaseSlidableAnchor)conn.getTargetAnchor()).getTerminal())))) {
- /*
- * This a special case for old diagrams with rectilinear connections routed by
- * the old router to look good with the new router
- */
- if(lastRemovedFromSource != null && lastRemovedFromTarget != null) {
- newLine.addPoint((lastRemovedFromSource.x + lastRemovedFromTarget.x) / 2, (lastRemovedFromSource.y + lastRemovedFromTarget.y) / 2);
- } else {
- double startX = Math.max(source.preciseX, target.preciseX);
- double endX = Math.min(source.preciseX + source.preciseWidth, target.preciseX + target.preciseWidth);
- double startY = Math.max(source.preciseY, target.preciseY);
- double endY = Math.min(source.preciseY + source.preciseHeight, target.preciseY + target.preciseHeight);
- if(startX < endX) {
- if(source.preciseY < target.preciseY) {
- newLine.addPoint((int)Math.round((startX + endX) / 2.0), (source.getBottom().y + target.getTop().y) / 2);
- } else {
- newLine.addPoint((int)Math.round((startX + endX) / 2.0), (source.getTop().y + target.getBottom().y) / 2);
- }
- } else if(startY < endY) {
- if(source.preciseX < target.preciseX) {
- newLine.addPoint((source.getRight().x + target.getLeft().x) / 2, (int)Math.round((startY + endY) / 2.0));
- } else {
- newLine.addPoint((source.getLeft().x + target.getRight().x) / 2, (int)Math.round((startY + endY) / 2.0));
- }
- }
- }
- }
- }
- }
-
- protected void rectilinearResetEndPointsToEdge(Connection conn, PointList line) {
- if(isReorienting(conn)) {
- /*
- * If the connection doesn't have a shape as a source or target we'll
- * let the oblique router to do the work. The connection doesn't need to
- * be rectilinear at this point. There is no support for making a rectilinear
- * connection for which one of the ends is not connected to anything.
- */
- super.resetEndPointsToEdge(conn, line);
- return;
- }
- PrecisionRectangle source = sourceBoundsRelativeToConnection(conn);
- PrecisionRectangle target = targetBoundsRelativeToConnection(conn);
- int offSourceDirection = PositionConstants.NONE;
- int offTargetDirection = PositionConstants.NONE;
- int sourceAnchorRelativeLocation = PositionConstants.NONE;
- int targetAnchorRelativeLocation = PositionConstants.NONE;
- if(line.size() == 0) {
- /*
- * If there are no valid bend points, we'll use the oblique connection anchor points
- * and just convert the polyline from oblique to rectilinear.
- */
- // Need to add 2 dumb points to ensure that RouterHelper#resetEndPointsToEdge works
- line.addPoint(new Point());
- line.addPoint(new Point());
- super.resetEndPointsToEdge(conn, line);
- sourceAnchorRelativeLocation = getAnchorOffRectangleDirection(line.getFirstPoint(), source);
- targetAnchorRelativeLocation = getAnchorOffRectangleDirection(line.getLastPoint(), target);
- /*
- * We need to find two points offset from the source and target anchors outside the shapes
- * such that when the polyline is converted to rectilinear from oblique we won't have
- * rectilinear line segments alligned with source or target shapes edges.
- */
- Point offStart = line.getFirstPoint();
- Point offEnd = line.getLastPoint();
- Dimension offsetDim = offStart.getDifference(offEnd).scale(0.5);
- offStart.translate(getTranslationValue(sourceAnchorRelativeLocation, Math.abs(offsetDim.width), Math.abs(offsetDim.height)));
- offEnd.translate(getTranslationValue(targetAnchorRelativeLocation, Math.abs(offsetDim.width), Math.abs(offsetDim.height)));
- line.insertPoint(offStart, 1);
- line.insertPoint(offEnd, 2);
- offSourceDirection = getOffShapeDirection(sourceAnchorRelativeLocation);
- offTargetDirection = getOffShapeDirection(targetAnchorRelativeLocation);
- } else {
- Point start = line.getFirstPoint();
- Point end = line.getLastPoint();
- if(conn.getSourceAnchor() instanceof OrthogonalConnectionAnchor) {
- line.insertPoint(OrthogonalRouterUtilities.getOrthogonalLineSegToAnchorLoc(conn, conn.getSourceAnchor(), start).getOrigin(), 0);
- } else {
- /*
- * If anchor is not supporting orthogonal connections we'll use the oblique connection
- * anchors and then convert it to rectilinear.
- */
- PrecisionPoint reference = new PrecisionPoint(start);
- conn.getSourceAnchor().getOwner().translateToAbsolute(reference);
- PrecisionPoint anchorLocation = new PrecisionPoint(conn.getSourceAnchor().getLocation(reference));
- conn.translateToRelative(anchorLocation);
- line.insertPoint(anchorLocation, 0);
- }
- if(conn.getTargetAnchor() instanceof OrthogonalConnectionAnchor) {
- line.addPoint(OrthogonalRouterUtilities.getOrthogonalLineSegToAnchorLoc(conn, conn.getTargetAnchor(), end).getOrigin());
- } else {
- /*
- * If anchor is not supporting orthogonal connections we'll use the oblique connection
- * anchors and then convert it to rectilinear.
- */
- PrecisionPoint reference = new PrecisionPoint(end);
- conn.getSourceAnchor().getOwner().translateToAbsolute(reference);
- PrecisionPoint anchorLocation = new PrecisionPoint(conn.getTargetAnchor().getLocation(reference));
- conn.translateToRelative(anchorLocation);
- line.addPoint(anchorLocation);
- }
- sourceAnchorRelativeLocation = getAnchorOffRectangleDirection(line.getFirstPoint(), source);
- offSourceDirection = getOffShapeDirection(sourceAnchorRelativeLocation);
- targetAnchorRelativeLocation = getAnchorOffRectangleDirection(line.getLastPoint(), target);
- offTargetDirection = getOffShapeDirection(targetAnchorRelativeLocation);
- }
-
- /*
- * Convert the polyline to rectilinear. If the connection is rectilinear already then the
- * connection will remain as it is.
- */
- OrthogonalRouterUtilities.transformToOrthogonalPointList(line, offSourceDirection, offTargetDirection);
- removeRedundantPoints(line);
- }
-
- /**
- * Returns a translation dimension for the anchor point. Translation dimension
- * translates the anchor point off the shape. The off shape direction
- * is specified by the relative to the shape geographic position of the anchor
- *
- * @param position
- * relative to the shape geographic position of the anchor
- * @param xFactorValue
- * translation value along x-axis
- * @param yFactorValue
- * translation value along y-axis
- * @return
- */
- private Dimension getTranslationValue(int position, int xFactorValue, int yFactorValue) {
- Dimension translationDimension = new Dimension();
- if(position == PositionConstants.EAST) {
- translationDimension.width = xFactorValue;
- } else if(position == PositionConstants.SOUTH) {
- translationDimension.height = yFactorValue;
- } else if(position == PositionConstants.WEST) {
- translationDimension.width = -xFactorValue;
- } else if(position == PositionConstants.NORTH) {
- translationDimension.height = -yFactorValue;
- }
- return translationDimension;
- }
-
- /**
- * Target bounding rectangle relative to connection figure coordinates
- *
- * @param conn
- * connection
- * @return <code>PrecisionRectangle</code> target bounds relative to connection's coordinate
- * system
- */
- private PrecisionRectangle targetBoundsRelativeToConnection(Connection conn) {
- PrecisionRectangle target = new PrecisionRectangle(conn.getTargetAnchor().getOwner().getBounds());
- conn.getTargetAnchor().getOwner().translateToAbsolute(target);
- conn.translateToRelative(target);
- return target;
- }
-
- /**
- * Iterates through points of a polyline and does the following:
- * if 3 points lie on the same line the middle point is removed
- *
- * @param line
- * polyline's points
- */
- private boolean removeRedundantPoints(PointList line) {
- int initialNumberOfPoints = line.size();
- if(line.size() > 2) {
- PointList newLine = new PointList(line.size());
- newLine.addPoint(line.removePoint(0));
- while(line.size() >= 2) {
- Point p0 = newLine.getLastPoint();
- Point p1 = line.getPoint(0);
- Point p2 = line.getPoint(1);
- if(p0.x == p1.x && p0.x == p2.x) {
- // Have two vertical segments in a row
- // get rid of the point between
- line.removePoint(0);
- } else if(p0.y == p1.y && p0.y == p2.y) {
- // Have two horizontal segments in a row
- // get rid of the point between
- line.removePoint(0);
- } else {
- newLine.addPoint(line.removePoint(0));
- }
- }
- while(line.size() > 0) {
- newLine.addPoint(line.removePoint(0));
- }
- line.removeAllPoints();
- line.addAll(newLine);
- }
- return line.size() != initialNumberOfPoints;
- }
-
- /**
- * Determines whether the rectilinear line segment coming out of the shape should be
- * horizontal or vertical based on the anchor geographic position relative to the shape
- *
- * @param anchorRelativeLocation
- * @return
- */
- private int getOffShapeDirection(int anchorRelativeLocation) {
- if(anchorRelativeLocation == PositionConstants.EAST || anchorRelativeLocation == PositionConstants.WEST) {
- return PositionConstants.HORIZONTAL;
- } else if(anchorRelativeLocation == PositionConstants.NORTH || anchorRelativeLocation == PositionConstants.SOUTH) {
- return PositionConstants.VERTICAL;
- }
- return PositionConstants.NONE;
- }
-
- /**
- * Source bounding rectangle relative to connection figure coordinates
- *
- * @param conn
- * connection
- * @return <code>PrecisionRectangle</code> source bounds relative to connection's coordinate
- * system
- */
- private PrecisionRectangle sourceBoundsRelativeToConnection(Connection conn) {
- PrecisionRectangle source = new PrecisionRectangle(conn.getSourceAnchor().getOwner().getBounds());
- conn.getSourceAnchor().getOwner().translateToAbsolute(source);
- conn.translateToRelative(source);
- return source;
- }
-
- /**
- * Determines the relative to rectangle geographic location of a point.
- * Example: If shape is closer to the the top edge of the rectangle location
- * would be north.
- * Method used to determine which side of shape's bounding rectangle is closer
- * to connection's anchor point.
- * All geometric quantities must be in the same coordinate system.
- *
- * @param anchorPoint
- * location of the anchor point
- * @param rect
- * bounding rectangle of the shape
- * @return
- */
- private int getAnchorOffRectangleDirection(Point anchorPoint, Rectangle rect) {
- int position = PositionConstants.NORTH;
- int criteriaValue = Math.abs(anchorPoint.y - rect.y);
- int tempCriteria = Math.abs(anchorPoint.y - rect.y - rect.height);
- if(tempCriteria < criteriaValue) {
- criteriaValue = tempCriteria;
- position = PositionConstants.SOUTH;
- }
-
- tempCriteria = Math.abs(anchorPoint.x - rect.x);
- if(tempCriteria < criteriaValue) {
- criteriaValue = tempCriteria;
- position = PositionConstants.WEST;
- }
-
- tempCriteria = Math.abs(anchorPoint.x - rect.x - rect.width);
- if(tempCriteria < criteriaValue) {
- criteriaValue = tempCriteria;
- position = PositionConstants.EAST;
- }
-
- return position;
- }
-
- /**
- * @param conn
- * the <code>Connection</code> that is to be check if it is a feedback
- * connection or not.
- * @return <code>true</code> is it is a feedback connection, <code>false</code> otherwise.
- */
- private static boolean isFeedback(Connection conn) {
- Dimension dim = new Dimension(100, 100);
- Dimension dimCheck = dim.getCopy();
- conn.translateToRelative(dimCheck);
- return dim.equals(dimCheck);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java
deleted file mode 100644
index ba373ecc69b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java
+++ /dev/null
@@ -1,390 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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;
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-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.commands.UnexecutableCommand;
-import org.eclipse.gef.handles.HandleBounds;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;
-import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.FillStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.datatype.GradientData;
-import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineXYLayoutEditPolicy;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-
-public abstract class AbstractExecutionSpecificationEditPart extends ShapeNodeEditPart {
-
- private List executionSpecificationEndParts;
-
- public AbstractExecutionSpecificationEditPart(View view) {
- super(view);
- }
-
- @Override
- public List getChildren() {
- if(executionSpecificationEndParts == null) {
- initExecutionSpecificationEndEditPart();
- }
- return super.getChildren();
- }
-
- protected void initExecutionSpecificationEndEditPart() {
- executionSpecificationEndParts = new ArrayList();
-
- EObject element = this.resolveSemanticElement();
- if(!(element instanceof ExecutionSpecification)) {
- return;
- }
- ExecutionSpecification execution = (ExecutionSpecification)element;
- final ExecutionSpecificationEndEditPart startPart = new ExecutionSpecificationEndEditPart(execution.getStart(), this, new RelativeLocator(getFigure(), PositionConstants.NORTH));
- executionSpecificationEndParts.add(startPart);
-
- final ExecutionSpecificationEndEditPart finishPart = new ExecutionSpecificationEndEditPart(execution.getFinish(), this, new RelativeLocator(getFigure(), PositionConstants.SOUTH));
- executionSpecificationEndParts.add(finishPart);
-
- Diagram diagram = ((View)this.getModel()).getDiagram();
- startPart.rebuildLinks(diagram);
- finishPart.rebuildLinks(diagram);
-
- addChild(startPart, -1);
- addChild(finishPart, -1);
- }
-
- static class FillParentLocator implements Locator {
-
- public void relocate(IFigure target) {
- target.setBounds(target.getParent().getBounds());
- }
- }
-
- /**
- * Overrides to disable the defaultAnchorArea. The edge is now more stuck with the middle of the
- * figure.
- *
- * @generated NOT
- */
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(16, 60) {
-
- /**
- * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#isDefaultAnchorArea(org.eclipse.draw2d.geometry.PrecisionPoint)
- */
- @Override
- protected boolean isDefaultAnchorArea(PrecisionPoint p) {
- return false;
- }
- };
- result.setMinimumSize(new Dimension(getMapMode().DPtoLP(16), getMapMode().DPtoLP(20))); // min height 20
- return result;
- }
-
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableShapeEditPolicy() {
-
- @Override
- protected Command getResizeCommand(ChangeBoundsRequest request) {
- // Bugfix: Avoid resize ES with the child size is little than parent one.
- EditPart host = getHost();
- List<ShapeNodeEditPart> movedChildrenParts = LifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts((ShapeNodeEditPart)host);
- Rectangle r = getInitialFeedbackBounds().getCopy();
- getHostFigure().translateToAbsolute(r);
- r.translate(0, request.getMoveDelta().y);
- r.resize(0, request.getSizeDelta().height);
- for(ShapeNodeEditPart child : movedChildrenParts) {
- IFigure figure = child.getFigure();
- Rectangle rect = figure.getBounds().getCopy();
- if (figure instanceof HandleBounds) {
- rect = ((HandleBounds)figure).getBounds().getCopy();
- }
- figure.translateToAbsolute(rect);
- if(rect.y < r.y || rect.bottom() > r.bottom()) {
- return UnexecutableCommand.INSTANCE;
- }
- }
- return super.getResizeCommand(request);
- }
-
- @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
- moveExecutionSpecificationFeedback(request, AbstractExecutionSpecificationEditPart.this, rect);
- }
- feedback.translateToRelative(rect);
- feedback.setBounds(rect);
- }
- });
- }
-
- @Override
- protected void setLineWidth(int width) {
- if(getPrimaryShape() instanceof NodeFigure) {
- ((NodeFigure)getPrimaryShape()).setLineWidth(width);
- }
- }
-
- protected final void refreshShadow() {
- getPrimaryShape().setShadow(AppearanceHelper.showShadow((View)getModel()));
- }
-
- /**
- * Override to set the transparency to the correct figure
- */
- @Override
- protected void setTransparency(int transp) {
- getPrimaryShape().setTransparency(transp);
- }
-
- /**
- * sets the back ground color of this edit part
- *
- * @param color
- * the new value of the back ground color
- */
- @Override
- protected void setBackgroundColor(Color color) {
- getPrimaryShape().setBackgroundColor(color);
- getPrimaryShape().setIsUsingGradient(false);
- getPrimaryShape().setGradientData(-1, -1, 0);
- }
-
- /**
- * Override to set the gradient data to the correct figure
- */
- @Override
- protected void setGradient(GradientData gradient) {
- IPapyrusNodeFigure fig = getPrimaryShape();
- FillStyle style = (FillStyle)getPrimaryView().getStyle(NotationPackage.Literals.FILL_STYLE);
- if(gradient != null) {
- fig.setIsUsingGradient(true);;
- fig.setGradientData(style.getFillColor(), gradient.getGradientColor1(), gradient.getGradientStyle());
- } else {
- fig.setIsUsingGradient(false);
- }
- }
-
- @Override
- public boolean supportsGradient() {
- 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();
- }
- }
-
- refreshShadow();
- }
-
- public class ExecutionSpecificationRectangleFigure extends PapyrusNodeFigure { //RectangleFigure {
-
- 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;
- }
- }
-
- public abstract ExecutionSpecificationRectangleFigure getPrimaryShape();
-
- //see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=385604
- protected void moveExecutionSpecificationFeedback(ChangeBoundsRequest request, AbstractExecutionSpecificationEditPart movedPart, PrecisionRectangle rect) {
- LifelineEditPart lifelineEP = (LifelineEditPart)movedPart.getParent();
- Rectangle copy = rect.getCopy();
- lifelineEP.getPrimaryShape().translateToRelative(copy);
-
- List<ShapeNodeEditPart> executionSpecificationList = lifelineEP.getChildShapeNodeEditPart();
- 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 {
- parentBar = part;
- }
- }
- }
- }
-
- /**
- * 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().eraseSourceFeedback(request);
- }
- super.eraseTargetFeedback(request);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractMessageEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractMessageEditPart.java
deleted file mode 100644
index 353cd16c66a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractMessageEditPart.java
+++ /dev/null
@@ -1,194 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-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.MessageLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Message;
-
-public abstract class AbstractMessageEditPart extends UMLConnectionNodeEditPart {
-
- private List messageEventParts;
-
- public AbstractMessageEditPart(View view) {
- super(view);
- }
-
- public View findChildByModel(EObject model) {
- List list = getModelChildren();
- if(list != null && list.size() > 0) {
- for(Object o : list) {
- if(!(o instanceof View) )
- continue;
-
- View view = (View) o;
- if(view.getElement() == model){
- return view;
- }
- }
- }
- return null;
- }
-
- @Override
- public List getChildren() {
- if (messageEventParts == null) {
- initMessageEventPart();
- }
- return super.getChildren();
- }
-
- protected void initMessageEventPart() {
- messageEventParts = new ArrayList();
-
- EObject element = this.resolveSemanticElement();
- if (!(element instanceof Message))
- return;
- Message message = (Message) element;
- UMLEdgeFigure edgeFigure = (UMLEdgeFigure) this.getFigure();
- final MessageEndEditPart sendEventPart = new MessageEndEditPart(
- message.getSendEvent(), this, new ConnectionLocator(edgeFigure,
- ConnectionLocator.SOURCE));
- messageEventParts.add(sendEventPart);
-
- final MessageEndEditPart receiveEventPart = new MessageEndEditPart(
- message.getReceiveEvent(), this, new ConnectionLocator(
- edgeFigure, ConnectionLocator.TARGET));
- messageEventParts.add(receiveEventPart);
-
- Diagram diagram = ((View) this.getModel()).getDiagram();
- sendEventPart.rebuildLinks(diagram);
- receiveEventPart.rebuildLinks(diagram);
-
- addChild(sendEventPart, -1);
- addChild(receiveEventPart, -1);
- }
-
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MessageLabelEditPolicy());
- }
-
- @Override
- public EditPart getTargetEditPart(Request request) {
- if(request instanceof CreateUnspecifiedTypeConnectionRequest){
- List types = ((CreateUnspecifiedTypeConnectionRequest) request).getElementTypes();
- if(types.contains(UMLElementTypes.Message_4009) || types.contains(UMLElementTypes.Message_4008)){
- return null;
- }
- }else if(request instanceof ReconnectRequest){
- ConnectionEditPart con = ((ReconnectRequest)request).getConnectionEditPart();
- if(con instanceof Message7EditPart || con instanceof Message6EditPart){
- return null;
- }
- }
- return super.getTargetEditPart(request);
- }
-
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
- Object feature = notification.getFeature();
-
- MessageLabelEditPart labelPart = getMessageLabelEditPart();
- if(labelPart == null)
- return;
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- labelPart.refreshFontColor();
- }else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- labelPart.refreshFont();
- }
- }
-
- public MessageLabelEditPart getMessageLabelEditPart(){
- for(Object c : this.getChildren())
- if(c instanceof MessageLabelEditPart) {
- return (MessageLabelEditPart)c;
- }
- return null;
- }
-
- //public abstract IFigure getPrimaryShape() ;
-
- public void setLineWidth(int width) {
- if(getPrimaryShape() instanceof MessageFigure){
- MessageFigure edge = (MessageFigure)getPrimaryShape();
- edge.setLineWidth(width);
- }
- }
-
- public static class MessageFigure extends UMLEdgeFigure{
- @Override
- public void setLineWidth(int w) {
- super.setLineWidth(w);
- if(getSourceDecoration() instanceof Shape){
- ((Shape)getSourceDecoration()).setLineWidth(w);
- }
- if(getTargetDecoration() instanceof Shape){
- ((Shape)getTargetDecoration()).setLineWidth(w);
- }
- }
-
- @Override
- public void setForegroundColor(Color c) {
- super.setForegroundColor(c);
- if(getSourceDecoration() instanceof Shape){
- ((Shape)getSourceDecoration()).setForegroundColor(c);
- ((Shape)getSourceDecoration()).setBackgroundColor(c);
- }
- if(getTargetDecoration() instanceof Shape){
- ((Shape)getTargetDecoration()).setForegroundColor(c);
- ((Shape)getTargetDecoration()).setBackgroundColor(c);
- }
- }
- }
-
- static abstract class MessageLabelEditPart extends LabelEditPart {
-
- public MessageLabelEditPart(View view) {
- super(view);
- }
-
- protected void handleNotificationEvent(Notification notification) {
- Object feature = notification.getFeature();
- if(NotationPackage.eINSTANCE.getLineStyle_LineColor().equals(feature)) {
- refreshFontColor();
- } else
- super.handleNotificationEvent(notification);
- }
-
- @Override
- public void refreshFontColor() {
- FontStyle style = (FontStyle)((org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart)getParent()).getPrimaryView().getStyle(NotationPackage.Literals.FONT_STYLE);
- if(style != null) {
- setFontColor(DiagramColorRegistry.getInstance().getColor(Integer.valueOf(style.getFontColor())));
- }
- }
-
- public void refreshFont() {
- super.refreshFont();
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationEndEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationEndEditPart.java
deleted file mode 100644
index fac23c92c04..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationEndEditPart.java
+++ /dev/null
@@ -1,595 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-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.draw2d.ColorConstants;
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Locator;
-import org.eclipse.draw2d.RelativeLocator;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PrecisionPoint;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.gef.ConnectionEditPart;
-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.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.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;
-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.gef.ui.figures.SlidableOvalAnchor;
-import org.eclipse.gmf.runtime.gef.ui.internal.figures.CircleFigure;
-import org.eclipse.gmf.runtime.notation.Anchor;
-import org.eclipse.gmf.runtime.notation.DecorationNode;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.IdentityAnchor;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-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.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-public class ExecutionSpecificationEndEditPart extends GraphicalEditPart
- implements INodeEditPart {
-
- private static final String DUMMY_TYPE = "999998";
- private static final int DEFAULT_SIZE = 16;
- private Locator locator;
- private OccurrenceSpecification executionSpecificationEnd;
-
- public ExecutionSpecificationEndEditPart(OccurrenceSpecification occurrenceSpecification, ShapeNodeEditPart parent, RelativeLocator locator ) {
- super(createDummyView(parent, occurrenceSpecification) );
- this.executionSpecificationEnd = occurrenceSpecification;
- this.setParent(parent);
- this.locator = locator;
- addToResource(parent.getNotationView(), this.getNotationView());
- }
-
- private static EObject createDummyView(ShapeNodeEditPart parent,
- EObject model) {
- final Shape node = new ShapeImpl() {
- public boolean eNotificationRequired() {
- return true;
- }
- };
-
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(DUMMY_TYPE);
- node.setElement(model);
-
- return node;
- }
-
- protected void handleNotificationEvent(Notification notification) {
- Object feature = notification.getFeature();
- if (NotationPackage.eINSTANCE.getView_SourceEdges().equals(feature))
- refreshSourceConnections();
- else if (NotationPackage.eINSTANCE.getView_TargetEdges()
- .equals(feature))
- refreshTargetConnections();
- else
- super.handleNotificationEvent(notification);
- }
-
- protected void addNotationalListeners() {
- if (hasNotationView()) {
- addListenerFilter("View", this,(View)getModel());
- }
- }
-
- static class DummyCommand extends org.eclipse.emf.common.command.AbstractCommand {
- public void execute() {
- }
-
- public void redo() {
- }
-
- public void undo() {
- }
-
- protected boolean prepare() {
- return true;
- }
- }
-
- private void addToResource(final View container, final View view) {
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), new DummyCommand() {
- public void execute() {
- ViewUtil.insertChildView(container, view,-1, false);
- }
- },true);
- }
-
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionSpecificationEndSemanticEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ExecutionSpecificationEndGraphicalNodeEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy(){
- protected void addSelectionHandles() { // remove handles
- }
- });
- }
-
- public void rebuildLinks(Diagram diagram) {
- helper.collectViews(diagram);
- EObject semanticModel = this.resolveSemanticElement();
- EAnnotation annotation = executionSpecificationEnd.getEAnnotation("Connections");
- if (annotation != null) {
- for (EObject eo : annotation.getReferences()) {
- View view = helper.findView(eo);
- if (view == null)
- continue; // should not happen
-
- EList edges = view.getSourceEdges();
- for (Object o : edges) {
- if (o instanceof Edge ) {
- if(needRestoreLink((Edge) o)) {
- restoreEdgeTarget((Edge) o);
- break;
- }
- }
- }
- }
- }
- }
-
- private boolean needRestoreLink(Edge e) {
- if(e.getTarget() == null)
- return true;
-
- EObject model = e.getTarget().getElement();
- if(!(model instanceof OccurrenceSpecification))
- return false;
-
- if(model == this.resolveSemanticElement()) {
- System.out.println( ((OccurrenceSpecification) model).getName() );
- if(!this.getNotationView().equals( e.getTarget()))
- return true;
- }
- return false;
- }
-
- private void restoreEdgeTarget(final Edge edge) {
- CommandHelper.executeCommandWithoutHistory(this.getEditingDomain(), new DummyCommand() {
- public void execute() {
- edge.setTarget((View) ExecutionSpecificationEndEditPart.this
- .getModel());
- }
- },true);
- }
-
- static ViewHelper helper = new ViewHelper();
-
- static class ViewHelper {
- Diagram diagram = null;
- Set<View> allViews = new HashSet<View>();
- Map<EObject, View> viewMaps = new HashMap<EObject, View>();
-
- View findView(EObject key) {
- return viewMaps.get(key);
- }
-
- void collectViews(Diagram d) {
- if (diagram != d) { // compare pointer ref
- diagram = d;
- allViews.clear();
- viewMaps.clear();
-
- getAllNestedViews(diagram, allViews);
- for (View v : allViews) {
- if (v instanceof DecorationNode)
- continue;
-
- viewMaps.put(v.getElement(), v);
- }
- }
- }
-
- static private void getAllNestedViews(View view, Set<View> allViews) {
- for (View childView : (List<View>) view.getChildren()) {
- getAllNestedViews(childView, allViews);
- allViews.add(childView);
- }
- }
- }
-
- static class ExecutionSpecificationEndGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
- IFigure executionSpecificationEndFeedback;
-
- @Override
- public void eraseTargetFeedback(Request request) {
- super.eraseSourceFeedback(request);
- if (executionSpecificationEndFeedback != null)
- removeFeedback(executionSpecificationEndFeedback);
- executionSpecificationEndFeedback = null;
- }
-
- protected void showTargetConnectionFeedback(
- DropRequest request) {
- if (executionSpecificationEndFeedback == null) {
- CircleFigure c = new CircleFigure(DEFAULT_SIZE,
- DEFAULT_SIZE);
- c.setForegroundColor(ColorConstants.black);
- ExecutionSpecificationEndEditPart p = (ExecutionSpecificationEndEditPart) getHost();
- IFigure parent = p.getFigure().getParent();
-
-
- Rectangle targetBounds = p.getFigure().getBounds().getCopy();
- p.getFigure().translateToAbsolute(targetBounds);
- //targetBounds.translate(0, DEFAULT_SIZE /2 );
-
- getFeedbackLayer().translateToRelative(targetBounds);
- getFeedbackLayer().translateFromParent(targetBounds);
-
- c.setBounds(targetBounds);
-
- addFeedback(c);
- executionSpecificationEndFeedback = c;
- }
- }
- }
-
- static class ReorientExecutionSpecificationEndCommand extends EditElementCommand{
- private ReorientReferenceRelationshipRequest request;
-
- public ReorientExecutionSpecificationEndCommand(ReorientReferenceRelationshipRequest request) {
- super(request.getLabel(), request.getNewRelationshipEnd(), request);
- this.request = request;
- }
-
- public boolean canExecute() {
- return true;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- // adding new end
- if(request.getNewRelationshipEnd() instanceof OccurrenceSpecification) {
- ExecutionSpecificationEndHelper.addConnectionSourceToExecutionSpecificationEnd((OccurrenceSpecification) request.getNewRelationshipEnd(), request.getReferenceOwner());
- // update uml model reference
- if(request.getReferenceOwner() instanceof Constraint) {
- ((Constraint)request.getReferenceOwner()).getConstrainedElements().add((OccurrenceSpecification) request.getNewRelationshipEnd());
- }else if(request.getReferenceOwner() instanceof Comment) {
- ((Comment) request.getReferenceOwner()).getAnnotatedElements().add( (OccurrenceSpecification) request.getNewRelationshipEnd());
- }
- }
- // removing old end
- if(request.getOldRelationshipEnd() instanceof OccurrenceSpecification) {
- ExecutionSpecificationEndHelper.removeConnectionSourceFromExecutionSpecificationEnd((OccurrenceSpecification) request.getOldRelationshipEnd(), request.getReferenceOwner());
- // update uml model reference
- if(request.getReferenceOwner() instanceof Constraint) {
- ((Constraint)request.getReferenceOwner()).getConstrainedElements().remove((OccurrenceSpecification) request.getOldRelationshipEnd());
- }else if(request.getReferenceOwner() instanceof Comment) {
- ((Comment) request.getReferenceOwner()).getAnnotatedElements().remove( (OccurrenceSpecification) request.getOldRelationshipEnd());
- }
- }
- return CommandResult.newOKCommandResult();
- }
- }
-
- static class ExecutionSpecificationEndSemanticEditPolicy extends SemanticEditPolicy{
-
- 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 ) ) ;
- }
- Command cmd = super.getSemanticCommand(request);
- return cmd;
- }
-
- protected Command getStartCreateRelationshipCommand(
- CreateRelationshipRequest req) {
- if (UMLElementTypes.ConstraintConstrainedElement_4011 == req
- .getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommandEx(
- req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- protected Command getCompleteCreateRelationshipCommand(
- CreateRelationshipRequest req) {
- if (UMLElementTypes.ConstraintConstrainedElement_4011 == req
- .getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommandEx(
- req, req.getSource(), req.getTarget()));
- }else if(UMLElementTypes.CommentAnnotatedElement_4010 == req
- .getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommandEx(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);
- }
- }
-
- public static class ExecutionSpecificationEndHelper{
- public static void removeConnectionSourceFromExecutionSpecificationEnd(OccurrenceSpecification executionOccurrence , EObject connectionSource) {
- EAnnotation annotation = executionOccurrence
- .getEAnnotation("Connections");
- if (annotation != null) {
- annotation.getReferences().remove( connectionSource);
- }
- }
-
- public static void addConnectionSourceToExecutionSpecificationEnd(OccurrenceSpecification executionOccurrence,EObject connectionSource) {
- EAnnotation annotation = executionOccurrence
- .getEAnnotation("Connections");
- if (annotation == null) {
- annotation = EcoreFactory.eINSTANCE.createEAnnotation();
- annotation.setSource("Connections"); //$NON-NLS-1$
- executionOccurrence.getEAnnotations().add(annotation);
- }
- if( !annotation.getReferences().contains( connectionSource) )
- annotation.getReferences().add(connectionSource);
- }
- }
-
- static class CommentAnnotatedElementCreateCommandEx extends CommentAnnotatedElementCreateCommand{
-
- public CommentAnnotatedElementCreateCommandEx(
- CreateRelationshipRequest request, EObject source,
- EObject target) {
- super(request, source, target);
- }
-
- 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;
- }
-
- protected IFigure createFigure() {
- IFigure fig = new ExecutionSpecificationEndFigure();
- fig.setForegroundColor(ColorConstants.black);
-// Rectangle b = fig.getBounds();
-// final ExecutionOccurrenceSpecification model = (ExecutionOccurrenceSpecification) this.resolveSemanticElement();
-// Label tooltip = new Label();
-// tooltip.setText(model.getName());
-// fig.setToolTip(tooltip);
-
- fig.setOpaque(false);
- return fig;
- }
-
- public boolean hasNotationView() {
- return true;
- }
-
- public ConnectionAnchor getSourceConnectionAnchor(
- ConnectionEditPart connection) {
- return null;
- }
-
- public ConnectionAnchor getTargetConnectionAnchor(
- ConnectionEditPart connEditPart) {
- final ConnectionNodeEditPart connection = (ConnectionNodeEditPart) connEditPart;
- String t = ""; //$NON-NLS-1$
- try {
- t = (String) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl() {
-
- public void run() {
- Anchor a = ((Edge) connection.getModel())
- .getTargetAnchor();
- if (a instanceof IdentityAnchor)
- setResult(((IdentityAnchor) a).getId());
- else
- setResult(""); //$NON-NLS-1$
- }
- });
- } catch (InterruptedException e) {
- Trace.catching(DiagramUIPlugin.getInstance(),
- DiagramUIDebugOptions.EXCEPTIONS_CATCHING, getClass(),
- "getTargetConnectionAnchor", e); //$NON-NLS-1$
- Log.error(DiagramUIPlugin.getInstance(),
- DiagramUIStatusCodes.IGNORED_EXCEPTION_WARNING,
- "getTargetConnectionAnchor", e); //$NON-NLS-1$
- }
- IAnchorableFigure fig = ((IAnchorableFigure) getFigure());
- ConnectionAnchor a = fig.getConnectionAnchor(t);
- return a;
- }
-
- public ConnectionAnchor getTargetConnectionAnchor(Request request) {
- Point center = getFigure().getBounds().getCenter();
- getFigure().translateToAbsolute(center);
- Point pt = ((DropRequest) request).getLocation() == null ? center
- : new Point(((DropRequest) request).getLocation());
- if (request instanceof CreateRequest) {
- getFigure().translateToRelative(pt);
- }
- ConnectionAnchor a = ((IAnchorableFigure) getFigure())
- .getTargetConnectionAnchorAt(pt);
- return a;
- }
-
- public ConnectionAnchor getSourceConnectionAnchor(Request request) {
- return null;
- }
-
- public boolean canAttachNote() {
- return true;
- }
-
- public String mapConnectionAnchorToTerminal(ConnectionAnchor c) {
- return ((IAnchorableFigure) getFigure()).getConnectionAnchorTerminal(c);
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart#mapTerminalToConnectionAnchor(String)
- */
- public ConnectionAnchor mapTerminalToConnectionAnchor(String terminal) {
- return ((IAnchorableFigure) getFigure()).getConnectionAnchor(terminal);
- }
-
- protected List getModelSourceConnections() {
- return ViewUtil
- .getSourceConnectionsConnectingVisibleViews((View) getModel());
- }
-
- protected List getModelTargetConnections() {
- List list = ViewUtil
- .getTargetConnectionsConnectingVisibleViews((View) getModel());
- return list;
- }
-
- @Override
- public EditPart getTargetEditPart(Request request) {
- if(request instanceof CreateUnspecifiedTypeConnectionRequest){
- List types = ((CreateUnspecifiedTypeConnectionRequest) request).getElementTypes();
- if(types.contains(UMLElementTypes.CommentAnnotatedElement_4010) || types.contains(UMLElementTypes.ConstraintConstrainedElement_4011)){
- return super.getTargetEditPart(request);
- }
- }else if(request instanceof ReconnectRequest){
- ConnectionEditPart con = ((ReconnectRequest)request).getConnectionEditPart();
- if(con instanceof CommentAnnotatedElementEditPart || con instanceof ConstraintConstrainedElementEditPart){
- return super.getTargetEditPart(request);
- }
- }
- return null;
- }
-
- static class ExecutionSpecificationEndAnchor extends SlidableOvalAnchor {
-
- public ExecutionSpecificationEndAnchor(CircleFigure circleFigure, PrecisionPoint p) {
- super(circleFigure, p);
- }
-
- public ExecutionSpecificationEndAnchor(CircleFigure circleFigure) {
- super(circleFigure);
- }
-
- public Point getLocation(Point reference) {
- return getBox().getCenter();
- }
- }
-
- class ExecutionSpecificationEndFigure extends CircleFigure {
- ExecutionSpecificationEndFigure() {
- super(DEFAULT_SIZE, DEFAULT_SIZE);
- }
-
- @Override
- protected void paintFigure(Graphics g) {
- Rectangle r = Rectangle.SINGLETON;
- r.setBounds(getBounds());
- r.width--;
- r.height--;
- // Hide
- //g.drawOval(r);
- }
-
- protected ConnectionAnchor createAnchor(PrecisionPoint p) {
- if (p == null)
- return createDefaultAnchor();
- return new ExecutionSpecificationEndAnchor(this, p);
- }
-
- protected ConnectionAnchor createDefaultAnchor() {
- return new ExecutionSpecificationEndAnchor(this);
- }
-
- public ConnectionAnchor getTargetConnectionAnchorAt(Point p) {
- try {
- return super.getTargetConnectionAnchorAt(p);
- } catch (Exception e) {
- return null;
- }
- };
-
- @Override
- public void validate() {
- locator.relocate(this); //place figure at north or south, ignore layout manager
- super.validate();
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionFragmentEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionFragmentEditPart.java
deleted file mode 100644
index faa739a2ccb..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionFragmentEditPart.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.PartDecomposition;
-import org.eclipse.uml2.uml.UMLPackage;
-
-public abstract class InteractionFragmentEditPart extends ShapeNodeEditPart {
-
- public InteractionFragmentEditPart(View view) {
- super(view);
- }
-
- /**
- * Resize the InteractionFragmentFigure when the covered lifelines are selected in the
- * properties view.
- */
- public void resizeInteractionFragmentFigure() {
- Object obj = getModel();
- if(obj instanceof Shape) {
- // we get the element linked to this editpart
- EObject element = ((Shape)obj).getElement();
-
- if(element instanceof InteractionFragment) {
- // we get the list of the covered lifelinnes by the InteractionUse
- List<Lifeline> lifelineCoveredList = ((InteractionFragment)element).getCovereds();
-
- if(lifelineCoveredList != null && getParent() != null) {
- // we get the interactionCompartimentEditPart to have access to all lifelines
- // EditParts
- List<EditPart> childrenEditPart = getParent().getChildren();
- if(childrenEditPart != null) {
- // The max value guarantee that the first figure will set the minX value
- int minX = Integer.MAX_VALUE;
- int maxX = -Integer.MAX_VALUE;
- int maxR = -Integer.MAX_VALUE;
-
- for(EditPart childEditPart : childrenEditPart) {
- // we check all the EditParts to select only the lifelineEditParts
- if(childEditPart instanceof LifelineEditPart) {
- Object childModel = childEditPart.getModel();
- if(childModel instanceof Shape) {
- // we get the object Lifeline linked the selected
- // lifelineEditPart
- EObject childElement = ((Shape)childModel).getElement();
- if(childElement instanceof Lifeline) {
- Lifeline lifeline = (Lifeline)childElement;
- for(Lifeline lfn : lifelineCoveredList) {
- // we check if the lifeLine in the intreactionUse's
- // parent Interaction is a covered Lifeline
- if(lifeline.equals(lfn)) {
- LifelineEditPart liflelineEditPart = (LifelineEditPart)childEditPart;
- if(liflelineEditPart.getFigure().getBounds().x > maxX) {
- maxX = liflelineEditPart.getFigure().getBounds().x;
- // the maxR will represent the futur value of
- // the rectangle right value.
- maxR = liflelineEditPart.getFigure().getBounds().right();
-
- }
- if(liflelineEditPart.getFigure().getBounds().x < minX) {
- // the min value will represent the rectangle x
- // value.
- minX = liflelineEditPart.getFigure().getBounds().x;
- }
- }
- }
- }
- }
- }
- }
-
- if(minX != Integer.MAX_VALUE || maxR != -Integer.MAX_VALUE) {
- // after this loop we have the coordinate of two lifeline figure ,
- // even if we have more than two covered Lifelne we choose the
- // extremities.
- getNewSize(minX, maxR);
- }
- }
- }
- }
- }
- }
-
- /**
- * resize the interactinUse figure
- *
- * @param min
- * the min x position of a covered lifline
- * @param max
- * the max x position of a coverd lifeline
- *
- */
- private void getNewSize(int min, int max) {
- int h = getFigure().getBounds().height;
- int y = getFigure().getBounds().y;
-
- Dimension size = new Dimension(max - min, h);
-
- Point loc = new Point(min, y);
-
- ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
- }
-
- /**
- * Update covered lifelines of a Interaction fragment
- *
- * @param newBounds
- */
- public void updateCoveredLifelines(Bounds newBounds) {
- Rectangle newBound = new Rectangle(newBounds.getX(), newBounds.getY(), newBounds.getWidth(), newBounds.getHeight());
- InteractionFragment combinedFragment = (InteractionFragment)resolveSemanticElement();
- EList<Lifeline> coveredLifelines = combinedFragment.getCovereds();
-
- List<Lifeline> coveredLifelinesToAdd = new ArrayList<Lifeline>();
- List<Lifeline> coveredLifelinesToRemove = new ArrayList<Lifeline>();
- EditPart interactionCompartment = getInteractionCompartment();
- if(interactionCompartment != null) {
- this.getFigure().translateToAbsolute(newBound);
- for(Object child : interactionCompartment.getChildren()) {
- if(child instanceof LifelineEditPart) {
- LifelineEditPart lifelineEditPart = (LifelineEditPart)child;
- updateCoveredLifelines(lifelineEditPart, newBound, coveredLifelinesToAdd, coveredLifelinesToRemove, coveredLifelines);
- }
- }
- }
- if(!coveredLifelinesToAdd.isEmpty()) {
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), AddCommand.create(getEditingDomain(), combinedFragment, UMLPackage.eINSTANCE.getInteractionFragment_Covered(), coveredLifelinesToAdd), true);
- }
- if(!coveredLifelinesToRemove.isEmpty()) {
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), RemoveCommand.create(getEditingDomain(), combinedFragment, UMLPackage.eINSTANCE.getInteractionFragment_Covered(), coveredLifelinesToRemove), true);
- }
-
- }
-
- // check lifelines in PartDecomposition, see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=364813
- private void updateCoveredLifelines(LifelineEditPart lifelineEditPart, Rectangle newBound, List<Lifeline> coveredLifelinesToAdd, List<Lifeline> coveredLifelinesToRemove, EList<Lifeline> coveredLifelines) {
- Lifeline lifeline = (Lifeline)lifelineEditPart.resolveSemanticElement();
-
- LifelineDotLineCustomFigure dotLineFigure = lifelineEditPart.getPrimaryShape().getFigureLifelineDotLineFigure();
- Rectangle dotLineBounds = dotLineFigure.getBounds().getCopy();
- Rectangle centralLineBounds = new Rectangle(dotLineBounds.x() + dotLineBounds.width() / 2, dotLineBounds.y(), 1, dotLineBounds.height());
- dotLineFigure.translateToAbsolute(centralLineBounds);
- if(newBound.intersects(centralLineBounds)) {
- if(!coveredLifelines.contains(lifeline)) {
- coveredLifelinesToAdd.add(lifeline);
- }
- } else if(coveredLifelines.contains(lifeline)) {
- coveredLifelinesToRemove.add(lifeline);
- }
-
- PartDecomposition partDecomposition = lifeline.getDecomposedAs();
- if(partDecomposition != null) {
- List subLifelines = lifelineEditPart.getChildren();
- for(Object child : subLifelines) {
- if(child instanceof LifelineEditPart) {
- updateCoveredLifelines((LifelineEditPart)child, newBound, coveredLifelinesToAdd, coveredLifelinesToRemove, coveredLifelines);
- }
- }
- }
- }
-
- /**
- * Find parent editpart of lifeline
- * @return EditPart
- */
- public EditPart getInteractionCompartment() {
- EditPart editPart = getParent();
- while (editPart != null
- && !(editPart instanceof InteractionInteractionCompartmentEditPart)) {
- editPart = editPart.getParent();
- }
- return editPart;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCreationEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCreationEditPolicy.java
deleted file mode 100644
index 54959d4084b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCreationEditPolicy.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.Set;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.commands.Command;
-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.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OperandBoundsComputeHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.InteractionFragment;
-
-/**
- * This creation policy is used to move covered interaction fragments into the interaction operand
- * when creating a new combined fragment.
- *
- * @author mvelten
- *
- */
-public class CombinedFragmentCreationEditPolicy extends CreationEditPolicy {
-
- @SuppressWarnings("unchecked")
- @Override
- protected Command getCreateElementAndViewCommand(CreateViewAndElementRequest request) {
-
- Command createElementAndViewCmd = super.getCreateElementAndViewCommand(request);
-
- if(isDerivedCombinedFragment(request.getViewAndElementDescriptor().getSemanticHint())) {
-
- Rectangle selectionRect = getSelectionRectangle(request);
-
- Set<InteractionFragment> coveredInteractionFragments = SequenceUtil.getCoveredInteractionFragments(selectionRect, getHost(), null);
-
- request.getExtendedData().put(SequenceRequestConstant.COVERED_INTERACTIONFRAGMENTS, coveredInteractionFragments);
-
- // Add updating bounds command for Combined fragment createment
- String hint = request.getViewAndElementDescriptor().getSemanticHint();
- if(OperandBoundsComputeHelper.isDerivedCombinedFragment(hint)){
- if (createElementAndViewCmd instanceof ICommandProxy) {
- ICommandProxy commandProxy = (ICommandProxy) createElementAndViewCmd;
- ICommand realCmd = commandProxy.getICommand();
- if (realCmd instanceof CompositeCommand) {
- ICommand createUpdateBoundsCmd = OperandBoundsComputeHelper.createUpdateCFAndIOBoundsForCFCreationCommand(this.getHost(),request);
- if (createUpdateBoundsCmd != null)
- ((CompositeCommand) realCmd)
- .add(createUpdateBoundsCmd);
- }
- }
- }
- }
- return createElementAndViewCmd;
- }
-
- @Override
- protected Command getCreateCommand(CreateViewRequest request) {
- Command createViewCmd = super.getCreateCommand(request);
- if (createViewCmd instanceof ICommandProxy) {
- ICommandProxy commandProxy = (ICommandProxy) createViewCmd;
- CompositeCommand compositeCommand = null;
- ICommand realCmd = commandProxy.getICommand();
- if (realCmd instanceof CompositeCommand) {
- compositeCommand = (CompositeCommand) realCmd;
- } else {
- compositeCommand = new CompositeCommand(commandProxy.getLabel());
- compositeCommand.add(realCmd);
- realCmd = compositeCommand;
- }
- for (ViewDescriptor viewDescriptor : request.getViewDescriptors()) {
- String hint = viewDescriptor.getSemanticHint();
- if(isDerivedCombinedFragment(hint)) {
- // Add updating bounds command for Combined fragment createment
- if(OperandBoundsComputeHelper.isDerivedCombinedFragment(hint)){
- ICommand createUpdateBoundsCmd = OperandBoundsComputeHelper.createUpdateCFAndIOBoundsForCFCreationCommand(this.getHost(), request);
- if (createUpdateBoundsCmd != null)
- ((CompositeCommand) realCmd)
- .add(createUpdateBoundsCmd);
- }
- }
- }
-
- createViewCmd = new ICommandProxy(compositeCommand.reduce());
- }
- return createViewCmd;
- }
-
- /**
- * Retrieve the selection rectangle associated with the request.
- *
- * @param request
- * the request
- * @return
- */
- private Rectangle getSelectionRectangle(CreateViewAndElementRequest request) {
- Rectangle selectionRect = new Rectangle();
-
- Point location = request.getLocation();
- Dimension size = request.getSize();
-
- if(location != null) {
- selectionRect.x = location.x;
- selectionRect.y = location.y;
- } else {
- // default values (should not be triggered)
- selectionRect.x = 100;
- selectionRect.y = 100;
- }
-
- if(size != null) {
- selectionRect.height = size.height;
- selectionRect.width = size.width;
- } else {
- // default values hardcoded...
- selectionRect.height = 61;
- selectionRect.width = 112;
- }
-
- return selectionRect;
- }
-
- /**
- * Check if it is a combined fragment or something similar which needs this policy to move ift in the correct container.
- *
- * @param hint
- * the semantic hint
- * @return
- */
- private static boolean isDerivedCombinedFragment(String hint) {
- if(((IHintedType)UMLElementTypes.InteractionOperand_3005).getSemanticHint().equals(hint)) {
- return true;
- }
- if(((IHintedType)UMLElementTypes.CombinedFragment_3004).getSemanticHint().equals(hint)) {
- return true;
- }
- if(((IHintedType)UMLElementTypes.ConsiderIgnoreFragment_3007).getSemanticHint().equals(hint)) {
- return true;
- }
- return false;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemComponentEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemComponentEditPolicy.java
deleted file mode 100644
index 6f533edf68e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemComponentEditPolicy.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ComponentEditPolicy;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-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;
-
-public class CombinedFragmentItemComponentEditPolicy extends ComponentEditPolicy {
-
- /**
- * Delete Combined fragment and child from the view. Also delete message if user wants. {@inheritDoc}
- */
- @Override
- protected Command createDeleteViewCommand(GroupRequest deleteRequest) {
-
- if(getEditingDomain() != null) {
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
-
- CommandProxy deleteView = new CommandProxy(super.createDeleteViewCommand(deleteRequest));
- if(getEObject() instanceof CombinedFragment) {
- CombinedFragment cf = (CombinedFragment)getEObject();
- CombinedFragmentEditPart host = (CombinedFragmentEditPart)getHost();
-
- ICommand prompt = CombinedFragmentDeleteHelper.createDeleteViewCommand(cf, getEditingDomain(), host);
- cmd.add(prompt);
- }
- cmd.add(deleteView);
- return new ICommandProxy(cmd.reduce());
- }
-
- return null;
- }
-
-
- /**
- * Copy from superclass as visibility is private
- *
- * @return the editing domain
- */
- private TransactionalEditingDomain getEditingDomain() {
- if(getHost() instanceof IGraphicalEditPart) {
- return ((IGraphicalEditPart)getHost()).getEditingDomain();
- } else if(getHost() instanceof IEditingDomainProvider) {
- Object domain = ((IEditingDomainProvider)getHost()).getEditingDomain();
- if(domain instanceof TransactionalEditingDomain) {
- return (TransactionalEditingDomain)domain;
- }
- }
- return null;
- }
-
- /**
- * Get the EObject of the host
- *
- * @return the EObject or null
- */
- private EObject getEObject() {
- if(getHost() instanceof GraphicalEditPart) {
- return ((GraphicalEditPart)getHost()).resolveSemanticElement();
- }
- return null;
- }
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CreationOnMessageEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CreationOnMessageEditPolicy.java
deleted file mode 100644
index 9f32b299a1c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CreationOnMessageEditPolicy.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-
-public class CreationOnMessageEditPolicy extends CreationEditPolicy {
-
- /**
- * Get the command after updating the request with appropriate occurrences
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy#getCreateElementAndViewCommand(org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest)
- *
- * @param request
- * the request
- * @return command or null
- */
- @Override
- protected Command getCreateElementAndViewCommand(CreateViewAndElementRequest request) {
- Map<String, Object> extendedData = request.getExtendedData();
-
- // record the nearest event if necessary
- String requestHint = request.getViewAndElementDescriptor().getSemanticHint();
- if(isCreatedOnOccurrenceSpecification(requestHint)) {
- EditPart hostPart = getHost();
- if(hostPart instanceof ConnectionNodeEditPart) {
- LifelineEditPart sourceLifeline = SequenceUtil.getParentLifelinePart(((ConnectionNodeEditPart)hostPart).getSource());
- LifelineEditPart targetLifeline = SequenceUtil.getParentLifelinePart(((ConnectionNodeEditPart)hostPart).getTarget());
- Entry<Point, List<OccurrenceSpecification>> eventAndLocation = null;
- if(sourceLifeline != null) {
- eventAndLocation = SequenceUtil.findNearestEvent(request.getLocation(), sourceLifeline);
- }
- if(targetLifeline != null && eventAndLocation == null) {
- eventAndLocation = SequenceUtil.findNearestEvent(request.getLocation(), targetLifeline);
- }
- // find an event near enough to create the constraint or observation
- List<OccurrenceSpecification> events = Collections.emptyList();
- Point location = null;
- if(eventAndLocation != null) {
- location = eventAndLocation.getKey();
- events = eventAndLocation.getValue();
- }
- if(extendedData.containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2)) {
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2, events);
- } else {
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
- }
- if(extendedData.containsKey(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2)) {
- extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2, location);
- } else {
- extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION, location);
- }
- }
- }
- return super.getCreateElementAndViewCommand(request);
- }
-
- /**
- * Return true if creation must be performed on an occurrence specification
- *
- * @param requestHint
- * the hint of object to create
- * @return true if creation on an occurrence specification
- */
- private boolean isCreatedOnOccurrenceSpecification(String requestHint) {
- return isTimeHint(requestHint) || isDurationHint(requestHint);
- }
-
- /**
- * Return true if hint is for creating a duration observation/constraint
- *
- * @param requestHint
- * the hint of object to create
- * @return true if correct hint
- */
- private boolean isDurationHint(String requestHint) {
- String durCstOnLifelineHint = ((IHintedType)UMLElementTypes.DurationConstraint_3021).getSemanticHint();
- String durCstOnMessage = ((IHintedType)UMLElementTypes.DurationConstraint_3023).getSemanticHint();
- String durObsOnMessage = ((IHintedType)UMLElementTypes.DurationObservation_3024).getSemanticHint();
- return durCstOnLifelineHint.equals(requestHint) || durCstOnMessage.equals(requestHint) || durObsOnMessage.equals(requestHint);
- }
-
- /**
- * Return true if hint is for creating a time observation/constraint
- *
- * @param requestHint
- * the hint of object to create
- * @return true if correct hint
- */
- private boolean isTimeHint(String requestHint) {
- String timeConstraintHint = ((IHintedType)UMLElementTypes.TimeConstraint_3019).getSemanticHint();
- String timeObservationHint = ((IHintedType)UMLElementTypes.TimeObservation_3020).getSemanticHint();
- return timeConstraintHint.equals(requestHint) || timeObservationHint.equals(requestHint);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomConnectionHandleEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomConnectionHandleEditPolicy.java
deleted file mode 100644
index 552dfa53495..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomConnectionHandleEditPolicy.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.requests.TargetRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConnectionHandleEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.handles.ConnectionHandle;
-import org.eclipse.gmf.runtime.diagram.ui.internal.tools.ConnectionHandleTool;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-
-public final class CustomConnectionHandleEditPolicy extends
- ConnectionHandleEditPolicy {
- protected List getHandleFigures() {
- List list = new ArrayList(2);
-
- String tooltip;
- tooltip = buildTooltip(ConnectionHandle.HandleDirection.INCOMING);
- if (tooltip != null) {
- list.add(new ConnectionHandle((IGraphicalEditPart) getHost(),
- ConnectionHandle.HandleDirection.INCOMING, tooltip));
- }
-
- tooltip = buildTooltip(ConnectionHandle.HandleDirection.OUTGOING);
- if (tooltip != null) {
- ConnectionHandle connectionHandle = new ConnectionHandle(
- (IGraphicalEditPart) getHost(),
- ConnectionHandle.HandleDirection.OUTGOING, tooltip);
- connectionHandle.setDragTracker(new ConnectionHandleTool(
- connectionHandle) {
- protected String getCommandName() {
- if (isInState(STATE_CONNECTION_STARTED
- | STATE_ACCESSIBLE_DRAG_IN_PROGRESS))
- return SequenceUtil.OBSERVATION_LINK_REQUEST_END;
- else
- return SequenceUtil.OBSERVATION_LINK_REQUEST_START;
- }
-
- // see also UMLPaletteFactory.createObservationLinkCreationTool()
- protected boolean updateTargetUnderMouse() {
- if (!isTargetLocked()) {
- EditPart editPart = getCurrentViewer()
- .findObjectAtExcluding(getLocation(), getExclusionSet(),
- getTargetingConditional());
- if (editPart != null)
- editPart = editPart.getTargetEditPart(getTargetRequest());
- // fix observation link moving over ExecutionSpecificationEditPart
- if (getTargetRequest() instanceof TargetRequest)
- ((TargetRequest) getTargetRequest()).setTargetEditPart(editPart);
- boolean changed = getTargetEditPart() != editPart;
- setTargetEditPart(editPart);
- return changed;
- } else
- return false;
- }
- });
- list.add(connectionHandle);
- }
-
- return list;
- }
-} \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java
deleted file mode 100644
index 1d4ca1766c1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java
+++ /dev/null
@@ -1,1188 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-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.ConnectionNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.commands.wrappers.CommandProxyWithResult;
-import org.eclipse.papyrus.uml.diagram.common.commands.DeferredCreateCommand;
-import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.DurationObservationHelper;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CreateLocatedConnectionViewCommand;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart;
-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.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceLinkMappingHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.GeneralOrdering;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.IntervalConstraint;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.PackageableElement;
-import org.eclipse.uml2.uml.StateInvariant;
-import org.eclipse.uml2.uml.TimeObservation;
-
-/**
- * A policy to support dNd from the Model Explorer in the sequence diagram
- *
- */
-public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPolicy {
- public static final String LIFELINE_MISSING = "There is no representation of lifeline {0}";
-
- public static final String DIALOG_TITLE = "Element missing";
-
- public CustomDiagramDragDropEditPolicy() {
- super(SequenceLinkMappingHelper.getInstance());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Set<Integer> getDroppableElementVisualId() {
- Set<Integer> elementsVisualId = new HashSet<Integer>();
- elementsVisualId.add(LifelineEditPart.VISUAL_ID);
- elementsVisualId.add(ActionExecutionSpecificationEditPart.VISUAL_ID);
- elementsVisualId.add(BehaviorExecutionSpecificationEditPart.VISUAL_ID);
-
- elementsVisualId.add(InteractionUseEditPart.VISUAL_ID);
- elementsVisualId.add(InteractionEditPart.VISUAL_ID);
- elementsVisualId.add(InteractionOperandEditPart.VISUAL_ID);
-
- elementsVisualId.add(CombinedFragmentEditPart.VISUAL_ID);
-
- // CoRegion
- elementsVisualId.add(CombinedFragment2EditPart.VISUAL_ID);
-
- elementsVisualId.add(CommentAnnotatedElementEditPart.VISUAL_ID);
- elementsVisualId.add(ConsiderIgnoreFragmentEditPart.VISUAL_ID);
-
- elementsVisualId.add(ContinuationEditPart.VISUAL_ID);
- elementsVisualId.add(StateInvariantEditPart.VISUAL_ID);
- elementsVisualId.add(CommentEditPart.VISUAL_ID);
- elementsVisualId.add(CommentBodyEditPart.VISUAL_ID);
-
- elementsVisualId.add(ConstraintEditPart.VISUAL_ID);
- elementsVisualId.add(Constraint2EditPart.VISUAL_ID);
- elementsVisualId.add(ConstraintConstrainedElementEditPart.VISUAL_ID);
-
- elementsVisualId.add(DurationObservationEditPart.VISUAL_ID);
- elementsVisualId.add(TimeConstraintEditPart.VISUAL_ID);
- elementsVisualId.add(TimeObservationEditPart.VISUAL_ID);
- elementsVisualId.add(DurationConstraintEditPart.VISUAL_ID);
-
- elementsVisualId.add(PackageEditPart.VISUAL_ID);
-
- elementsVisualId.add(MessageEditPart.VISUAL_ID);
- elementsVisualId.add(Message2EditPart.VISUAL_ID);
- elementsVisualId.add(Message3EditPart.VISUAL_ID);
- elementsVisualId.add(Message4EditPart.VISUAL_ID);
- elementsVisualId.add(Message4EditPart.VISUAL_ID);
- elementsVisualId.add(Message5EditPart.VISUAL_ID);
- elementsVisualId.add(Message6EditPart.VISUAL_ID);
- elementsVisualId.add(Message7EditPart.VISUAL_ID);
- elementsVisualId.add(Message6EditPart.VISUAL_ID);
- elementsVisualId.add(GeneralOrderingEditPart.VISUAL_ID);
- elementsVisualId.add(DestructionOccurrenceSpecificationEditPart.VISUAL_ID);
- elementsVisualId.add(StateInvariantEditPart.VISUAL_ID);
- elementsVisualId.add(TimeConstraintEditPart.VISUAL_ID);
- elementsVisualId.add(DurationConstraintEditPart.VISUAL_ID);
- elementsVisualId.add(DurationConstraintInMessageEditPart.VISUAL_ID);
- elementsVisualId.add(TimeObservationEditPart.VISUAL_ID);
- elementsVisualId.add(DurationObservationEditPart.VISUAL_ID);
- elementsVisualId.add(LifelineEditPart.VISUAL_ID);
- // handle nodes on messages (no visual ID detected for them)
- elementsVisualId.add(-1);
- return elementsVisualId;
- }
-
-
- @Override
- protected IUndoableOperation getDropObjectCommand(
- DropObjectsRequest dropRequest, final EObject
- droppedObject) {
- IUndoableOperation dropObjectCommand = super.getDropObjectCommand(
- dropRequest, droppedObject);
- if (dropObjectCommand != null && dropObjectCommand.canExecute()) {
- return dropObjectCommand;
- }
- // fix bug 364696(https://bugs.eclipse.org/bugs/show_bug.cgi?id=364696)
- if (droppedObject instanceof ConnectableElement) {
- return doDropConnectableElement(dropRequest,
- (ConnectableElement) droppedObject);
- }
-
- return dropObjectCommand;
- }
-
- private IUndoableOperation doDropConnectableElement(
- DropObjectsRequest dropRequest,
- final ConnectableElement droppedObject) {
- Point location = dropRequest.getLocation();
- CreateViewRequest createShapeRequest = CreateViewRequestFactory
- .getCreateShapeRequest(UMLElementTypes.Lifeline_3001,
- UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- createShapeRequest.setLocation(location);
-
- ViewDescriptor viewDescriptor =createShapeRequest.getViewDescriptors().get(0);
- CreateElementRequestAdapter elementAdapter =(CreateElementRequestAdapter) viewDescriptor.getElementAdapter();
- CreateElementRequest createElementRequest = (CreateElementRequest)elementAdapter.getAdapter(CreateElementRequest.class);
-
- // parameter "ConnectableElement" used in LifelineCreateCommand#doConfigure()
- createElementRequest.setParameter(SequenceRequestConstant.CONNECTABLE_ELEMENT,droppedObject);
- EditPart host = getHost();
- Command theRealCmd = ((IGraphicalEditPart) host)
- .getCommand(createShapeRequest);
-
- if (theRealCmd != null && theRealCmd.canExecute()) {
- return new CommandProxy(theRealCmd);
- }
- return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IElementType getUMLElementType(int elementID) {
- return UMLElementTypes.getElementType(elementID);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getNodeVisualID(View containerView, EObject domainElement) {
- return UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getLinkWithClassVisualID(EObject domainElement) {
- return UMLVisualIDRegistry.getLinkWithClassVisualID(domainElement);
- }
-
- @Override
- protected Command getSpecificDropCommand(DropObjectsRequest dropRequest, Element semanticElement, int nodeVISUALID, int linkVISUALID) {
- Point location = dropRequest.getLocation().getCopy();
-
- // handle specifically the case when node is on a message
- Command cmd = handleNodeOnMessage(semanticElement, nodeVISUALID, linkVISUALID);
- if(cmd != null) {
- return cmd;
- }
-
- if(nodeVISUALID != -1) {
- switch(nodeVISUALID) {
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- return dropExecutionSpecification((ExecutionSpecification)semanticElement, nodeVISUALID, location);
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return dropDestructionOccurrence((DestructionOccurrenceSpecification)semanticElement, nodeVISUALID, location);
- case StateInvariantEditPart.VISUAL_ID:
- return dropStateInvariant((StateInvariant)semanticElement, nodeVISUALID, location);
- case TimeConstraintEditPart.VISUAL_ID:
- case DurationConstraintEditPart.VISUAL_ID:
- return dropIntervalConstraintInLifeline((IntervalConstraint)semanticElement, nodeVISUALID);
- case TimeObservationEditPart.VISUAL_ID:
- return dropTimeObservationInLifeline((TimeObservation)semanticElement, nodeVISUALID, location);
- case CombinedFragment2EditPart.VISUAL_ID:
- return dropCoRegion((CombinedFragment)semanticElement, nodeVISUALID, location);
- case CommentEditPart.VISUAL_ID:
- case ConstraintEditPart.VISUAL_ID:
- case Constraint2EditPart.VISUAL_ID:
- case InteractionUseEditPart.VISUAL_ID:
- case LifelineEditPart.VISUAL_ID:
- return dropNodeElement(semanticElement, nodeVISUALID, location);
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- case CombinedFragmentEditPart.VISUAL_ID:
- return dropCombinedFragment((CombinedFragment)semanticElement, nodeVISUALID, location);
- case ContinuationEditPart.VISUAL_ID:
- case InteractionOperandEditPart.VISUAL_ID:
- return dropCompartmentNodeElement(semanticElement, nodeVISUALID, location);
- default:
- return UnexecutableCommand.INSTANCE;
- }
- }
-
- if(linkVISUALID != -1) {
- switch(linkVISUALID) {
- case MessageEditPart.VISUAL_ID:
- case Message2EditPart.VISUAL_ID:
- case Message3EditPart.VISUAL_ID:
- case Message4EditPart.VISUAL_ID:
- case Message5EditPart.VISUAL_ID:
- case Message6EditPart.VISUAL_ID:
- case Message7EditPart.VISUAL_ID:
- return dropMessage(dropRequest, semanticElement, linkVISUALID);
- case GeneralOrderingEditPart.VISUAL_ID:
- return dropGeneralOrdering(dropRequest, semanticElement, linkVISUALID);
- default:
- return UnexecutableCommand.INSTANCE;
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Get the drop command for the Element
- *
- * @param element
- * the Element
- * @param nodeVISUALID
- * the node visual id
- * @return the drop command if the Element can be dropped
- */
- private Command dropNodeElement(Element element, int nodeVISUALID, Point location) {
- Element parent = element.getOwner();
- if (getHostObject().equals(parent)) {
- List<View> existingViews = DiagramEditPartsUtil.findViews(parent, getViewer());
- if (!existingViews.isEmpty()) {
- EditPart parentEditPart = lookForEditPart(parent);
- if (parentEditPart != null) {
- return new ICommandProxy(getDefaultDropNodeCommand(parentEditPart, nodeVISUALID, location, element));
- }
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Get the drop command for the Element
- *
- * @param element
- * the Element
- * @param nodeVISUALID
- * the node visual id
- * @return the drop command if the element can be dropped
- */
- private Command dropCombinedFragment(CombinedFragment combinedFragment, int nodeVISUALID, Point location) {
- Element parent = combinedFragment.getOwner();
- Element parentContainer = parent.getOwner();
- if (!(parentContainer instanceof CombinedFragment)) {
- parentContainer = parent;
- }
- if (getHostObject().equals(parentContainer)) {
- List<View> existingViews = DiagramEditPartsUtil.findViews(parent, getViewer());
- if (!existingViews.isEmpty()) {
- EditPart parentEditPart = lookForEditPart(parent);
- if (parentEditPart instanceof GraphicalEditPart) {
- // check if all lifelines coversby exist in diagram.
- Rectangle bounds = null;
- List<Lifeline> lifelines = combinedFragment.getCovereds();
- for (Lifeline lifeline : combinedFragment.getCovereds()) {
- EditPart lifelineEditPart = lookForEditPart(lifeline);
- if (lifelineEditPart == null) {
- Shell shell = Display.getCurrent().getActiveShell();
- MessageDialog.openError(shell, DIALOG_TITLE, NLS.bind(LIFELINE_MISSING, lifeline.getName()));
- return UnexecutableCommand.INSTANCE;
- }
- if (lifelineEditPart instanceof GraphicalEditPart) {
- GraphicalEditPart graphicalEditPart = (GraphicalEditPart) lifelineEditPart;
- Rectangle rectangle = graphicalEditPart.getFigure().getBounds().getCopy();
- graphicalEditPart.getFigure().translateToAbsolute(rectangle);
- if (bounds == null) {
- bounds = rectangle;
- } else {
- bounds = bounds.union(rectangle);
- }
- }
- }
- if (bounds == null) {
- return new ICommandProxy(getDefaultDropNodeCommand(parentEditPart, nodeVISUALID, location, combinedFragment));
- }
- location.x = bounds.x;
-
- return new ICommandProxy(dropCombinedFragment(getHost(), nodeVISUALID, location, new Dimension(bounds.width, 100), combinedFragment));
- }
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
-
- /*
- * To extend the method in superclass with an option Dimension size,
- *
- *
- * @param hostEP
- * @param nodeVISUALID
- * @param absoluteLocation
- * @param size
- * @param droppedObject
- * @return
- */
- protected ICommand dropCombinedFragment(EditPart hostEP, int nodeVISUALID, Point absoluteLocation, Dimension size, EObject droppedObject) {
- IHintedType type = ((IHintedType)getUMLElementType(nodeVISUALID));
-
- String semanticHint = null;
- if (type != null) {
- semanticHint = type.getSemanticHint();
- }
-
- List<View> existingViews = DiagramEditPartsUtil.findViews(droppedObject, getViewer());
-
- // only allow one view instance of a single element by diagram
- if(existingViews.isEmpty()) {
- IAdaptable elementAdapter = new EObjectAdapter(droppedObject);
-
- ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, semanticHint, ViewUtil.APPEND, true, getDiagramPreferencesHint());
- CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
- createViewRequest.setLocation(absoluteLocation);
- createViewRequest.setSize(size);
-
- // "ask" the host for a command associated with the
- // CreateViewRequest
- Command command = hostEP.getCommand(createViewRequest);
- if(createViewRequest.getNewObject() instanceof List) {
- for(Object object : (List<?>)createViewRequest.getNewObject()) {
- if(object instanceof IAdaptable) {
- DeferredCreateCommand createCommand2 = new DeferredCreateCommand(getEditingDomain(), droppedObject, (IAdaptable)object, getHost().getViewer());
- command.chain(new ICommandProxy(createCommand2));
- }
- }
- }
- // set the viewdescriptor as result
- // it then can be used as an adaptable to retrieve the View
- return new CommandProxyWithResult(command, descriptor);
- }
-
- return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Get the drop command in case the element can be handled as an element in a CombinedFragment
- *
- * @param element
- * @param nodeVISUALID
- * @param location
- * @return
- */
- private Command dropCompartmentNodeElement(Element element, int nodeVISUALID, Point location) {
- Element parent = element.getOwner();
- Element directParent = parent;
- if (parent instanceof InteractionOperand) {
- parent = parent.getOwner();
- }
- if (getHostObject().equals(parent)) {
- List<View> existingViews = DiagramEditPartsUtil.findViews(directParent, getViewer());
- if (!existingViews.isEmpty()) {
- EditPart parentEditPart = lookForEditPart(directParent);
- if (parentEditPart != null) {
- return new ICommandProxy(getDefaultDropNodeCommand(parentEditPart, nodeVISUALID, location, element));
- }
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Get the drop command in case the element can be handled as a node on a message
- *
- * @param semanticElement
- * the element being dropped from the model
- * @param nodeVISUALID
- * node visual id or -1
- * @param linkVISUALID
- * link visual id or -1
- * @return the drop command if the element can be dropped as a message label node, or null otherwise
- */
- private Command handleNodeOnMessage(Element semanticElement, int nodeVISUALID, int linkVISUALID) {
-
- if(nodeVISUALID == -1 && linkVISUALID == -1) {
- // detect duration observation on a message
- if(semanticElement instanceof DurationObservation) {
- List<NamedElement> events = ((DurationObservation)semanticElement).getEvents();
- if(events.size() >= 2) {
- return dropMessageNodeBetweenEvents(semanticElement, events.get(0), events.get(1));
- }
- }
- }
- if(isDurationConstraintHint(nodeVISUALID, linkVISUALID)) {
- // detect duration constraint on a message
- if(semanticElement instanceof DurationConstraint) {
- List<Element> events = ((DurationConstraint)semanticElement).getConstrainedElements();
- if(events.size() >= 2) {
- return dropMessageNodeBetweenEvents(semanticElement, events.get(0), events.get(1));
- }
- }
- }
- return null;
- }
-
- /**
- * Get the command to drop an element between two events in order to create a message label
- *
- * @param droppedElement
- * the dropped element
- * @param event1
- * first event (of type MessageOccurrenceSpecification)
- * @param event2
- * second event (of type MessageOccurrenceSpecification)
- * @param element
- * @return the command or false if the elements can not be dropped as message label
- */
- private Command dropMessageNodeBetweenEvents(Element droppedElement, Element event1, Element event2) {
- if(event1 instanceof MessageOccurrenceSpecification && event2 instanceof MessageOccurrenceSpecification) {
- if(!event1.equals(event2)) {
- boolean endsOfSameMessage = false;
- int visualId = -1;
- if(droppedElement instanceof DurationConstraint) {
- visualId = DurationConstraintInMessageEditPart.VISUAL_ID;
- endsOfSameMessage = DurationConstraintHelper.endsOfSameMessage((OccurrenceSpecification)event1, (OccurrenceSpecification)event2);
- } else if(droppedElement instanceof DurationObservation) {
- visualId = DurationObservationEditPart.VISUAL_ID;
- endsOfSameMessage = DurationObservationHelper.endsOfSameMessage((OccurrenceSpecification)event1, (OccurrenceSpecification)event2);
- }
- if(endsOfSameMessage) {
- Message message = ((MessageOccurrenceSpecification)event1).getMessage();
- // search a connection which matches the possessing message
- DiagramEditPart diag = DiagramEditPartsUtil.getDiagramEditPart(getHost());
- for(Object conn : diag.getConnections()) {
- if(conn instanceof ConnectionNodeEditPart) {
- EObject connElt = ((ConnectionNodeEditPart)conn).resolveSemanticElement();
- if(message.equals(connElt)) {
- // check that node isn't already represented, or dropping is impossible
- for(Object child : ((ConnectionNodeEditPart)conn).getChildren()) {
- if(child instanceof GraphicalEditPart) {
- EObject childElt = ((GraphicalEditPart)child).resolveSemanticElement();
- if(droppedElement.equals(childElt)) {
- return null;
- }
- }
- }
- return dropNodeOnMessage((PackageableElement)droppedElement, (ConnectionNodeEditPart)conn, visualId);
- }
- }
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Test whether visual ids are compatible with a duration constraint element
- *
- * @param nodeVISUALID
- * the detected node visual id
- * @param linkVISUALID
- * the detected link visual id
- * @return true if element may be a duration constraint
- */
- private boolean isDurationConstraintHint(int nodeVISUALID, int linkVISUALID) {
- if(linkVISUALID != -1) {
- return false;
- } else {
- return nodeVISUALID == -1 || nodeVISUALID == ConstraintEditPart.VISUAL_ID || nodeVISUALID == DurationConstraintEditPart.VISUAL_ID || nodeVISUALID == DurationConstraintInMessageEditPart.VISUAL_ID;
- }
- }
-
- /**
- * Drop a duration observation or a duration constraint on a message edit part
- *
- * @param durationLabelElement
- * the duration observation or duration constraint to display as message label
- * @param messageEditPart
- * the containing message edit part
- * @param nodeVISUALID
- * the label node visual id
- * @return the command or UnexecutableCommand
- */
- private Command dropNodeOnMessage(PackageableElement durationLabelElement, ConnectionNodeEditPart messageEditPart, int nodeVISUALID) {
- IAdaptable elementAdapter = new EObjectAdapter(durationLabelElement);
-
- ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType)getUMLElementType(nodeVISUALID)).getSemanticHint(), ViewUtil.APPEND, false, getDiagramPreferencesHint());
- return messageEditPart.getCommand(new CreateViewRequest(descriptor));
- }
-
- /**
- * Drop a time observation on a lifeline.
- *
- * @param observation
- * the time constraint
- * @param nodeVISUALID
- * the node visual id
- * @param dropLocation
- * @return the command if the lifeline is the correct one or UnexecutableCommand
- */
- private Command dropTimeObservationInLifeline(TimeObservation observation, int nodeVISUALID, Point dropLocation) {
- CompoundCommand cc = new CompoundCommand("Drop");
- IAdaptable elementAdapter = new EObjectAdapter(observation);
-
- ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType)getUMLElementType(nodeVISUALID)).getSemanticHint(), ViewUtil.APPEND, true, getDiagramPreferencesHint());
- cc.add(getHost().getCommand(new CreateViewRequest(descriptor)));
-
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(getHost());
- if(lifelinePart != null) {
- NamedElement occ1 = observation.getEvent();
- if(occ1 instanceof OccurrenceSpecification) {
- Point middlePoint = SequenceUtil.findLocationOfEvent(lifelinePart, (OccurrenceSpecification)occ1);
- if(middlePoint != null) {
- int height = getDefaultDropHeight(nodeVISUALID);
- Point startPoint = middlePoint.getCopy();
- if(height > 0) {
- startPoint.translate(0, -height / 2);
- }
- Rectangle newBounds = new Rectangle(startPoint, new Dimension(-1, height));
- lifelinePart.getFigure().translateToRelative(newBounds);
- Point parentLoc = lifelinePart.getLocation();
- newBounds.translate(parentLoc.getNegated());
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", descriptor, newBounds);
- cc.add(new ICommandProxy(setBoundsCommand));
- return cc;
- }
- }
- }
-
- if(getHost() instanceof InteractionInteractionCompartmentEditPart){
- Rectangle newBounds = new Rectangle(dropLocation, new Dimension(-1, -1));
- ((InteractionInteractionCompartmentEditPart)getHost()).getFigure().translateToRelative(newBounds);
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", descriptor, newBounds);
- cc.add(new ICommandProxy(setBoundsCommand));
- return cc;
- }
-
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Drop an interval constraint (duration or time) on a lifeline.
- *
- * @param constraint
- * the interval constraint
- * @param nodeVISUALID
- * the node visual id
- * @return the command if the lifeline is the correct one or UnexecutableCommand
- */
- private Command dropIntervalConstraintInLifeline(IntervalConstraint constraint, int nodeVISUALID) {
- CompoundCommand cc = new CompoundCommand("Drop");
- IAdaptable elementAdapter = new EObjectAdapter(constraint);
-
- ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType)getUMLElementType(nodeVISUALID)).getSemanticHint(), ViewUtil.APPEND, true, getDiagramPreferencesHint());
- cc.add(getHost().getCommand(new CreateViewRequest(descriptor)));
-
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(getHost());
- if(lifelinePart != null && constraint.getConstrainedElements().size() >= 2) {
- Element occ1 = constraint.getConstrainedElements().get(0);
- Element occ2 = constraint.getConstrainedElements().get(1);
- if(occ1 instanceof OccurrenceSpecification && occ2 instanceof OccurrenceSpecification) {
- Point startPoint = SequenceUtil.findLocationOfEvent(lifelinePart, (OccurrenceSpecification)occ1);
- Point endPoint = SequenceUtil.findLocationOfEvent(lifelinePart, (OccurrenceSpecification)occ2);
- if(startPoint != null && endPoint != null) {
- int height = endPoint.y - startPoint.y;
- Rectangle newBounds = null;
- if(height < 0) {
- newBounds = new Rectangle(endPoint, new Dimension(-1, -height));
- } else {
- newBounds = new Rectangle(startPoint, new Dimension(-1, height));
- }
- lifelinePart.getFigure().translateToRelative(newBounds);
- Point parentLoc = lifelinePart.getLocation();
- newBounds.translate(parentLoc.getNegated());
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", descriptor, newBounds);
- cc.add(new ICommandProxy(setBoundsCommand));
- return cc;
- }
- }
- } else if(lifelinePart != null && constraint.getConstrainedElements().size() == 1) {
- Element occ1 = constraint.getConstrainedElements().get(0);
- if(occ1 instanceof OccurrenceSpecification) {
- Point middlePoint = SequenceUtil.findLocationOfEvent(lifelinePart, (OccurrenceSpecification)occ1);
- if(middlePoint != null) {
- int height = getDefaultDropHeight(nodeVISUALID);
- Point startPoint = middlePoint.getCopy();
- if(height > 0) {
- startPoint.translate(0, -height / 2);
- }
- Rectangle newBounds = new Rectangle(startPoint, new Dimension(-1, height));
- lifelinePart.getFigure().translateToRelative(newBounds);
- Point parentLoc = lifelinePart.getLocation();
- newBounds.translate(parentLoc.getNegated());
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", descriptor, newBounds);
- cc.add(new ICommandProxy(setBoundsCommand));
- return cc;
- }
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Get the default height to set to a drop object. This method is useful for dropped objects which must be positioned relatively to their center.
- *
- * @param nodeVISUALID
- * the node visual id
- * @return arbitrary default height for the node visual id (eventually -1)
- */
- private int getDefaultDropHeight(int nodeVISUALID) {
- if(TimeConstraintEditPart.VISUAL_ID == nodeVISUALID || TimeObservationEditPart.VISUAL_ID == nodeVISUALID) {
- return 2;
- }
- return -1;
- }
-
- private Command dropStateInvariant(StateInvariant stateInvariant, int nodeVISUALID, Point location) {
-
- // an StateInvariant covereds systematically a unique lifeline
- Lifeline lifeline = stateInvariant.getCovereds().get(0);
- // Check that the container view is the view of the lifeline
- if(lifeline.equals(getHostObject())) {
- return new ICommandProxy(getDefaultDropNodeCommand(nodeVISUALID, location, stateInvariant));
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Get lifelines element which contains these existingViews
- *
- * @param existingViews
- * the existing views.
- * @return the list of lifeline.
- */
- private List<Lifeline> getLifelines(List<View> existingViews) {
- List<Lifeline> lifelines = new ArrayList<Lifeline>();
- for(View view : existingViews) {
- EObject eObject = ViewUtil.resolveSemanticElement((View)view.eContainer());
- if(eObject instanceof Lifeline) {
- lifelines.add((Lifeline)eObject);
- }
- }
- return lifelines;
- }
-
- /**
- * Drop a destructionEvent on a lifeline
- *
- * @param destructionOccurence
- * the destructionEvent to drop
- * @param nodeVISUALID
- * the node visualID
- * @return the command to drop the destructionEvent on a lifeline if allowed.
- */
- private Command dropDestructionOccurrence(DestructionOccurrenceSpecification destructionOccurence, int nodeVISUALID, Point location) {
- // Get all the view of this destructionEvent.
- List<View> existingViews = DiagramEditPartsUtil.findViews(destructionOccurence, getViewer());
- // 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)) {
- return new ICommandProxy(getDefaultDropNodeCommand(nodeVISUALID, location, destructionOccurence));
- }
- }
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Get the command to drop an execution specification node
- *
- * @param es
- * execution specification
- * @param nodeVISUALID
- * the execution specification's visual id
- * @param location
- * the location of the drop request
- * @return the drop command
- */
- private Command dropExecutionSpecification(ExecutionSpecification es, int nodeVISUALID, Point location) {
- List<View> existingViews = DiagramEditPartsUtil.findViews(es, getViewer());
- // only allow one view instance of a single element by diagram
- if(existingViews.isEmpty()) {
- // Find the lifeline of the ES
- if(es.getStart() != null && !es.getStart().getCovereds().isEmpty()) {
- // an Occurrence Specification covers systematically a unique lifeline
- Lifeline lifeline = es.getStart().getCovereds().get(0);
- // Check that the container view is the view of the lifeline
- if(lifeline.equals(getHostObject())) {
- //return new ICommandProxy(getDefaultDropNodeCommand(nodeVISUALID, location, es));
-
-
- IHintedType type = ((IHintedType)getUMLElementType(nodeVISUALID));
-
- String semanticHint = null;
- if(type != null) {
- semanticHint = type.getSemanticHint();
- }
-
- IAdaptable elementAdapter = new EObjectAdapter(es);
-
- ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, semanticHint, ViewUtil.APPEND, true, getDiagramPreferencesHint());
- CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
- // find best bounds
- Rectangle bounds = getExecutionSpecificationBounds(es);
- if(bounds != null) {
- createViewRequest.setLocation(bounds.getLocation());
- createViewRequest.setSize(bounds.getSize());
- } else {
- createViewRequest.setLocation(location);
- }
-
- // "ask" the host for a command associated with the CreateViewRequest
- Command command = getHost().getCommand(createViewRequest);
- // set the viewdescriptor as result
- // it then can be used as an adaptable to retrieve the View
- return new ICommandProxy(new CommandProxyWithResult(command, descriptor));
- }
- }
- }
-
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Get the command to drop an code region node
- *
- * @param combinedFragment
- * @param nodeVISUALID
- * @param location
- * @return
- */
- private Command dropCoRegion(CombinedFragment combinedFragment, int nodeVISUALID, Point location) {
- List<View> existingViews = DiagramEditPartsUtil.findViews(combinedFragment, getViewer());
- // only allow one view instance of a single element by diagram
- if(existingViews.isEmpty()) {
- IGraphicalEditPart hostEditpart = (IGraphicalEditPart) getHost();
- EObject element = hostEditpart.getNotationView().getElement();
- if (element instanceof Lifeline) {
- IHintedType type = ((IHintedType)getUMLElementType(nodeVISUALID));
-
- String semanticHint = null;
- if (type != null) {
- semanticHint = type.getSemanticHint();
- }
-
- IAdaptable elementAdapter = new EObjectAdapter(combinedFragment);
-
- ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, semanticHint, ViewUtil.APPEND, true, getDiagramPreferencesHint());
- CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
- createViewRequest.setLocation(location);
-
- // "ask" the host for a command associated with the CreateViewRequest
- Command command = getHost().getCommand(createViewRequest);
- // set the viewdescriptor as result
- // it then can be used as an adaptable to retrieve the View
- return new ICommandProxy(new CommandProxyWithResult(command, descriptor));
- }
- }
-
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Get the advised bounds to drop an execution specification
- *
- * @param es
- * the dropped execution specification
- * @return bounds of the es in absolute coordinates or null
- */
- private Rectangle getExecutionSpecificationBounds(ExecutionSpecification es) {
- Point startLocation = null;
- Point finishLocation = null;
- Rectangle possibleStartLocations = null;
- Rectangle possibleFinishLocations = null;
- // end events of the link
- OccurrenceSpecification startEvent = es.getStart();
- OccurrenceSpecification finishEvent = es.getFinish();
- if(startEvent != null && finishEvent != null && getHost() instanceof LifelineEditPart) {
- LifelineEditPart hostLifeline = (LifelineEditPart)getHost();
- // find location constraints for source
- startLocation = SequenceUtil.findLocationOfEvent((LifelineEditPart)getHost(), startEvent);
- if(startLocation == null) {
- possibleStartLocations = SequenceUtil.findPossibleLocationsForEvent(hostLifeline, startEvent);
- }
- // find location constraints for target
- finishLocation = SequenceUtil.findLocationOfEvent(hostLifeline, finishEvent);
- if(finishLocation == null) {
- possibleFinishLocations = SequenceUtil.findPossibleLocationsForEvent(hostLifeline, finishEvent);
- }
- // find start and finish locations with correct y (start.y < finish.y) and proportions
- if(startLocation == null) {
- if(finishLocation != null) {
- int top = possibleStartLocations.x;
- int bottom = possibleStartLocations.bottom();
- if(top > finishLocation.y) {
- return null;
- } else {
- startLocation = possibleStartLocations.getTop();
- startLocation.y = (top + Math.min(bottom, finishLocation.y)) / 2;
- }
- } else {
- int topS = possibleStartLocations.y;
- int bottomS = possibleStartLocations.bottom();
- int topF = possibleFinishLocations.y;
- int bottomF = possibleFinishLocations.bottom();
- if(topS > bottomF) {
- return null;
- } else {
- startLocation = possibleStartLocations.getTop();
- finishLocation = possibleFinishLocations.getBottom();
- if(bottomS<topF){
- startLocation.y = (topS + bottomS) / 2;
- finishLocation.y = (topF + bottomF) / 2;
- } else {
- startLocation.y = (topS + bottomS + topS + topF) / 4;
- finishLocation.y = (bottomF + topF + bottomF + bottomS) / 4;
- }
- }
- }
- }
- if(finishLocation == null) {
- // startLocation != null
- int top = possibleFinishLocations.y;
- int bottom = possibleFinishLocations.bottom();
- if(bottom < startLocation.y) {
- return null;
- } else {
- finishLocation = possibleFinishLocations.getBottom();
- finishLocation.y = (bottom + Math.max(top, startLocation.y)) / 2;
- }
- }
- // deduce bounds
- Rectangle result = new Rectangle(startLocation, finishLocation);
- result.width = LifelineXYLayoutEditPolicy.EXECUTION_INIT_WIDTH;
- return result;
- }
- return null;
- }
-
- /**
- * Get the command to drop a message link
- *
- * @param dropRequest
- * request to drop
- * @param semanticLink
- * message link
- * @param linkVISUALID
- * the message's visual id
- * @return the drop command
- */
- private Command dropMessage(DropObjectsRequest dropRequest, Element semanticLink, int linkVISUALID) {
- Collection<?> sources = SequenceLinkMappingHelper.getInstance().getSource(semanticLink);
- Collection<?> targets = SequenceLinkMappingHelper.getInstance().getTarget(semanticLink);
- if(!sources.isEmpty() && !targets.isEmpty()) {
- Element source = (Element)sources.toArray()[0];
- Element target = (Element)targets.toArray()[0];
- return getDropLocatedLinkCommand(dropRequest, source, target, linkVISUALID, semanticLink);
- } else {
- return UnexecutableCommand.INSTANCE;
- }
- }
-
- /**
- * The method provides command to create the binary link into the diagram. If the source and the
- * target views do not exist, these views will be created.
- *
- * This implementation is very similar to
- * {@link CommonDiagramDragDropEditPolicy#dropBinaryLink(CompositeCommand, Element, Element, int, Point, Element)}.
- *
- * @param dropRequest
- * the drop request
- * @param cc
- * the composite command that will contain the set of command to create the binary
- * link
- * @param source
- * the element source of the link
- * @param target
- * the element target of the link
- * @param linkVISUALID
- * the link VISUALID used to create the view
- * @param location
- * the location the location where the view will be be created
- * @param semanticLink
- * the semantic link that will be attached to the view
- *
- * @return the composite command
- */
- protected Command getDropLocatedLinkCommand(DropObjectsRequest dropRequest, Element source, Element target, int linkVISUALID, Element semanticLink) {
- // look for editpart
- GraphicalEditPart sourceEditPart = (GraphicalEditPart)lookForEditPart(source);
- GraphicalEditPart targetEditPart = (GraphicalEditPart)lookForEditPart(target);
-
- CompositeCommand cc = new CompositeCommand("Drop");
-
- // descriptor of the link
- CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(getUMLElementType(linkVISUALID), ((IHintedType)getUMLElementType(linkVISUALID)).getSemanticHint(), getDiagramPreferencesHint());
-
- // get source and target adapters, creating the add commands if necessary
- IAdaptable sourceAdapter = null;
- IAdaptable targetAdapter = null;
- if(sourceEditPart == null) {
- ICommand createCommand = getDefaultDropNodeCommand(getLinkSourceDropLocation(dropRequest.getLocation(), source, target), source);
- cc.add(createCommand);
-
- sourceAdapter = (IAdaptable)createCommand.getCommandResult().getReturnValue();
- } else {
- sourceAdapter = new SemanticAdapter(null, sourceEditPart.getModel());
- }
- if(targetEditPart == null) {
- ICommand createCommand = getDefaultDropNodeCommand(getLinkTargetDropLocation(dropRequest.getLocation(), source, target), target);
- cc.add(createCommand);
-
- targetAdapter = (IAdaptable)createCommand.getCommandResult().getReturnValue();
- } else {
- targetAdapter = new SemanticAdapter(null, targetEditPart.getModel());
- }
-
- CreateLocatedConnectionViewCommand aLinkCommand = new CreateLocatedConnectionViewCommand(getEditingDomain(), ((IHintedType)getUMLElementType(linkVISUALID)).getSemanticHint(), sourceAdapter, targetAdapter, getViewer(), getDiagramPreferencesHint(), linkdescriptor, null);
- aLinkCommand.setElement(semanticLink);
- Point[] sourceAndTarget = getLinkSourceAndTargetLocations(semanticLink, sourceEditPart, targetEditPart);
- aLinkCommand.setLocations(sourceAndTarget[0], sourceAndTarget[1]);
- cc.compose(aLinkCommand);
- return new ICommandProxy(cc);
- }
-
- /**
- * Get the source and target recommended points for creating the link
- *
- * @param semanticLink
- * link to create
- * @param sourceEditPart
- * edit part source of the link
- * @param targetEditPart
- * edit part target of the link
- * @return a point array of size 2, with eventually null values (when no point constraint). Index 0 : source location, 1 : target location
- */
- private Point[] getLinkSourceAndTargetLocations(Element semanticLink, GraphicalEditPart sourceEditPart, GraphicalEditPart targetEditPart) {
- // index 0 : source location, 1 : target location
- Point[] sourceAndTarget = new Point[]{ null, null };
- // end events of the link
- OccurrenceSpecification sourceEvent = null;
- OccurrenceSpecification targetEvent = null;
- if(semanticLink instanceof Message) {
- MessageEnd sendEvent = ((Message)semanticLink).getSendEvent();
- if(sendEvent instanceof OccurrenceSpecification) {
- sourceEvent = (OccurrenceSpecification)sendEvent;
- }
- MessageEnd rcvEvent = ((Message)semanticLink).getReceiveEvent();
- if(rcvEvent instanceof OccurrenceSpecification) {
- targetEvent = (OccurrenceSpecification)rcvEvent;
- }
- } else if(semanticLink instanceof GeneralOrdering) {
- sourceEvent = ((GeneralOrdering)semanticLink).getBefore();
- targetEvent = ((GeneralOrdering)semanticLink).getAfter();
- }
- if(sourceEvent != null || targetEvent != null) {
- Rectangle possibleSourceLocations = null;
- Rectangle possibleTargetLocations = null;
- // find location constraints for source
- if(sourceEvent != null && sourceEditPart instanceof LifelineEditPart) {
- sourceAndTarget[0] = SequenceUtil.findLocationOfEvent((LifelineEditPart)sourceEditPart, sourceEvent);
- if(sourceAndTarget[0] == null) {
- possibleSourceLocations = SequenceUtil.findPossibleLocationsForEvent((LifelineEditPart)sourceEditPart, sourceEvent);
- }
- }
- // find location constraints for target
- if(targetEvent != null && targetEditPart instanceof LifelineEditPart) {
- sourceAndTarget[1] = SequenceUtil.findLocationOfEvent((LifelineEditPart)targetEditPart, targetEvent);
- if(sourceAndTarget[1] == null) {
- possibleTargetLocations = SequenceUtil.findPossibleLocationsForEvent((LifelineEditPart)targetEditPart, targetEvent);
- }
- }
- // deduce a possibility
- if(sourceAndTarget[0] == null && possibleSourceLocations != null) {
- // we must fix the source
- if(sourceAndTarget[1] == null && possibleTargetLocations == null) {
- // no target constraint, take center for source
- sourceAndTarget[0] = possibleSourceLocations.getCenter();
- } else if(sourceAndTarget[1] != null) {
- // target is fixed, find arranging source
- int topSource = possibleSourceLocations.y;
- int centerSource = possibleSourceLocations.getCenter().y;
- if(sourceAndTarget[1].y < topSource) {
- // we would draw an uphill message (forbidden).
- // return best locations (command will not execute correctly and handle error report)
- sourceAndTarget[0] = possibleSourceLocations.getTop();
- } else if(centerSource <= sourceAndTarget[1].y) {
- // simply fix to the center of constraint
- sourceAndTarget[0] = possibleSourceLocations.getCenter();
- } else {
- // horizontal message makes source as near as possible to the center
- sourceAndTarget[0] = possibleSourceLocations.getCenter();
- sourceAndTarget[0].y = sourceAndTarget[1].y;
- }
- } else {
- // possibleTargetLocations !=null
- // find arranging target and source
- int centerTarget = possibleTargetLocations.getCenter().y;
- int bottomTarget = possibleTargetLocations.bottom();
- int topSource = possibleSourceLocations.y;
- int centerSource = possibleSourceLocations.getCenter().y;
- if(bottomTarget < topSource) {
- // we would draw an uphill message (forbidden).
- // return best locations (command will not execute correctly and handle error report)
- sourceAndTarget[0] = possibleSourceLocations.getTop();
- sourceAndTarget[1] = possibleTargetLocations.getBottom();
- } else if(centerSource <= centerTarget) {
- // simply fix to centers
- sourceAndTarget[0] = possibleSourceLocations.getCenter();
- sourceAndTarget[1] = possibleTargetLocations.getCenter();
- } else {
- // horizontal message makes source and target as near as possible to the centers
- sourceAndTarget[0] = possibleSourceLocations.getCenter();
- sourceAndTarget[0].y = (topSource + bottomTarget) / 2;
- sourceAndTarget[1] = possibleTargetLocations.getCenter();
- sourceAndTarget[1].y = (topSource + bottomTarget) / 2;
- }
- }
- }
- if(sourceAndTarget[1] == null && possibleTargetLocations != null) {
- // we must fix the target
- // fixedSourceLocation == null => possibleSourceLocations == null
- // source is fixed, find arranging target
- int centerTarget = possibleTargetLocations.getCenter().y;
- int bottomTarget = possibleTargetLocations.bottom();
- if(sourceAndTarget[0] == null) {
- // simply fix to the center of constraint
- sourceAndTarget[1] = possibleTargetLocations.getCenter();
- } else if(bottomTarget < sourceAndTarget[0].y) {
- // we would draw an uphill message (forbidden).
- // return best locations (command will not execute correctly and handle error report)
- sourceAndTarget[1] = possibleTargetLocations.getBottom();
- } else if(sourceAndTarget[0].y <= centerTarget) {
- // simply fix to the center of constraint
- sourceAndTarget[1] = possibleTargetLocations.getCenter();
- } else {
- // horizontal message makes target as near as possible to the center
- sourceAndTarget[1] = possibleTargetLocations.getCenter();
- sourceAndTarget[1].y = sourceAndTarget[0].y;
- }
- }
- }
- return sourceAndTarget;
- }
-
- /**
- * Get the command to drop a general ordering link
- *
- * @param dropRequest
- * request to drop
- * @param semanticLink
- * general ordering link
- * @param linkVISUALID
- * the link's visual id
- * @return the drop command
- */
- private Command dropGeneralOrdering(DropObjectsRequest dropRequest, Element semanticLink, int linkVISUALID) {
- Collection<?> sources = SequenceLinkMappingHelper.getInstance().getSource(semanticLink);
- Collection<?> targets = SequenceLinkMappingHelper.getInstance().getTarget(semanticLink);
- if(!sources.isEmpty() && !targets.isEmpty()) {
- Element source = (Element)sources.toArray()[0];
- Element target = (Element)targets.toArray()[0];
- return getDropLocatedLinkCommand(dropRequest, source, target, linkVISUALID, semanticLink);
- } else {
- return UnexecutableCommand.INSTANCE;
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomExternalLabelPrimaryDragRoleEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomExternalLabelPrimaryDragRoleEditPolicy.java
deleted file mode 100644
index f79e0985b19..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomExternalLabelPrimaryDragRoleEditPolicy.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableEditPolicyEx;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * This policy provides the selection handles, feedback and move command for
- * external node label.
- */
-public class CustomExternalLabelPrimaryDragRoleEditPolicy extends ResizableEditPolicyEx {
-
- @Override
- protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
-
- @Override
- protected Command getMoveCommand(ChangeBoundsRequest request) {
- LabelEditPart editPart = (LabelEditPart)getHost();
-
- // FeedBack - Port + Delta
- Rectangle updatedRect = new Rectangle();
- PrecisionRectangle initialRect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
- updatedRect = initialRect.getTranslated(getHostFigure().getParent().getBounds().getLocation().getNegated());
- updatedRect = updatedRect.getTranslated(request.getMoveDelta());
-
- // translate the feedback figure
- PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
- getHostFigure().translateToAbsolute(rect);
- rect.translate(request.getMoveDelta());
- rect.resize(request.getSizeDelta());
- getHostFigure().translateToRelative(rect);
-
- ICommand moveCommand = new SetBoundsCommand(editPart.getEditingDomain(), DiagramUIMessages.MoveLabelCommand_Label_Location, new EObjectAdapter((View)editPart.getModel()), updatedRect);
- return new ICommandProxy(moveCommand);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DeleteTimeElementWithoutEventPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DeleteTimeElementWithoutEventPolicy.java
deleted file mode 100644
index 85f62fa3560..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DeleteTimeElementWithoutEventPolicy.java
+++ /dev/null
@@ -1,461 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - additional features
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import static org.eclipse.papyrus.uml.diagram.common.Activator.log;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-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.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.Transaction;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.AbstractEMFOperation;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.editpolicies.AbstractEditPolicy;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.util.StringStatics;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
-import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer;
-import org.eclipse.gmf.runtime.diagram.ui.util.EditPartUtil;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.core.listenerservice.IPapyrusListener;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.TimeObservation;
-
-/**
- * Edit Policy in charge of the removal of time/duration constraint/observation which no longer have associated events.
- * <P>
- * This view checks that the host edit part, a time/duration constraint/observation edit part, has necessary associated events. It listens for model
- * notifications. As soon as it receives a remove event, it checks whether the time element should be also deleted.<BR/>
- * </P>
- */
-public class DeleteTimeElementWithoutEventPolicy extends AbstractEditPolicy implements NotificationListener, IPapyrusListener {
-
- /** The key to install this edit policy */
- public static final String KEY = "DeleteTimeElementWithoutEvent";
-
- /** list of element to listen */
- protected HashMap<EObject, List<View>> additionalParentToListen = new HashMap<EObject, List<View>>();
-
- /** stores the host associated semantic element */
- protected EObject hostSemanticElement;
-
- /**
- * Adds additional listeners to the diagram event broker.
- */
- @Override
- public void activate() {
-
- // retrieve the view and the element associated to the host edit part
- final View hostView = (View)getHost().getModel();
- hostSemanticElement = hostView.getElement();
-
- // adds listener to the event broker, listening for the view and the semantic element associated to the host edit part
- getDiagramEventBroker().addNotificationListener(hostView, this);
- getDiagramEventBroker().addNotificationListener(hostSemanticElement, this);
-
- // retrieve the list of linked view to listen parents
- for(View linkedView : getLinkedViews()) {
- getDiagramEventBroker().addNotificationListener(linkedView.eContainer(), this);
- }
- super.activate();
- }
-
- /**
- * Removes this edit policy as listener for changes to the specified semanticParent
- *
- * @param semanticParent
- * the semantic parent to stop listen
- * @param childView
- * the view that does not requires this additional listener
- */
- protected void removeAdditionalParentToListen(EObject semanticParent, View childView) {
- // removes the view from the list of views that requires a listener for the semantic parent
- if(additionalParentToListen.containsKey(semanticParent)) {
- List<View> views = additionalParentToListen.get(semanticParent);
- assert (views != null) : "list should not be null";
- views.remove(childView);
- if(views.isEmpty()) {
- additionalParentToListen.remove(semanticParent);
- // check this is not the parent semantic element of the host's semantic element
- if(!semanticParent.equals(((View)getHost().getModel()).getElement())) {
- getDiagramEventBroker().removeNotificationListener(semanticParent, this);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void deactivate() {
- // retrieve the view and the element associated to the host edit part
- final View hostView = (View)getHost().getModel();
-
- // removes all notification listeners for the additional parent to listen
- for(EObject parent : additionalParentToListen.keySet()) {
- getDiagramEventBroker().removeNotificationListener(parent, this);
- }
- additionalParentToListen.clear();
- additionalParentToListen = null;
-
- getDiagramEventBroker().removeNotificationListener(hostView, this);
- getDiagramEventBroker().removeNotificationListener(hostSemanticElement, this);
-
- // removes the reference to the semantic element
- hostSemanticElement = null;
-
- super.deactivate();
- }
-
- /**
- * Deletes the time element.
- */
- protected final void deleteTimeElement() {
- Command cmd = getDeleteElementCommand(false);
-
- if(cmd.canExecute()) {
- executeCommand(cmd);
- }
- }
-
- /**
- * Deletes a time element view.
- */
- protected final void deleteTimeView() {
- Command cmd = getDeleteElementCommand(true);
-
- if(cmd.canExecute()) {
- executeCommand(cmd);
- }
- }
-
- /**
- * Executes the supplied command inside an <code>unchecked action</code>
- *
- * @param cmd
- * command that can be executed (i.e., cmd.canExecute() == true)
- */
- protected void executeCommand(final Command cmd) {
- Map<String, Boolean> options = null;
- EditPart ep = getHost();
- boolean isActivating = true;
- // use the viewer to determine if we are still initializing the diagram
- // do not use the DiagramEditPart.isActivating since ConnectionEditPart's
- // parent will not be a diagram edit part
- EditPartViewer viewer = ep.getViewer();
- if(viewer instanceof DiagramGraphicalViewer) {
- isActivating = ((DiagramGraphicalViewer)viewer).isInitializing();
- }
-
- if(isActivating || !EditPartUtil.isWriteTransactionInProgress((IGraphicalEditPart)getHost(), false, false))
- options = Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE);
-
- AbstractEMFOperation operation = new AbstractEMFOperation(((IGraphicalEditPart)getHost()).getEditingDomain(), StringStatics.BLANK, options) {
-
- protected IStatus doExecute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- ((IGraphicalEditPart)getHost()).getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- return Status.OK_STATUS;
- }
-
- @Override
- protected IStatus doUndo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- cmd.undo();
- return Status.OK_STATUS;
- }
- };
- try {
- operation.execute(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- log.error(e);
- }
- }
-
- /**
- * Check if time element is correctly defined
- *
- * @return true if it has necessary information, false if it is to be deleted
- */
- protected boolean isTimeElementDefined() {
- if(hostSemanticElement instanceof TimeObservation) {
- return ((TimeObservation)hostSemanticElement).getEvent() != null;
- } else if(hostSemanticElement instanceof DurationObservation) {
- return ((DurationObservation)hostSemanticElement).getEvents().size() >= 2;
- } else if(hostSemanticElement instanceof TimeConstraint) {
- return ((TimeConstraint)hostSemanticElement).getConstrainedElements().size() > 0;
- } else if(hostSemanticElement instanceof DurationConstraint) {
- /*
- * Note that DurationConstraint may have only one ConstrainedElement.
- * But in such a case, we suppose it has not been created as one of the concerned edit parts.
- */
- return ((DurationConstraint)hostSemanticElement).getConstrainedElements().size() >= 2;
- }
- return true;
- }
-
- /**
- * Get the list of other required figures
- *
- * @return list of views
- */
- protected List<View> getLinkedViews() {
- if(getHost() instanceof TimeObservationEditPart && hostSemanticElement instanceof TimeObservation) {
- LifelineEditPart lifeline = SequenceUtil.getParentLifelinePart(getHost());
- NamedElement occ = ((TimeObservation)hostSemanticElement).getEvent();
- if(occ instanceof OccurrenceSpecification) {
- EditPart part = SequenceUtil.getLinkedEditPart(lifeline, (OccurrenceSpecification)occ);
- if(part != null) {
- return Collections.singletonList((View)part.getModel());
- }
- }
- return Collections.emptyList();
- } else if(getHost() instanceof TimeConstraintEditPart && hostSemanticElement instanceof TimeConstraint) {
- LifelineEditPart lifeline = SequenceUtil.getParentLifelinePart(getHost());
- List<Element> occs = ((TimeConstraint)hostSemanticElement).getConstrainedElements();
- if(occs.size() > 0 & occs.get(0) instanceof OccurrenceSpecification) {
- EditPart part = SequenceUtil.getLinkedEditPart(lifeline, (OccurrenceSpecification)occs.get(0));
- if(part != null) {
- return Collections.singletonList((View)part.getModel());
- }
- }
- return Collections.emptyList();
- } else if(getHost() instanceof DurationConstraintEditPart && hostSemanticElement instanceof TimeConstraint) {
- LifelineEditPart lifeline = SequenceUtil.getParentLifelinePart(getHost());
- List<Element> occs = ((TimeConstraint)hostSemanticElement).getConstrainedElements();
- if(occs.size() >= 2 && occs.get(0) instanceof OccurrenceSpecification && occs.get(1) instanceof OccurrenceSpecification) {
- EditPart part1 = SequenceUtil.getLinkedEditPart(lifeline, (OccurrenceSpecification)occs.get(0));
- EditPart part2 = SequenceUtil.getLinkedEditPart(lifeline, (OccurrenceSpecification)occs.get(1));
- List<View> list = new ArrayList<View>(2);
- if(part1 != null) {
- list.add((View)part1.getModel());
- }
- if(part2 != null) {
- list.add((View)part2.getModel());
- }
- return list;
- }
- return Collections.emptyList();
- }
- // a label on a message always has its parent message
- return Collections.emptyList();
- }
-
- /**
- * Check if time element has required other figures
- *
- * @return true if the time element figure miss one of the figure representing its ends.
- */
- protected boolean timeElementMissAnEventFigure() {
- if(getHost() instanceof TimeObservationEditPart && hostSemanticElement instanceof TimeObservation) {
- LifelineEditPart lifeline = SequenceUtil.getParentLifelinePart(getHost());
- NamedElement occ = ((TimeObservation)hostSemanticElement).getEvent();
- if(occ instanceof OccurrenceSpecification) {
- return SequenceUtil.getLinkedEditPart(lifeline, (OccurrenceSpecification)occ) == null;
- }
- return true;
- } else if(getHost() instanceof TimeConstraintEditPart && hostSemanticElement instanceof TimeConstraint) {
- LifelineEditPart lifeline = SequenceUtil.getParentLifelinePart(getHost());
- List<Element> occs = ((TimeConstraint)hostSemanticElement).getConstrainedElements();
- if(occs.size() > 0 && occs.get(0) instanceof OccurrenceSpecification) {
- return SequenceUtil.getLinkedEditPart(lifeline, (OccurrenceSpecification)occs.get(0)) == null;
- }
- return true;
- } else if(getHost() instanceof DurationConstraintEditPart && hostSemanticElement instanceof DurationConstraint) {
- LifelineEditPart lifeline = SequenceUtil.getParentLifelinePart(getHost());
- List<Element> occs = ((DurationConstraint)hostSemanticElement).getConstrainedElements();
- if(occs.size() >= 2 && occs.get(0) instanceof OccurrenceSpecification && occs.get(1) instanceof OccurrenceSpecification) {
- return SequenceUtil.getLinkedEditPart(lifeline, (OccurrenceSpecification)occs.get(0)) == null || SequenceUtil.getLinkedEditPart(lifeline, (OccurrenceSpecification)occs.get(1)) == null;
- }
- return true;
- }
- // a label on a message always has its parent message
- return false;
- }
-
- /**
- * Returns a {@link Command} to delete the host element
- *
- * @param graphOnly
- * true if the view only must be removed
- * @return the command that destroys the host element
- */
- protected Command getDeleteElementCommand(boolean graphOnly) {
- if(graphOnly) {
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
- return new ICommandProxy(new DeleteCommand(editingDomain, (View)getHost().getModel()));
- } else {
- DestroyElementRequest req = new DestroyElementRequest(hostSemanticElement, false);
- return getDestroyElementCommand(req);
- }
- }
-
- /**
- * Copied from a generated method from a semantic edit policy which supports the edit element service
- * @param req the DestroyElementRequest
- * @return the destroy command
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if(provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if(deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Gets the diagram event broker from the editing domain.
- *
- * @return the diagram event broker
- */
- protected DiagramEventBroker getDiagramEventBroker() {
- TransactionalEditingDomain theEditingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
- if(theEditingDomain != null) {
- return DiagramEventBroker.getInstance(theEditingDomain);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public void notifyChanged(Notification notification) {
- Object notifier = notification.getNotifier();
- if(notifier.equals(hostSemanticElement)) {
- if(Notification.REMOVE == notification.getEventType() || Notification.SET == notification.getEventType()) {
- deleteTimeElementIfNeeded();
- }
- } else if(notifier instanceof View) {
- // a view has been modified
- if(Notification.REMOVE == notification.getEventType()) {
- deleteTimeElementIfNeeded();
- }
- }
- }
-
- /**
- * Removes a listener for the specified view, if it exists.
- *
- * @param oldView
- * the old view to check
- */
- protected void removeListenerForView(View oldView) {
- // create a temp list of elements to delete (iterator concurrent modification..)
- Map<EObject, List<View>> parentsToDelete = new HashMap<EObject, List<View>>();
-
- for(EObject parent : additionalParentToListen.keySet()) {
- List<View> parentViews = additionalParentToListen.get(parent);
- if(parentViews.contains(oldView)) {
-
- List<View> views = parentsToDelete.get(parent);
- if(views == null) {
- views = new ArrayList<View>();
- }
- views.add(oldView);
- parentsToDelete.put(parent, views);
- }
- }
- }
-
- /**
- * Updates the listeners for the specified semantic parent
- */
- protected void removeListeners(List<View> impactedViews) {
- // create a temp list of elements to delete (iterator concurrent modification..)
- Map<EObject, List<View>> parentsToDelete = new HashMap<EObject, List<View>>();
-
- // collect the elements to delete
- for(View view : impactedViews) {
- for(EObject parent : additionalParentToListen.keySet()) {
- List<View> parentViews = additionalParentToListen.get(parent);
- if(parentViews.contains(view)) {
-
- List<View> views = parentsToDelete.get(parent);
- if(views == null) {
- views = new ArrayList<View>();
- }
- views.add(view);
- parentsToDelete.put(parent, views);
- }
- }
- }
-
- // do the job
- for(EObject object : parentsToDelete.keySet()) {
- List<View> views = parentsToDelete.get(object);
- for(View view : views) {
- removeAdditionalParentToListen(object, view);
- }
- }
- }
-
- /**
- * Check if the time element should be deleted and delete it if necessary.
- */
- protected void deleteTimeElementIfNeeded() {
- if(!isTimeElementDefined()) {
- // delete the time element
- deleteTimeElement();
- }
- if(timeElementMissAnEventFigure()) {
- // delete the view
- deleteTimeView();
- }
- }
-
- /**
- * launch a weak synchronization. It could be useful in order to clean a diagram by an external tool.
- */
- public void forceRefresh() {
- deleteTimeElementIfNeeded();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionEventComponentEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionEventComponentEditPolicy.java
deleted file mode 100644
index 429dd145b63..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionEventComponentEditPolicy.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * This edit policy also deletes time/duration edit parts which are linked with the deleted edit part.
- */
-public class DestructionEventComponentEditPolicy extends ComponentEditPolicy {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Command createDeleteViewCommand(GroupRequest deleteRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = super.createDeleteViewCommand(deleteRequest);
- deleteViewsCommand.add(deleteViewCommand);
- if(getHost() instanceof ShapeNodeEditPart) {
- TransactionalEditingDomain editingDomain = ((ShapeNodeEditPart)getHost()).getEditingDomain();
- SequenceDeleteHelper.completeDeleteDestructionOccurenceViewCommand(deleteViewsCommand, editingDomain, getHost());
- }
- return deleteViewsCommand;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ElementCreationWithMessageEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ElementCreationWithMessageEditPolicy.java
deleted file mode 100644
index fae1cbee5dd..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ElementCreationWithMessageEditPolicy.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.CreateConnectionRequest;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.command.PromptCreateElementAndNodeCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Lifeline;
-
-/**
- * Edit Policy to create an element on a lifeline associated with the creation of a message.
- * For example it can be used to create a Destruction Event with a Message Delete
- * or the target Execution Specification with a Message Sync.
- *
- * @author Mathieu Velten
- *
- */
-public class ElementCreationWithMessageEditPolicy extends LifelineChildGraphicalNodeEditPolicy {
-
- @Override
- protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
-// CompoundCommand compound = new CompoundCommand();
-
- Command command = super.getConnectionCompleteCommand(request);
-
- if(command != null && command.canExecute()) {
-// compound.add(command);
-
- if(request instanceof CreateConnectionViewAndElementRequest) {
- CreateConnectionViewAndElementRequest viewRequest = (CreateConnectionViewAndElementRequest)request;
- EditPart targetEP = getTargetEditPart(viewRequest);
- EObject target = ViewUtil.resolveSemanticElement((View)targetEP.getModel());
- EditPart sourceEP = viewRequest.getSourceEditPart();
- EObject source = ViewUtil.resolveSemanticElement((View)sourceEP.getModel());
-
- if(getSyncMessageHint().equals(viewRequest.getConnectionViewDescriptor().getSemanticHint()) || getReplyMessageHint().equals(viewRequest.getConnectionViewDescriptor().getSemanticHint())) {
- if(target instanceof Lifeline ||
- // handle reflexive synch message by creating a new ES
- (target instanceof ExecutionSpecification && target.equals(source))) {
- InteractionFragment ift = SequenceUtil.findInteractionFragmentContainerAt(viewRequest.getLocation(), getHost());
-
- // retrieve the good execution specification type using the source of the message
- if(target instanceof ExecutionSpecification) {
- // retrieve its associated lifeline
- targetEP = targetEP.getParent();
- target = ViewUtil.resolveSemanticElement((View)targetEP.getModel());
- }
- EditPart sourceEditPart = request.getSourceEditPart();
- if (sourceEditPart instanceof ActionExecutionSpecificationEditPart || sourceEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- return new ICommandProxy(new PromptCreateElementAndNodeCommand(command, getEditingDomain(),viewRequest.getConnectionViewDescriptor(),(ShapeNodeEditPart) targetEP, target,sourceEP,request, ift));
- }
-// IHintedType elementType = null;
-// if(sourceEditPart instanceof ActionExecutionSpecificationEditPart) {
-// elementType = (IHintedType)UMLElementTypes.ActionExecutionSpecification_3006;
-// } else if(request.getSourceEditPart() instanceof BehaviorExecutionSpecificationEditPart) {
-// elementType = (IHintedType)UMLElementTypes.BehaviorExecutionSpecification_3003;
-// }
-//
-//
-// if(elementType != null) {
-// CreateElementAndNodeCommand createExecutionSpecificationCommand = new CreateElementAndNodeCommand(getEditingDomain(), (ShapeNodeEditPart)targetEP, target, elementType, request.getLocation());
-// createExecutionSpecificationCommand.putCreateElementRequestParameter(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER, ift);
-// compound.add(createExecutionSpecificationCommand);
-//
-// // put the anchor at the top of the figure
-// ChangeEdgeTargetCommand changeTargetCommand = new ChangeEdgeTargetCommand(getEditingDomain(), createExecutionSpecificationCommand, viewRequest.getConnectionViewDescriptor(), "(0.5, 0.0)");
-// compound.add(new ICommandProxy(changeTargetCommand));
-// }
- }
- }
- }
- }
-
- return command;
- }
-
- private static String getSyncMessageHint() {
- IHintedType message = (IHintedType)UMLElementTypes.Message_4003;
- return message.getSemanticHint();
- }
-
- private static String getReplyMessageHint() {
- IHintedType message = (IHintedType)UMLElementTypes.Message_4005;
- return message.getSemanticHint();
- }
-
- private TransactionalEditingDomain getEditingDomain() {
- return ((IGraphicalEditPart)getHost()).getEditingDomain();
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationComponentEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationComponentEditPolicy.java
deleted file mode 100644
index f56a16ae63d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExecutionSpecificationComponentEditPolicy.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.List;
-
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ComponentEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * This edit policy also deletes time/duration edit parts which are linked with the deleted edit part.
- */
-public class ExecutionSpecificationComponentEditPolicy extends ComponentEditPolicy {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Command createDeleteViewCommand(GroupRequest deleteRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = super.createDeleteViewCommand(deleteRequest);
- deleteViewsCommand.add(deleteViewCommand);
- if(getHost() instanceof ShapeNodeEditPart) {
- TransactionalEditingDomain editingDomain = ((ShapeNodeEditPart)getHost()).getEditingDomain();
- SequenceDeleteHelper.completeDeleteExecutionSpecificationViewCommand(deleteViewsCommand, editingDomain, getHost());
- addDeleteViewChildrenCommand(deleteViewsCommand, editingDomain, (ShapeNodeEditPart)getHost());
- }
- return deleteViewsCommand;
- }
-
- // support nested actions and behaviors execution, https://bugs.eclipse.org/bugs/show_bug.cgi?id=384616
- public static void addDeleteViewChildrenCommand(CompoundCommand deleteViewsCommand, TransactionalEditingDomain editingDomain, ShapeNodeEditPart part) {
- List<ShapeNodeEditPart> list = LifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts(part);
- for(ShapeNodeEditPart p : list){
- deleteViewsCommand.add( new ICommandProxy(new DeleteCommand(editingDomain, (View) p.getModel())));
- SequenceDeleteHelper.completeDeleteExecutionSpecificationViewCommand(deleteViewsCommand, editingDomain, p);
- addDeleteViewChildrenCommand(deleteViewsCommand,editingDomain, p); //recursive delete children
- }
- }
-
- public static void addDestroyElementChildrenCommand(CompoundCommand deleteElementsCommand, TransactionalEditingDomain editingDomain, EditPart part) {
- List<ShapeNodeEditPart> list = LifelineXYLayoutEditPolicy.getAffixedExecutionSpecificationEditParts((ShapeNodeEditPart)part);
- for(ShapeNodeEditPart p : list){
- Request request = new EditCommandRequestWrapper(new DestroyElementRequest(p.resolveSemanticElement(), false));
- deleteElementsCommand.add(p.getCommand(request));
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExternalLabelPrimaryDragRoleEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExternalLabelPrimaryDragRoleEditPolicy.java
deleted file mode 100644
index 644526d13a0..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ExternalLabelPrimaryDragRoleEditPolicy.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * This policy provides the selection handles, feedback and move command for
- * external node label.
- * The expected behavior is to provide an external label that can freely move and with a link feedback
- * towards its parent figure during the move.
- */
-public class ExternalLabelPrimaryDragRoleEditPolicy extends NonResizableLabelEditPolicy {
-
- @Override
- protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
-
- @Override
- protected Command getMoveCommand(ChangeBoundsRequest request) {
- LabelEditPart editPart = (LabelEditPart)getHost();
-
- // FeedBack - Port + Delta
- Rectangle updatedRect = new Rectangle();
- PrecisionRectangle initialRect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
- updatedRect = initialRect.getTranslated(getHostFigure().getParent().getBounds().getLocation().getNegated());
- updatedRect = updatedRect.getTranslated(request.getMoveDelta());
-
- // translate the feedback figure
- PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
- getHostFigure().translateToAbsolute(rect);
- rect.translate(request.getMoveDelta());
- rect.resize(request.getSizeDelta());
- getHostFigure().translateToRelative(rect);
-
- ICommand moveCommand = new SetBoundsCommand(editPart.getEditingDomain(), DiagramUIMessages.MoveLabelCommand_Label_Location, new EObjectAdapter((View)editPart.getModel()), updatedRect);
- return new ICommandProxy(moveCommand);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/HighlightConnectionPartEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/HighlightConnectionPartEditPolicy.java
deleted file mode 100644
index 5fcfb78b436..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/HighlightConnectionPartEditPolicy.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.gef.Request;
-import org.eclipse.gef.editpolicies.AbstractEditPolicy;
-import org.eclipse.gef.requests.CreateConnectionRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.util.HighlightUtil;
-
-public class HighlightConnectionPartEditPolicy extends AbstractEditPolicy {
-
- private HighlightUtil sourceHighlighter = new HighlightUtil();
-
- private HighlightUtil targetHighlighter = new HighlightUtil();
-
- @Override
- public void showSourceFeedback(Request request) {
- if(request instanceof CreateConnectionRequest) {
- sourceHighlighter.highlight(getHost());
- }
- }
-
- @Override
- public void showTargetFeedback(Request request) {
- if(request instanceof CreateConnectionRequest && ((CreateConnectionRequest)request).getSourceEditPart() != null) {
- targetHighlighter.highlight(getHost());
- } else if(request instanceof ReconnectRequest && ((ReconnectRequest)request).getTarget() != null) {
- targetHighlighter.highlight(((ReconnectRequest)request).getTarget());
- }
- }
-
- @Override
- public void eraseSourceFeedback(Request request) {
- if(request instanceof CreateConnectionRequest) {
- sourceHighlighter.unhighlight(getHost());
- }
- }
-
- @Override
- public void eraseTargetFeedback(Request request) {
- if(request instanceof CreateConnectionRequest && ((CreateConnectionRequest)request).getSourceEditPart() != null) {
- targetHighlighter.unhighlight(getHost());
- } else if(request instanceof ReconnectRequest && ((ReconnectRequest)request).getTarget() != null) {
- targetHighlighter.unhighlight(((ReconnectRequest)request).getTarget());
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCompartmentXYLayoutEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCompartmentXYLayoutEditPolicy.java
deleted file mode 100644
index d7d3231e5b8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCompartmentXYLayoutEditPolicy.java
+++ /dev/null
@@ -1,789 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PrecisionPoint;
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.AlignmentRequest;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart;
-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.ShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.IdentityAnchor;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
-import org.eclipse.papyrus.uml.diagram.common.commands.PreserveAnchorsPositionCommand;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool.CreateAspectUnspecifiedTypeRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.HighlightUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineResizeHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OperandBoundsComputeHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.Lifeline;
-
-/**
- * The customn XYLayoutEditPolicy for InteractionCompartmentEditPart.
- */
-public class InteractionCompartmentXYLayoutEditPolicy extends XYLayoutEditPolicy {
-
- protected Command getCreateCommand(CreateRequest request) {
- CreateViewRequest req = (CreateViewRequest) request;
- Command cmd = super.getCreateCommand(request);
-
- if(cmd != null && req.getSize() != null){ // create lifeline with specific size
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
- Iterator iter = req.getViewDescriptors().iterator();
- while (iter.hasNext()) {
- CreateViewRequest.ViewDescriptor viewDescriptor = (CreateViewRequest.ViewDescriptor)iter.next();
- if (((IHintedType) UMLElementTypes.Lifeline_3001).getSemanticHint().equals(viewDescriptor.getSemanticHint())) {
- cmd = (new ICommandProxy(LifelineResizeHelper.createManualLabelSizeCommand(editingDomain, viewDescriptor))).chain(cmd);
- }
- }
- }
- return cmd;
- }
-
- /**
- * Handle lifeline and combined fragment resize
- */
- @Override
- protected Command getResizeChildrenCommand(ChangeBoundsRequest request) {
- CompoundCommand compoundCmd = new CompoundCommand();
- compoundCmd.setLabel("Move or Resize");
-
- IFigure figure = getHostFigure();
- Rectangle hostBounds = figure.getBounds();
-
- for(Object o : request.getEditParts()) {
- GraphicalEditPart child = (GraphicalEditPart)o;
- Object constraintFor = getConstraintFor(request, child);
- if (constraintFor instanceof Rectangle) {
- Rectangle childBounds = (Rectangle) constraintFor;
- if (childBounds.x < 0 || childBounds.y < 0) {
- return UnexecutableCommand.INSTANCE;
- }
-
- if(child instanceof LifelineEditPart) {
- if (isVerticalMove(request)) {
- addLifelineResizeChildrenCommand(compoundCmd, request, (LifelineEditPart)child, 1);
- }
- } else if(child instanceof CombinedFragmentEditPart) {
- // Add restrictions to change the size
- if(!OperandBoundsComputeHelper.checkRedistrictOnCFResize(request,child)){
- return null;
- }
- Command resizeChildrenCommand = getCombinedFragmentResizeChildrenCommand(request, (CombinedFragmentEditPart)child);
- if(resizeChildrenCommand != null && resizeChildrenCommand.canExecute()) {
- compoundCmd.add(resizeChildrenCommand);
- }
-// else if(resizeChildrenCommand != null) {
-// return UnexecutableCommand.INSTANCE;
-// }
- }
-
- boolean hasCreateLink = LifelineMessageCreateHelper.hasIncomingMessageCreate(child);
- if(hasCreateLink && !LifelineMessageCreateHelper.canMoveLifelineVertical((LifelineEditPart) child, (Rectangle) translateToModelConstraint(constraintFor)) ){
- return UnexecutableCommand.INSTANCE;
- }
- if(!(child instanceof LifelineEditPart) || isVerticalMove(request) || hasCreateLink) {
- Command changeConstraintCommand = createChangeConstraintCommand(request, child, translateToModelConstraint(constraintFor));
-
- // When we change the width by mouse, it passe to manual mode. see https://bugs.eclipse.org/bugs/show_bug.cgi?id=383723
- if(child instanceof LifelineEditPart && changeConstraintCommand != null && request.getSizeDelta().width != 0){
- compoundCmd.add(new ICommandProxy(LifelineResizeHelper.createManualLabelSizeCommand((LifelineEditPart)child)));
- }
- compoundCmd.add(changeConstraintCommand);
- }
-
- if(child instanceof CombinedFragmentEditPart) {
- OperandBoundsComputeHelper.createUpdateIOBoundsForCFResizeCommand(compoundCmd,request,(CombinedFragmentEditPart)child);
- }
-
- int right = childBounds.right();
- int bottom = childBounds.bottom();
- int deltaX = 0;
- int deltaY = 0;
- if (right > hostBounds.width) {
- deltaX = right - hostBounds.width;
- }
- if (bottom > hostBounds.height) {
- deltaY = bottom - hostBounds.height;
- }
- if (deltaX != 0 || deltaY != 0) {
- ChangeBoundsRequest boundsRequest = new ChangeBoundsRequest(RequestConstants.REQ_RESIZE);
- boundsRequest.setSizeDelta(new Dimension(deltaX, deltaY));
- EditPart hostParent = getHost().getParent();
- boundsRequest.setEditParts(hostParent);
- Command cmd = hostParent.getCommand(boundsRequest);
- if (cmd != null && cmd.canExecute()) {
- compoundCmd.add(cmd);
- }
- }
- }
- }
- return compoundCmd.unwrap();
- }
-
- protected boolean isVerticalMove(ChangeBoundsRequest request) {
- if (request instanceof AlignmentRequest) {
- AlignmentRequest alignmentRequest = (AlignmentRequest) request;
- switch(alignmentRequest.getAlignment()) {
- case PositionConstants.BOTTOM:
- case PositionConstants.TOP:
- case PositionConstants.MIDDLE:
- case PositionConstants.VERTICAL:
- case PositionConstants.NORTH_EAST:
- case PositionConstants.NORTH_WEST:
- case PositionConstants.SOUTH_EAST:
- case PositionConstants.SOUTH_WEST:
- return false;
- }
- }
-
- Point point = request.getMoveDelta();
- return point.y == 0;
- }
-
- /**
- * Resize children of LifelineEditPart (Execution specification and lifeline)
- *
- * @param compoundCmd
- * The command
- * @param request
- * The request
- * @param lifelineEditPart
- * The lifelineEditPart to resize
- * @param number
- * The number of brother of the LifelineEditPart
- */
- public static void addLifelineResizeChildrenCommand(CompoundCommand compoundCmd, ChangeBoundsRequest request, LifelineEditPart lifelineEditPart, int number) {
- // If the width increases or decreases, ExecutionSpecification elements need to
- // be moved
- int widthDelta;
- for(ShapeNodeEditPart executionSpecificationEP : lifelineEditPart.getChildShapeNodeEditPart()) {
- if(executionSpecificationEP.resolveSemanticElement() instanceof ExecutionSpecification) {
- // Lifeline's figure where the child is drawn
- Rectangle rDotLine = lifelineEditPart.getContentPane().getBounds();
-
- // The new bounds will be calculated from the current bounds
- Rectangle newBounds = executionSpecificationEP.getFigure().getBounds().getCopy();
-
- widthDelta = request.getSizeDelta().width;
-
- if(widthDelta != 0) {
-
- if(rDotLine.getSize().width + widthDelta < newBounds.width * 2) {
- compoundCmd.add(UnexecutableCommand.INSTANCE);
- }
-
- // Apply SizeDelta to the children
- widthDelta = Math.round(widthDelta / ((float)2 * number));
-
- newBounds.x += widthDelta;
-
- // Convert to relative
- newBounds.x -= rDotLine.x;
- newBounds.y -= rDotLine.y;
-
- SetBoundsCommand setBoundsCmd = new SetBoundsCommand(executionSpecificationEP.getEditingDomain(), "Re-location of a ExecutionSpecification due to a Lifeline movement", executionSpecificationEP, newBounds);
- compoundCmd.add(new ICommandProxy(setBoundsCmd));
- }
-
- // update the enclosing interaction of a moved execution specification
- compoundCmd.add(SequenceUtil.createUpdateEnclosingInteractionCommand(executionSpecificationEP, request.getMoveDelta(), new Dimension(widthDelta, 0)));
- }
- }
-
-// List<LifelineEditPart> innerConnectableElementList = lifelineEditPart.getInnerConnectableElementList();
-// for(LifelineEditPart lifelineEP : innerConnectableElementList) {
-// addLifelineResizeChildrenCommand(compoundCmd, request, lifelineEP, number * innerConnectableElementList.size());
-// }
- // fixed bug (id=364711) when lifeline bounds changed update coveredBys'
- // bounds.
- addUpdateInteractionFragmentsLocationCommand(compoundCmd, request,
- lifelineEditPart);
-
- }
-
- /**
- * Resize InteractionFragments if the Lifeline has CoveredBys, while
- * Lifeline moving.
- *
- * @param compoundCmd
- * @param request
- * @param lifelineEditPart
- */
- private static void addUpdateInteractionFragmentsLocationCommand(
- CompoundCommand compoundCmd, ChangeBoundsRequest request,
- LifelineEditPart lifelineEditPart) {
- View shape = (View) lifelineEditPart.getModel();
- Lifeline element = (Lifeline) shape.getElement();
- EList<InteractionFragment> covereds = element.getCoveredBys();
- EditPart parent = lifelineEditPart.getParent();
- List<?> children = parent.getChildren();
- for (Object obj : children) {
- EditPart et = (EditPart) obj;
- View sp = (View) et.getModel();
- if (!covereds.contains(sp.getElement())) {
- continue;
- }
- ChangeBoundsRequest req = new ChangeBoundsRequest(REQ_MOVE);
- req.setEditParts(et);
- req.setMoveDelta(request.getMoveDelta());
- Command command = et.getCommand(req);
- if (command != null && command.canExecute()) {
- compoundCmd.add(command);
- }
- }
- }
-
- /**
- * Handle the owning of interaction fragments when moving or resizing a CF.
- *
- * @param compoundCmd
- * The command
- * @param moveDelta
- * The move delta (given by the request).
- * @param sizeDelta
- * The size delta (given by the request).
- * @param combinedFragmentEditPart
- * The CF edit part.
- */
- @SuppressWarnings("unchecked")
- public static Command getCombinedFragmentResizeChildrenCommand(ChangeBoundsRequest request, CombinedFragmentEditPart combinedFragmentEditPart) {
- Point moveDelta = request.getMoveDelta();
- Dimension sizeDelta = request.getSizeDelta();
-
- IFigure cfFigure = combinedFragmentEditPart.getFigure();
- Rectangle origCFBounds = cfFigure.getBounds().getCopy();
-
- cfFigure.getParent().translateToAbsolute(origCFBounds);
- origCFBounds.translate(cfFigure.getParent().getBounds().getLocation());
-
- CompoundCommand compoundCmd = new CompoundCommand();
-
- // specific case for move :
- // we want the execution specifications graphically owned by the lifeline to move with the combined fragment, and the contained messages too
- if(sizeDelta.equals(0, 0)) {
- // retrieve all the edit parts in the registry
- Set<Entry<Object, EditPart>> allEditPartEntries = combinedFragmentEditPart.getViewer().getEditPartRegistry().entrySet();
- for(Entry<Object, EditPart> epEntry : allEditPartEntries) {
- EditPart ep = epEntry.getValue();
-
- // handle move of object graphically owned by the lifeline
- if(ep instanceof ShapeEditPart) {
- ShapeEditPart sep = (ShapeEditPart)ep;
- EObject elem = sep.getNotationView().getElement();
-
- if(elem instanceof InteractionFragment) {
- IFigure figure = sep.getFigure();
-
- Rectangle figureBounds = figure.getBounds().getCopy();
- figure.getParent().translateToAbsolute(figureBounds);
-
- if(origCFBounds.contains(figureBounds)) {
- EditPart parentEP = sep.getParent();
-
- if(parentEP instanceof LifelineEditPart) {
- ChangeBoundsRequest esRequest = new ChangeBoundsRequest(RequestConstants.REQ_MOVE);
- esRequest.setEditParts(sep);
- esRequest.setMoveDelta(moveDelta);
-
- Command moveESCommand = LifelineXYLayoutEditPolicy.getResizeOrMoveChildrenCommand((LifelineEditPart)parentEP, esRequest, true, false, true);
-
- if(moveESCommand != null && !moveESCommand.canExecute()) {
- // forbid move if the es can't be moved correctly
- return UnexecutableCommand.INSTANCE;
- } else if(moveESCommand != null) {
- compoundCmd.add(moveESCommand);
- }
- }
- }
-
- }
- }
-
- // handle move of messages directly attached to a lifeline
- if(ep instanceof ConnectionEditPart) {
- ConnectionEditPart cep = (ConnectionEditPart)ep;
-
- Connection msgFigure = cep.getConnectionFigure();
-
- ConnectionAnchor sourceAnchor = msgFigure.getSourceAnchor();
- ConnectionAnchor targetAnchor = msgFigure.getTargetAnchor();
-
- Point sourcePoint = sourceAnchor.getReferencePoint();
- Point targetPoint = targetAnchor.getReferencePoint();
-
- Edge edge = (Edge)cep.getModel();
-
- if(origCFBounds.contains(sourcePoint) && cep.getSource() instanceof LifelineEditPart) {
- IdentityAnchor gmfAnchor = (IdentityAnchor)edge.getSourceAnchor();
- Rectangle figureBounds = sourceAnchor.getOwner().getBounds();
- compoundCmd.add(new ICommandProxy(getMoveAnchorCommand(moveDelta.y, figureBounds, gmfAnchor)));
- }
- if(origCFBounds.contains(targetPoint) && cep.getTarget() instanceof LifelineEditPart) {
- IdentityAnchor gmfAnchor = (IdentityAnchor)edge.getTargetAnchor();
- Rectangle figureBounds = targetAnchor.getOwner().getBounds();
- compoundCmd.add(new ICommandProxy(getMoveAnchorCommand(moveDelta.y, figureBounds, gmfAnchor)));
- }
- }
-
- if (ep instanceof DurationConstraintEditPart) {
- DurationConstraintEditPart dcp = (DurationConstraintEditPart) ep;
- moveCoveredDurationConstraint(dcp, compoundCmd, origCFBounds, moveDelta);
- }
- }
-
- } else {
- // calculate the new CF bounds
- Rectangle newBoundsCF = origCFBounds.getCopy();
- newBoundsCF.translate(moveDelta);
- newBoundsCF.resize(sizeDelta);
-
- CombinedFragment cf = (CombinedFragment)((CombinedFragmentEditPart)combinedFragmentEditPart).resolveSemanticElement();
-
- if(combinedFragmentEditPart.getChildren().size() > 0 && combinedFragmentEditPart.getChildren().get(0) instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
-
- CombinedFragmentCombinedFragmentCompartmentEditPart compartment = (CombinedFragmentCombinedFragmentCompartmentEditPart)combinedFragmentEditPart.getChildren().get(0);
- List<EditPart> combinedFragmentChildrenEditParts = compartment.getChildren();
- List<InteractionOperandEditPart> interactionOperandEditParts = new ArrayList<InteractionOperandEditPart>();
-
- InteractionOperand firstOperand = cf.getOperands().get(0);
-
- // interaction fragments which will not be covered by the operands
- Set<InteractionFragment> notCoveredAnymoreInteractionFragments = new HashSet<InteractionFragment>();
- int headerHeight = 0;
-
- for(EditPart ep : combinedFragmentChildrenEditParts) {
- if(ep instanceof InteractionOperandEditPart) {
- InteractionOperandEditPart ioEP = (InteractionOperandEditPart)ep;
- InteractionOperand io = (InteractionOperand)ioEP.resolveSemanticElement();
-
- if(cf.getOperands().contains(io)) {
- interactionOperandEditParts.add(ioEP);
- // fill with all current fragments (filter later)
- notCoveredAnymoreInteractionFragments.addAll(io.getFragments());
-
- if(firstOperand.equals(io)) {
- Rectangle boundsIO = ioEP.getFigure().getBounds().getCopy();
- ioEP.getFigure().getParent().translateToAbsolute(boundsIO);
- headerHeight = boundsIO.y - origCFBounds.y;
- }
- }
- }
- }
-
- double heightRatio = (double)(newBoundsCF.height - headerHeight) / (double)(origCFBounds.height - headerHeight);
- double widthRatio = (double)newBoundsCF.width / (double)origCFBounds.width;
-
- for(InteractionOperandEditPart ioEP : interactionOperandEditParts) {
- InteractionOperand io = (InteractionOperand)ioEP.resolveSemanticElement();
-
- Rectangle newBoundsIO = SequenceUtil.getAbsoluteBounds(ioEP);
-
- // apply the move delta which will impact all operands
- newBoundsIO.translate(moveDelta);
-
- // calculate the new bounds of the interaction operand
- // scale according to the ratio
- newBoundsIO.height = (int)(newBoundsIO.height * heightRatio);
- newBoundsIO.width = (int)(newBoundsIO.width * widthRatio);
-
- if(firstOperand.equals(io)) {
- // used to compensate the height of the "header" where the OperandKind is stored
- newBoundsIO.y -= headerHeight;
- newBoundsIO.height += headerHeight;
- }
-
- // ignore current CF and enclosed IO
- Set<InteractionFragment> ignoreSet = new HashSet<InteractionFragment>();
- ignoreSet.add(cf);
- ignoreSet.addAll(cf.getOperands());
-
- Set<InteractionFragment> coveredInteractionFragments = SequenceUtil.getCoveredInteractionFragments(newBoundsIO, combinedFragmentEditPart, ignoreSet);
-
- if(coveredInteractionFragments == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- // remove fragments that are covered by this operand from the notCovered set
- notCoveredAnymoreInteractionFragments.removeAll(coveredInteractionFragments);
-
- // set the enclosing operand to the moved/resized one if the current enclosing interaction is the enclosing interaction
- // of the moved/resized operand or of another.
- // => the interaction fragment that are inside an other container (like an enclosed CF) are not modified
- for(InteractionFragment ift : coveredInteractionFragments) {
- if(!cf.equals(ift)) {
- Interaction interactionOwner = ift.getEnclosingInteraction();
- InteractionOperand ioOwner = ift.getEnclosingOperand();
-
- if((ioOwner != null && (ioOwner.equals(cf.getEnclosingOperand()) || cf.equals(ioOwner.getOwner()))) || (interactionOwner != null && (interactionOwner.equals(cf.getEnclosingInteraction()) || cf.equals(interactionOwner.getOwner())))) {
- compoundCmd.add(new ICommandProxy(SequenceUtil.getSetEnclosingInteractionCommand(ioEP.getEditingDomain(), ift, io)));
- }
- }
- }
- }
-
- for(InteractionFragment ift : notCoveredAnymoreInteractionFragments) {
- if(cf.getEnclosingOperand() != null) {
- compoundCmd.add(new ICommandProxy(SequenceUtil.getSetEnclosingInteractionCommand(combinedFragmentEditPart.getEditingDomain(), ift, cf.getEnclosingOperand())));
- } else {
- compoundCmd.add(new ICommandProxy(SequenceUtil.getSetEnclosingInteractionCommand(combinedFragmentEditPart.getEditingDomain(), ift, cf.getEnclosingInteraction())));
- }
- }
- }
- }
-
- // Print a user notification when we are not sure the command is appropriated
- EObject combinedFragment = combinedFragmentEditPart.resolveSemanticElement();
- if(combinedFragment instanceof CombinedFragment && !sizeDelta.equals(0, 0)) {
- if(((CombinedFragment)combinedFragment).getOperands().size() > 1) {
- // append a command which notifies
- Command notifyCmd = new Command() {
-
- @Override
- public void execute() {
- NotificationBuilder warning = NotificationBuilder.createAsyncPopup(Messages.Warning_ResizeInteractionOperandTitle, NLS.bind(Messages.Warning_ResizeInteractionOperandTxt, System.getProperty("line.separator")));
- warning.run();
- }
-
- @Override
- public void undo() {
- execute();
- }
- };
- if(notifyCmd.canExecute()) {
- compoundCmd.add(notifyCmd);
- }
- }
- }
- // return null instead of unexecutable empty compound command
- if(compoundCmd.isEmpty()) {
- return null;
- }
- return compoundCmd;
- }
-
- private static void moveCoveredDurationConstraint(DurationConstraintEditPart dcp, CompoundCommand compoundCmd,
- Rectangle origCFBounds, Point moveDelta) {
- Rectangle r = dcp.getFigure().getBounds().getCopy();
- dcp.getFigure().translateToAbsolute(r);
- if (origCFBounds.contains(r)) {
- //see org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy.getMoveCommand(ChangeBoundsRequest)
- IBorderItemEditPart borderItemEP = (IBorderItemEditPart) dcp;
- IBorderItemLocator borderItemLocator = borderItemEP
- .getBorderItemLocator();
- Rectangle realLocation = borderItemLocator
- .getValidLocation(dcp.getFigure().getBounds()
- .getCopy(), borderItemEP.getFigure());
-
- Point parentOrigin = borderItemEP.getFigure()
- .getParent().getBounds().getTopLeft();
- Dimension d = realLocation.getTopLeft().getDifference(
- parentOrigin);
- Point location = new Point(d.width, d.height);
- location = location.translate(0, moveDelta.y);
-
- ICommandProxy resize = new ICommandProxy(
- new SetBoundsCommand(dcp.getEditingDomain(),
- DiagramUIMessages.Commands_MoveElement,
- new EObjectAdapter((View) dcp.getModel()),
- location));
- compoundCmd.add(resize);
- }
- }
-
- private static ICommand getMoveAnchorCommand(int yDelta, Rectangle figureBounds, IdentityAnchor gmfAnchor) {
- String oldTerminal = gmfAnchor.getId();
- PrecisionPoint pp = BaseSlidableAnchor.parseTerminalString(oldTerminal);
-
- int yPos = (int)Math.round(figureBounds.height * pp.preciseY);
- yPos += yDelta;
-
- pp.preciseY = (double)yPos / figureBounds.height;
-
- if(pp.preciseY > 1.0) {
- pp.preciseY = 1.0;
- } else if(pp.preciseY < 0.0) {
- pp.preciseY = 0.0;
- }
-
- String newTerminal = (new BaseSlidableAnchor(null, pp)).getTerminal();
-
- return new SetValueCommand(new SetRequest(gmfAnchor, NotationPackage.Literals.IDENTITY_ANCHOR__ID, newTerminal));
- }
-
- /**
- * Change constraint for comportment by return null if the resize is lower than the minimun
- * size.
- */
- @Override
- protected Object getConstraintFor(ChangeBoundsRequest request, GraphicalEditPart child) {
- Rectangle rect = new PrecisionRectangle(child.getFigure().getBounds());
- child.getFigure().translateToAbsolute(rect);
- rect = request.getTransformedRectangle(rect);
- child.getFigure().translateToRelative(rect);
- rect.translate(getLayoutOrigin().getNegated());
-
- if(request.getSizeDelta().width == 0 && request.getSizeDelta().height == 0) {
- Rectangle cons = getCurrentConstraintFor(child);
- if(cons != null) {
- rect.setSize(cons.width, cons.height);
- }
- } else { // resize editpart
- boolean skipMinSize = false;
- if(child instanceof LifelineEditPart)// && LifelineResizeHelper.isManualSize((LifelineEditPart)child))
- skipMinSize = true;
-
- Dimension minSize = getMinimumSizeFor(child);
- if(rect.width < minSize.width && !skipMinSize) { // In manual mode, there is no minimal width
- return null;
- }
- if(rect.height < minSize.height ) {
- return null;
- }
- }
- rect = (Rectangle)getConstraintFor(rect);
-
- Rectangle cons = getCurrentConstraintFor(child);
- if(request.getSizeDelta().width == 0) {
- rect.width = cons.width;
- }
- if(request.getSizeDelta().height == 0) {
- rect.height = cons.height;
- }
-
- return rect;
- }
-
- /**
- * Handle mininum size for lifeline
- */
- @Override
- protected Dimension getMinimumSizeFor(GraphicalEditPart child) {
- Dimension minimunSize;
- if(child instanceof LifelineEditPart) {
- minimunSize = getMinimumSizeFor((LifelineEditPart)child);
- } else {
- minimunSize = super.getMinimumSizeFor(child);
- }
- return minimunSize;
- }
-
- /**
- * Get minimun for a lifeline
- *
- * @param child
- * The lifeline
- * @return The minimun size
- */
- private Dimension getMinimumSizeFor(LifelineEditPart child) {
- LifelineEditPart lifelineEditPart = child;
- Dimension minimunSize = lifelineEditPart.getFigure().getMinimumSize();
- for(LifelineEditPart lifelineEP : lifelineEditPart.getInnerConnectableElementList()) {
- minimunSize.union(getMinimumSizeFor(lifelineEP));
- }
- for(ShapeNodeEditPart executionSpecificationEP : lifelineEditPart.getChildShapeNodeEditPart()) {
- int minimunHeight = executionSpecificationEP.getFigure().getBounds().bottom();
- minimunSize.setSize(new Dimension(minimunSize.width, Math.max(minimunSize.height, minimunHeight)));
- }
- return minimunSize;
- }
-
- /**
- * Block adding element by movement on Interaction
- */
- @Override
- public Command getAddCommand(Request request) {
- if(request instanceof ChangeBoundsRequest) {
- return UnexecutableCommand.INSTANCE;
- }
-
- return super.getAddCommand(request);
- }
-
-
- /**
- * Overrides to change the policy of connection anchors when resizing the lifeline.
- * When resizing the lifeline, the connection must not move.
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy#getCommand(org.eclipse.gef.Request)
- */
- @SuppressWarnings("unchecked")
- @Override
- public Command getCommand(Request request) {
- if(request instanceof ChangeBoundsRequest) {
- ChangeBoundsRequest cbr = (ChangeBoundsRequest)request;
-
- int resizeDirection = cbr.getResizeDirection();
-
- CompoundCommand compoundCmd = new CompoundCommand("Resize of Interaction Compartment Elements");
-
- for(EditPart ep : (List<EditPart>)cbr.getEditParts()) {
- if(ep instanceof LifelineEditPart && isVerticalMove(cbr)) {
- // Lifeline EditPart
- LifelineEditPart lifelineEP = (LifelineEditPart)ep;
-
- int preserveY = PreserveAnchorsPositionCommand.PRESERVE_Y;
- Dimension newSizeDelta = PreserveAnchorsPositionCommand.getSizeDeltaToFitAnchors(lifelineEP, cbr.getSizeDelta(), preserveY);
-
- // SetBounds command modifying the sizeDelta
- compoundCmd.add(getSetBoundsCommand(lifelineEP, cbr, newSizeDelta));
-
- // PreserveAnchors command
- compoundCmd.add(new ICommandProxy(new LifelineEditPart.PreserveAnchorsPositionCommandEx(lifelineEP, newSizeDelta, preserveY, lifelineEP.getPrimaryShape().getFigureLifelineDotLineFigure(), resizeDirection)));
- }
- }
-
- if(compoundCmd.size() == 0) {
- return super.getCommand(request);
- } else {
- return compoundCmd;
- }
- }
-
- return super.getCommand(request);
- }
-
- /**
- * It obtains an appropriate SetBoundsCommand for a LifelineEditPart. The
- * newSizeDelta provided should be equal o less than the one contained in
- * the request. The goal of this newDelta is to preserve the anchors'
- * positions after the resize. It is recommended to obtain this newSizeDelta
- * by means of calling
- * PreserveAnchorsPositionCommand.getSizeDeltaToFitAnchors() operation
- *
- * @param lifelineEP
- * The Lifeline that will be moved or resized
- * @param cbr
- * The ChangeBoundsRequest for moving or resized the lifelineEP
- * @param newSizeDelta
- * The sizeDelta to used instead of the one contained in the
- * request
- * @return The SetBoundsCommand
- */
- @SuppressWarnings("rawtypes")
- protected Command getSetBoundsCommand(LifelineEditPart lifelineEP, ChangeBoundsRequest cbr, Dimension newSizeDelta) {
- // Modify request
- List epList = cbr.getEditParts();
- Dimension oldSizeDelta = cbr.getSizeDelta();
- cbr.setEditParts(lifelineEP);
- cbr.setSizeDelta(newSizeDelta);
-
- // Obtain the command with the modified request
- Command cmd = super.getCommand(cbr);
-
- // Restore the request
- cbr.setEditParts(epList);
- cbr.setSizeDelta(oldSizeDelta);
-
- // Return the SetBoundsCommand only for the Lifeline and with the
- // sizeDelta modified in order to preserve the links' anchors positions
- return cmd;
- }
-
- /**
- * Align lifeline in vertical direction
- * Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364688
- */
- protected Rectangle getBoundsOffest(CreateViewRequest request,
- Rectangle bounds, CreateViewRequest.ViewDescriptor viewDescriptor) {
- int translate = request.getViewDescriptors().indexOf(viewDescriptor) * 10;
- Rectangle target = bounds.getCopy().translate(translate, translate);
-
- if (((IHintedType) UMLElementTypes.Lifeline_3001).getSemanticHint()
- .equals(viewDescriptor.getSemanticHint())) {
- target.setY(SequenceUtil.LIFELINE_VERTICAL_OFFSET);
- }
-
- return target;
- }
-
- @Override
- protected void showSizeOnDropFeedback(CreateRequest request) {
- super.showSizeOnDropFeedback(request);
- if(request instanceof CreateAspectUnspecifiedTypeRequest){
- CreateAspectUnspecifiedTypeRequest req = (CreateAspectUnspecifiedTypeRequest)request;
- if(req.getElementTypes().contains(UMLElementTypes.CombinedFragment_3004) || req.getElementTypes().contains(UMLElementTypes.ConsiderIgnoreFragment_3007)){
- IFigure feedback = getSizeOnDropFeedback(request);
- Rectangle b = feedback.getBounds().getCopy();
- feedback.translateToAbsolute(b);
-
- HighlightUtil.showSizeOnDropFeedback(request, getHost(),feedback,b);
- }
- }
- }
-
- @Override
- protected void eraseSizeOnDropFeedback(Request request) {
- HighlightUtil.eraseSizeOnDropFeedback(request, getHost());
- super.eraseSizeOnDropFeedback(request);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandComponentEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandComponentEditPolicy.java
deleted file mode 100644
index 32ea7746f2e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandComponentEditPolicy.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ComponentEditPolicy;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OperandBoundsComputeHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.InteractionOperand;
-
-public class InteractionOperandComponentEditPolicy extends ComponentEditPolicy {
- /**
- * Delete Combined fragment and child from the view. Also delete message if user wants. {@inheritDoc}
- */
- @Override
- protected Command createDeleteViewCommand(GroupRequest deleteRequest) {
-
- if(getEditingDomain() != null) {
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(false);
- cmd.add(new CommandProxy(super.createDeleteViewCommand(deleteRequest)));
-
- if(getEObject() instanceof InteractionOperand) {
- // Get the elements associated with the CF
- List<Element> elements = SequenceUtil.getInteractionOperandAssociatedElement((InteractionOperand)getEObject());
- // Create the delete view commands
- SequenceDeleteHelper.deleteView(cmd, elements, getEditingDomain());
- }
-
- OperandBoundsComputeHelper.addUpdateBoundsCommandForOperandDelelete(this.getHost(),cmd);
-
- return new ICommandProxy(cmd.reduce());
- }
-
- return null;
- }
-
- /**
- * Copy from superclass as visibility is private
- *
- * @return the editing domain
- */
- private TransactionalEditingDomain getEditingDomain() {
- if(getHost() instanceof IGraphicalEditPart) {
- return ((IGraphicalEditPart)getHost()).getEditingDomain();
- } else if(getHost() instanceof IEditingDomainProvider) {
- Object domain = ((IEditingDomainProvider)getHost()).getEditingDomain();
- if(domain instanceof TransactionalEditingDomain) {
- return (TransactionalEditingDomain)domain;
- }
- }
- return null;
- }
-
- /**
- * Get the EObject of the host
- *
- * @return the EObject or null
- */
- private EObject getEObject() {
- if(getHost() instanceof GraphicalEditPart) {
- return ((GraphicalEditPart)getHost()).resolveSemanticElement();
- }
- return null;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandDragDropEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandDragDropEditPolicy.java
deleted file mode 100644
index 578ef15a6b4..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandDragDropEditPolicy.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.ResizableEditPolicy;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OperandBoundsComputeHelper;
-
-/**
- * The customn DragDropEditPolicy for InteractionOperandEditPart.
- */
-public class InteractionOperandDragDropEditPolicy extends ResizableEditPolicy {
-
- /**
- * Disable drag and allow only south resize. {@inheritDoc}
- */
- public InteractionOperandDragDropEditPolicy() {
- super();
- setDragAllowed(false);
- }
-
- /**
- * Handle resize InteractionOperand {@inheritDoc}
- */
- @Override
- protected Command getResizeCommand(ChangeBoundsRequest request) {
- if ((request.getResizeDirection() & PositionConstants.EAST_WEST) != 0) {
- EditPart parent = getHost().getParent().getParent();
- return parent.getCommand(request);
- } else{
- if (this.getHost() instanceof InteractionOperandEditPart
- && this.getHost().getParent() instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
- InteractionOperandEditPart currentIOEP = (InteractionOperandEditPart) this
- .getHost();
- CombinedFragmentCombinedFragmentCompartmentEditPart compartEP = (CombinedFragmentCombinedFragmentCompartmentEditPart) this
- .getHost().getParent();
- // if first interaction operand and resize direction is NORTH
- if(this.getHost() == OperandBoundsComputeHelper.findFirstIOEP(compartEP)&&(request.getResizeDirection() & PositionConstants.NORTH) != 0){
- return getHost().getParent().getParent().getCommand(request);
- }else{
- int heightDelta = request.getSizeDelta().height();
- if ((request.getResizeDirection() & PositionConstants.NORTH) != 0) {
- return OperandBoundsComputeHelper.createIOEPResizeCommand(currentIOEP, heightDelta,
- compartEP,PositionConstants.NORTH);
- } else if ((request.getResizeDirection() & PositionConstants.SOUTH) != 0) {
- return OperandBoundsComputeHelper.createIOEPResizeCommand(currentIOEP, heightDelta,
- compartEP,PositionConstants.SOUTH);
- }
- }
- }
- return null;
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandLayoutEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandLayoutEditPolicy.java
deleted file mode 100644
index a7b0d897b1f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandLayoutEditPolicy.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.CreateConnectionRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * The customn LayoutEditPolicy for InteractionOperandEditPart.
- */
-public class InteractionOperandLayoutEditPolicy extends XYLayoutEditPolicy {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = super.createChildEditPolicy(child);
- if(result == null) {
- return new ResizableShapeEditPolicy();
- }
- return result;
- }
-
- /**
- * Handle create InteractionOperand hover InteractionOperand {@inheritDoc}
- */
- @Override
- public Command getCommand(Request request) {
- EditPart combinedFragmentCompartment = getHost().getParent();
- EditPart combinedFragment = combinedFragmentCompartment.getParent();
- EditPart interactionCompartment = combinedFragment.getParent();
- if(REQ_CREATE.equals(request.getType()) && request instanceof CreateUnspecifiedTypeRequest) {
- if(UMLElementTypes.InteractionOperand_3005.equals(((CreateUnspecifiedTypeRequest)request).getElementTypes().get(0))) {
- return combinedFragmentCompartment.getCommand(request);
- } else if(UMLElementTypes.CombinedFragment_3004.equals(((CreateUnspecifiedTypeRequest)request).getElementTypes().get(0))) {
- return interactionCompartment.getCommand(request);
- } else if(UMLElementTypes.Lifeline_3001.equals(((CreateUnspecifiedTypeRequest)request).getElementTypes().get(0))) {
- return interactionCompartment.getCommand(request);
- }
- } else if(request instanceof CreateConnectionViewAndElementRequest) {
- CreateConnectionRequest createConnectionRequest = (CreateConnectionRequest)request;
- if(getHost().equals(createConnectionRequest.getSourceEditPart())) {
- createConnectionRequest.setSourceEditPart(combinedFragment);
- }
- if(getHost().equals(createConnectionRequest.getTargetEditPart())) {
- createConnectionRequest.setTargetEditPart(combinedFragment);
- }
- return combinedFragment.getCommand(request);
- } else if (request instanceof CreateViewAndElementRequest ) {
- //FIXME If necessary
- return null;
- }else if (REQ_RESIZE_CHILDREN.equals(request.getType())){
- return interactionCompartment.getCommand(request);
- }
- return super.getCommand(request);
- }
-
-// /**
-// * Handle combined fragment resize
-// */
-// @Override
-// protected Command getResizeChildrenCommand(ChangeBoundsRequest request) {
-// CompoundCommand compoundCmd = new CompoundCommand();
-// compoundCmd.setLabel("Move or Resize");
-//
-// for(Object o : request.getEditParts()) {
-// GraphicalEditPart child = (GraphicalEditPart)o;
-// Object constraintFor = getConstraintFor(request, child);
-// if(constraintFor != null) {
-// if(child instanceof CombinedFragmentEditPart) {
-// Command resizeChildrenCommand = InteractionCompartmentXYLayoutEditPolicy.getCombinedFragmentResizeChildrenCommand(request, (CombinedFragmentEditPart)child);
-// if(resizeChildrenCommand != null && resizeChildrenCommand.canExecute()) {
-// compoundCmd.add(resizeChildrenCommand);
-// }
-// }
-//
-// Command changeConstraintCommand = createChangeConstraintCommand(request, child, translateToModelConstraint(constraintFor));
-// compoundCmd.add(changeConstraintCommand);
-// }
-// }
-// if(compoundCmd.isEmpty()) {
-// return null;
-// }
-// return compoundCmd.unwrap();
-// }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineAppliedStereotypeNodeLabelDisplayEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineAppliedStereotypeNodeLabelDisplayEditPolicy.java
deleted file mode 100644
index 89d286192d1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineAppliedStereotypeNodeLabelDisplayEditPolicy.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-
-/**
- * This policy is used to automatically move a lifeline when a stereotype is changed.
- * this avoids the move of the dash line and its ES.
- *
- * @author mvelten
- *
- */
-public class LifelineAppliedStereotypeNodeLabelDisplayEditPolicy extends AppliedStereotypeNodeLabelDisplayEditPolicy {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void refreshDisplay() {
- super.refreshDisplay();
-
- if(getHost() instanceof LifelineEditPart) {
- ((LifelineEditPart)getHost()).updateLifelinePosition();
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java
deleted file mode 100644
index e8174e2c052..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineChildGraphicalNodeEditPolicy.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionRouter;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.Polyline;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.CreateConnectionRequest;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.papyrus.uml.diagram.sequence.draw2d.routers.MessageRouter;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OccurrenceSpecificationMoveHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-
-/**
- * A specific policy to handle :
- * - Message aspects inherited from {@link SequenceGraphicalNodeEditPolicy}.
- * - Time/duration move when a message end or an execution is moved.
- * - Duration constraint/observation creation feedback.
- * - Creation of general ordering links.
- * This edit policy is intended to be installed on parts which represent a lifeline or which are contained within a lifeline part.
- */
-public class LifelineChildGraphicalNodeEditPolicy extends SequenceGraphicalNodeEditPolicy {
-
- /** the feedback for creating a duration constraint node */
- private Polyline durationCreationFeedback = null;
-
- /** the router to use for messages */
- public static ConnectionRouter messageRouter = new MessageRouter();
-
- @Override
- public Command getCommand(Request request) {
- if(RequestConstants.REQ_CONNECTION_START.equals(request.getType())) {
- if(request instanceof CreateConnectionViewAndElementRequest) {
- return getConnectionAndRelationshipCreateCommand((CreateConnectionViewAndElementRequest)request);
- } else if(request instanceof CreateUnspecifiedTypeConnectionRequest) {
- return getUnspecifiedConnectionCreateCommand((CreateUnspecifiedTypeConnectionRequest)request);
- }
- } else if(RequestConstants.REQ_CONNECTION_END.equals(request.getType())) {
- if(request instanceof CreateConnectionViewAndElementRequest) {
- return getConnectionAndRelationshipCompleteCommand((CreateConnectionViewAndElementRequest)request);
- } else if(request instanceof CreateUnspecifiedTypeConnectionRequest) {
- return getUnspecifiedConnectionCompleteCommand((CreateUnspecifiedTypeConnectionRequest)request);
- }
- }
- return super.getCommand(request);
- }
-
- /**
- * Gets the command to start the creation of a new connection and
- * relationship (if applicable) for a unspecified type request. This will
- * update all the individual requests appropriately.
- *
- * @param request
- * the unspecified type request
- * @return the command
- */
- private Command getUnspecifiedConnectionCreateCommand(final CreateUnspecifiedTypeConnectionRequest request) {
-
- if(request.isDirectionReversed()) {
- return new Command() {
-
- /**
- * All we know is the target and the possible relationship
- * types. At this point, there is no way to validate the
- * commands for this scenario.
- */
- public boolean canExecute() {
- return true;
- }
- };
- } else {
-
- // Get the start command for each individual request, this will
- // update each request as required.
- final List commands = new ArrayList();
- for(Iterator iter = request.getAllRequests().iterator(); iter.hasNext();) {
- Request individualRequest = (Request)iter.next();
- Command cmd = null;
- if(individualRequest instanceof CreateConnectionViewAndElementRequest) {
- cmd = getConnectionAndRelationshipCreateCommand((CreateConnectionViewAndElementRequest)individualRequest);
- } else if(individualRequest instanceof CreateConnectionViewRequest) {
- cmd = getConnectionCreateCommand((CreateConnectionViewRequest)individualRequest);
- }
- if(cmd != null && cmd.canExecute()) {
- commands.add(cmd);
- }
- }
-
- if(commands.isEmpty()) {
- // GEF's AbstractConnectionCreationTool expects a null command
- // when the gesture should be disabled.
- return null;
- }
-
- // return an executable command that does nothing
- return new Command() {/* do nothing */
- };
- }
- }
-
- /**
- * Get the command to reconnect the source and move associated time/duration constraints/observation.
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy#getReconnectSourceCommand(org.eclipse.gef.requests.ReconnectRequest)
- *
- * @param request
- * the reconnection request
- * @return the command
- */
- @Override
- protected Command getReconnectSourceCommand(ReconnectRequest request) {
- Command command = super.getReconnectSourceCommand(request);
- if(command != null) {
- command = OccurrenceSpecificationMoveHelper.completeReconnectConnectionCommand(command, request, getConnectableEditPart());
- if(request.getConnectionEditPart() instanceof Message4EditPart && request.getTarget() instanceof LifelineEditPart){
- LifelineEditPart newSource = (LifelineEditPart) request.getTarget();
- LifelineEditPart target = (LifelineEditPart) request.getConnectionEditPart().getTarget();
- command = LifelineMessageCreateHelper.moveLifelineDown(command, target, newSource.getFigure().getBounds().getLocation().getCopy());
- }
- }
- return command;
- }
-
- /**
- * Get the command to reconnect the target and move associated time/duration constraints/observation.
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy#getReconnectTargetCommand(org.eclipse.gef.requests.ReconnectRequest)
- *
- * @param request
- * the reconnection request
- * @return the command
- */
- @Override
- protected Command getReconnectTargetCommand(ReconnectRequest request) {
- Command command = super.getReconnectTargetCommand(request);
- if(command != null) {
- command = OccurrenceSpecificationMoveHelper.completeReconnectConnectionCommand(command, request, getConnectableEditPart());
- if(request.getConnectionEditPart() instanceof Message4EditPart && request.getTarget() instanceof LifelineEditPart){
- command = LifelineMessageCreateHelper.reconnectMessageCreateTarget(request, command);
- }
- }
- return command;
- }
-
- /**
- * Show the feedback for creating a duration constraint from this edit part
- *
- * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#showSourceFeedback(org.eclipse.gef.Request)
- * @param request
- * creation request
- */
- @Override
- public void showSourceFeedback(Request request) {
- if(request instanceof CreateUnspecifiedTypeRequest) {
- Object hintedType = ((CreateUnspecifiedTypeRequest)request).getElementTypes().get(0);
- CreateRequest req = null;
- if(UMLElementTypes.DurationConstraint_3021.equals(hintedType)) {
- req = ((CreateUnspecifiedTypeRequest)request).getRequestForType(UMLElementTypes.DurationConstraint_3021);
- } else if(UMLElementTypes.DurationObservation_3024.equals(hintedType)) {
- req = ((CreateUnspecifiedTypeRequest)request).getRequestForType(UMLElementTypes.DurationObservation_3024);
- }
- if(req != null) {
- Object initLocation = req.getExtendedData().get(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION);
- if(initLocation instanceof Point) {
- Point startPoint = ((Point)initLocation).getCopy();
- Point targetPoint = ((CreateUnspecifiedTypeRequest)request).getLocation().getCopy();
- getFeedbackLayer().translateToRelative(startPoint);
- getFeedbackLayer().translateToRelative(targetPoint);
- if(durationCreationFeedback == null) {
- durationCreationFeedback = new Polyline();
- durationCreationFeedback.setLineWidth(1);
- durationCreationFeedback.setLineStyle(Graphics.LINE_DASHDOT);
- durationCreationFeedback.setForegroundColor(((IGraphicalEditPart)getHost()).getFigure().getLocalForegroundColor());
- addFeedback(durationCreationFeedback);
- }
- durationCreationFeedback.setStart(startPoint);
- durationCreationFeedback.setEnd(targetPoint);
- return;
- }
- }
- }
- super.showSourceFeedback(request);
- }
-
- /**
- * Erase the feedback for creating a duration constraint from this edit part
- *
- * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#eraseSourceFeedback(org.eclipse.gef.Request)
- * @param request
- * creation request
- */
- @Override
- public void eraseSourceFeedback(Request request) {
- super.eraseSourceFeedback(request);
- if(durationCreationFeedback != null)
- removeFeedback(durationCreationFeedback);
- durationCreationFeedback = null;
- }
-
- /**
- * Get the replacing connection router for routing messages correctly
- *
- * @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#getDummyConnectionRouter(org.eclipse.gef.requests.CreateConnectionRequest)
- */
- protected ConnectionRouter getDummyConnectionRouter(CreateConnectionRequest req) {
- return messageRouter;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineCreationEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineCreationEditPolicy.java
deleted file mode 100644
index 81273970770..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineCreationEditPolicy.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SemanticCreateCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
-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.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RefreshConnectionsRequest;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure;
-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.SequenceUtil;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * A specific creation edit policy for the Lifeline.
- * Execution Specification is created graphically on the lifeline, but depending on its graphical position determines also its model container.
- *
- * Occurrence Specification is located on the lifeline, but not visible. Though, elements must be created on it.
- */
-public class LifelineCreationEditPolicy extends CreationEditPolicy {
-
- @Override
- protected Command getCreateElementAndViewCommand(CreateViewAndElementRequest request) {
- // get the element descriptor
- CreateElementRequestAdapter requestAdapter = request.getViewAndElementDescriptor().getCreateElementRequestAdapter();
-
- // get the semantic request
- CreateElementRequest createElementRequest = (CreateElementRequest)requestAdapter.getAdapter(CreateElementRequest.class);
-
- if(createElementRequest.getContainer() == null) {
- // complete the semantic request by filling in the host's semantic
- // element as the context
- View view = (View)getHost().getModel();
- EObject hostElement = ViewUtil.resolveSemanticElement(view);
-
- if(hostElement == null && view.getElement() == null) {
- hostElement = view;
- }
-
- // Returns null if host is unresolvable so that trying to create a
- // new element in an unresolved shape will not be allowed.
- if(hostElement == null) {
- return null;
- }
- createElementRequest.setContainer(hostElement);
- }
-
- InteractionFragment ift = SequenceUtil.findInteractionFragmentContainerAt(request.getLocation(), getHost());
-
- Map<String, Object> extendedData = request.getExtendedData();
- extendedData.put(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER, ift);
-
- // record the nearest event if necessary
- String requestHint = request.getViewAndElementDescriptor().getSemanticHint();
- if(isCreatedOnOccurrenceSpecification(requestHint)) {
- EditPart hostPart = getHost();
- if(hostPart instanceof LifelineEditPart) {
- Entry<Point, List<OccurrenceSpecification>> eventAndLocation = SequenceUtil.findNearestEvent(request.getLocation(), (LifelineEditPart)hostPart);
- // find an event near enough to create the constraint or observation
- List<OccurrenceSpecification> events = Collections.emptyList();
- Point location = null;
- if(eventAndLocation != null) {
- location = eventAndLocation.getKey();
- events = eventAndLocation.getValue();
- }
- if(extendedData.containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2)) {
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2, events);
- } else {
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
- }
- if(extendedData.containsKey(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2)) {
- extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2, location);
- } else {
- extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION, location);
- }
- }
- }
-
- // get the create element command based on the elementdescriptor's
- // request
- Command createElementCommand = getHost().getCommand(new EditCommandRequestWrapper((CreateElementRequest)requestAdapter.getAdapter(CreateElementRequest.class), request.getExtendedData()));
-
- if(createElementCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- if(!createElementCommand.canExecute()) {
- return createElementCommand;
- }
- // create the semantic create wrapper command
- SemanticCreateCommand semanticCommand = new SemanticCreateCommand(requestAdapter, createElementCommand);
- Command viewCommand = getCreateCommand(request);
-
- Command refreshConnectionCommand = getHost().getCommand(new RefreshConnectionsRequest(((List)request.getNewObject())));
-
-
- // form the compound command and return
- CompositeCommand cc = new CompositeCommand(semanticCommand.getLabel());
- cc.compose(semanticCommand);
- cc.compose(new CommandProxy(viewCommand));
- if(refreshConnectionCommand != null) {
- cc.compose(new CommandProxy(refreshConnectionCommand));
- }
-
- LifelineEditPart parentPart = (LifelineEditPart)getHost();
- IHintedType type = (IHintedType)UMLElementTypes.Lifeline_3001;
- if(type.getSemanticHint().equals(request.getViewAndElementDescriptor().getSemanticHint())) {
- setChildLifelineBounds(cc, request, parentPart);
- }
-
- return new ICommandProxy(cc);
- }
-
- private void setChildLifelineBounds(CompositeCommand cc, CreateViewAndElementRequest request, LifelineEditPart parentPart) {
- Point location = request.getLocation().getCopy();
- LifelineDotLineCustomFigure parentFigure = (LifelineDotLineCustomFigure) parentPart.getContentPane();
- Rectangle parentBounds = parentFigure.getBounds().getCopy();
- parentFigure.translateToAbsolute(parentBounds );
-
- Rectangle childBounds = parentBounds.getCopy();
- childBounds.height = parentBounds.height;
- childBounds.width = -1; // default size
- childBounds.y = 0; // y offset from parent
- childBounds.x = location.x - parentBounds.x; // x offset from parent
-
- SetBoundsCommand cmd = new SetBoundsCommand(parentPart.getEditingDomain(), "set size", request.getViewAndElementDescriptor(), childBounds);
- cc.compose(cmd);
- }
-
- /**
- * Return true if creation must be performed on an occurrence specification
- *
- * @param requestHint
- * the hint of object to create
- * @return true if creation on an occurrence specification
- */
- private boolean isCreatedOnOccurrenceSpecification(String requestHint) {
- return isTimeHint(requestHint) || isDurationHint(requestHint);
- }
-
- /**
- * Return true if hint is for creating a duration observation/constraint
- *
- * @param requestHint
- * the hint of object to create
- * @return true if correct hint
- */
- private boolean isDurationHint(String requestHint) {
- String durCstOnLifelineHint = ((IHintedType)UMLElementTypes.DurationConstraint_3021).getSemanticHint();
- String durCstOnMessage = ((IHintedType)UMLElementTypes.DurationConstraint_3023).getSemanticHint();
- String durObsOnMessage = ((IHintedType)UMLElementTypes.DurationObservation_3024).getSemanticHint();
- return durCstOnLifelineHint.equals(requestHint) || durCstOnMessage.equals(requestHint) || durObsOnMessage.equals(requestHint);
- }
-
- /**
- * Return true if hint is for creating a time observation/constraint
- *
- * @param requestHint
- * the hint of object to create
- * @return true if correct hint
- */
- private boolean isTimeHint(String requestHint) {
- String timeConstraintHint = ((IHintedType)UMLElementTypes.TimeConstraint_3019).getSemanticHint();
- String timeObservationHint = ((IHintedType)UMLElementTypes.TimeObservation_3020).getSemanticHint();
- return timeConstraintHint.equals(requestHint) || timeObservationHint.equals(requestHint);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineLabelEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineLabelEditPolicy.java
deleted file mode 100644
index 76a3aaf1bb9..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineLabelEditPolicy.java
+++ /dev/null
@@ -1,207 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.preferences.LifelinePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineLabelHelper;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLPackage;
-
-
-public class LifelineLabelEditPolicy extends AbstractMaskManagedEditPolicy {
-
- private IPropertyChangeListener preferenceListener;
-
- @Override
- public void addAdditionalListeners() {
- super.addAdditionalListeners();
-
- if(preferenceListener == null){
- preferenceListener = new IPropertyChangeListener() {
-
- public void propertyChange(PropertyChangeEvent event) {
- handlePreferenceChange(event);
- }
- };
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- store.addPropertyChangeListener(this.preferenceListener);
- }
-
- Lifeline lifeline = getUMLElement();
- // check host semantic element is not null
- if(lifeline == null) {
- return;
- }
- // adds a listener to the element itself, and to linked elements, like Type
- getDiagramEventBroker().addNotificationListener(lifeline, this);
-
- ConnectableElement ce = lifeline.getRepresents();
- if(ce != null){
- getDiagramEventBroker().addNotificationListener(ce, this);
- if(ce.getType() != null)
- getDiagramEventBroker().addNotificationListener(ce.getType(), this);
- }
- }
-
- protected void handlePreferenceChange(PropertyChangeEvent event) {
- EditPart part = getHost();
- if(part == null || part.getParent() == null)
- return;
-
- String key = event.getProperty();
- if(key.equals(LifelinePreferencePage.LABEL_DISPLAY_PREFERENCE)){
- refreshDisplay();
- }
- }
-
- @Override
- protected void removeAdditionalListeners() {
- super.removeAdditionalListeners();
- Lifeline lifeline = getUMLElement();
- // check host semantic element is not null
- if(lifeline == null) {
- return;
- }
- getDiagramEventBroker().removeNotificationListener(lifeline, this);
-
- ConnectableElement ce = lifeline.getRepresents();
- if(ce != null){
- getDiagramEventBroker().removeNotificationListener(ce, this);
- if(ce.getType() != null)
- getDiagramEventBroker().removeNotificationListener(ce.getType(), this);
- }
- }
-
- public void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
-
- Object object = notification.getNotifier();
- if(object == null || getUMLElement() == null) {
- return;
- }
-
- if(notification.getFeature().equals(UMLPackage.eINSTANCE.getNamedElement_Name())) {
- refreshDisplay();
- } else if(notification.getFeature().equals(UMLPackage.Literals.LIFELINE__REPRESENTS)) {
- // change represent element
- if(notification.getNewValue() instanceof ConnectableElement){
- ConnectableElement ce = (ConnectableElement )notification.getNewValue();
- getDiagramEventBroker().addNotificationListener(ce, this);
- if(ce.getType() != null)
- getDiagramEventBroker().addNotificationListener(ce.getType(), this);
- }
-
- if(notification.getOldValue() instanceof ConnectableElement){
- ConnectableElement ce = (ConnectableElement )notification.getOldValue();
- getDiagramEventBroker().removeNotificationListener(ce, this);
-
- if(ce.getType() != null)
- getDiagramEventBroker().removeNotificationListener(ce.getType(), this);
- }
-
- refreshDisplay();
- }else if(isMaskManagedAnnotation(object) || isRemovedMaskManagedLabelAnnotation(object, notification)) {
- refreshDisplay();
- } else if(object.equals(getUMLElement().getRepresents()) ){
- // change represent type
- if(notification.getNewValue() instanceof Type && notification.getNewValue() instanceof EObject){
- getDiagramEventBroker().addNotificationListener((EObject)notification.getNewValue(), this);
- }
-
- if(notification.getOldValue() instanceof Type && notification.getOldValue() instanceof EObject){
- getDiagramEventBroker().removeNotificationListener((EObject)notification.getOldValue(), this);
- }
-
- refreshDisplay();
- }
- }
-
-
- public void refreshDisplay() {
- // calls the helper for this edit Part
- LifelineEditPart lp = (LifelineEditPart)getHost();
- List children = lp.getChildren();
- for(Object p : children)
- if(p instanceof LifelineNameEditPart)
- LifelineLabelHelper.getInstance().refreshEditPartDisplay((GraphicalEditPart)p);
- }
-
- public int getCurrentDisplayValue() {
- EAnnotation customeDisplayAnnotation = ((View)getHost().getModel()).getEAnnotation(VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION);
- int displayValue = getDefaultDisplayValue();
- if(customeDisplayAnnotation != null && customeDisplayAnnotation.getDetails().get(VisualInformationPapyrusConstants.CUSTOM_APPEARANCE_MASK_VALUE) != null) {
- displayValue = Integer.parseInt(customeDisplayAnnotation.getDetails().get(VisualInformationPapyrusConstants.CUSTOM_APPEARANCE_MASK_VALUE));
- } else {
- // no specific information => look in preferences
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- int displayValueTemp = store.getInt(LifelinePreferencePage.LABEL_DISPLAY_PREFERENCE);
- if(displayValueTemp != 0) {
- displayValue = displayValueTemp;
- }
- }
- return displayValue;
- }
-
- public int getDefaultDisplayValue() {
- return LifelinePreferencePage.DEFAULT_LABEL_DISPLAY;
- }
-
- public String getMaskLabel(int value) {
- return LifelineLabelHelper.getInstance().getMaskLabel(value);
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<String> getMaskLabels() {
- return LifelineLabelHelper.getInstance().getMaskLabels();
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<Integer, String> getMasks() {
- return LifelineLabelHelper.getInstance().getMasks();
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<Integer> getMaskValues() {
- return LifelineLabelHelper.getInstance().getMaskValues();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPreferencePageID() {
- return "org.eclipse.papyrus.uml.diagram.sequence.preferences.LifelinePreferencePage";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Lifeline getUMLElement() {
- return (Lifeline)hostSemanticElement;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineXYLayoutEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineXYLayoutEditPolicy.java
deleted file mode 100644
index 876f6034ff2..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineXYLayoutEditPolicy.java
+++ /dev/null
@@ -1,927 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.requests.CreateRequest;
-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.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-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.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.commands.PreserveAnchorsPositionCommand;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.LifelineDotLineFigure;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomZOrderCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart.StateInvariantResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.HighlightUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OccurrenceSpecificationMoveHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-
-/**
- * The custom LayoutEditPolicy for LifelineEditPart.
- */
-public class LifelineXYLayoutEditPolicy extends XYLayoutEditPolicy {
-
- /** Initialization width of Execution Specification. */
- public final static int EXECUTION_INIT_WIDTH = 16;
-
- /** Initialization width of CoRegion. */
- public final static int COREGION_INIT_WIDTH = 30;
-
- /** Initialization height of Execution Specification. */
- private final static int EXECUTION_INIT_HEIGHT = 50;
-
- /** Initialization height of a time bar figure. */
- private static final int TIME_BAR_HEIGHT = 1;
-
- /** The default spacing used between Execution Specification */
- private final static int SPACING_HEIGHT = 5;
-
- // force location of time/duration elements and ES
- private static final String TIME_CONSTRAINT_HINT = ((IHintedType)UMLElementTypes.TimeConstraint_3019).getSemanticHint();
-
- private static final String TIME_OBSERVATION_HINT = ((IHintedType)UMLElementTypes.TimeObservation_3020).getSemanticHint();
-
- private static final String DURATION_CONSTRAINT_ON_LIFELINE_HINT = ((IHintedType)UMLElementTypes.DurationConstraint_3021).getSemanticHint();
-
- private static final String ACTION_EXECUTION_SPECIFICATION_HINT = ((IHintedType)UMLElementTypes.ActionExecutionSpecification_3006).getSemanticHint();
-
- private static final String BEHAVIOR_EXECUTION_SPECIFICATION_HINT = ((IHintedType)UMLElementTypes.BehaviorExecutionSpecification_3003).getSemanticHint();
-
- private static final String CO_REGION_HINT = ((IHintedType)UMLElementTypes.CombinedFragment_3018).getSemanticHint();
-
- private HighlightUtil highlightUtil = new HighlightUtil();
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- if(request instanceof CreateViewRequest) {
- CreateViewRequest cvr = (CreateViewRequest)request;
- if(cvr.getViewDescriptors().size() > 0) {
- ViewDescriptor viewDescriptor = cvr.getViewDescriptors().iterator().next();
- String semanticHint = viewDescriptor.getSemanticHint();
-
- if(TIME_CONSTRAINT_HINT.equals(semanticHint) || TIME_OBSERVATION_HINT.equals(semanticHint)) {
- Command cmd = getCommandForTimeObservationOrConstraint(cvr, viewDescriptor);
- if(cmd != null) {
- return cmd;
- }
- }
- if(DURATION_CONSTRAINT_ON_LIFELINE_HINT.equals(semanticHint)) {
- Command cmd = getCommandForDurationConstraint(cvr, viewDescriptor);
- if(cmd != null) {
- return cmd;
- }
- }
- if(ACTION_EXECUTION_SPECIFICATION_HINT.equals(semanticHint) || BEHAVIOR_EXECUTION_SPECIFICATION_HINT.equals(semanticHint)) {
- Command cmd = getCommandForExecutionSpecificationCreation(cvr, viewDescriptor);
- if(cmd != null) {
- return cmd;
- }
- }
- if(CO_REGION_HINT.equals(semanticHint)) {
- Command cmd = getCommandForCoRegionCreation(cvr, viewDescriptor);
- if(cmd != null) {
- return cmd;
- }
- }
- }
- }
-
- return super.getCreateCommand(request);
- }
-
- @Override
- protected void showLayoutTargetFeedback(Request request) {
- if(request instanceof CreateUnspecifiedTypeRequest) {
- CreateUnspecifiedTypeRequest cvr = (CreateUnspecifiedTypeRequest)request;
- if(!cvr.getElementTypes().isEmpty()) {
- IHintedType elementType = (IHintedType)cvr.getElementTypes().iterator().next();
- String semanticHint = elementType.getSemanticHint();
- EditPart editPartForHighlight = getHost();
- if(ACTION_EXECUTION_SPECIFICATION_HINT.equals(semanticHint) || BEHAVIOR_EXECUTION_SPECIFICATION_HINT.equals(semanticHint)) {
- ShapeNodeEditPart parentExecuteSpecification = getParentWhenCreationExecuteSpecification(cvr.getLocation(), cvr.getSize(), semanticHint);
- if(parentExecuteSpecification != null) {
- editPartForHighlight = parentExecuteSpecification;
- }
- }
- if(editPartForHighlight != null) {
- highlightUtil.unhighlight();
- highlightUtil.highlight(editPartForHighlight);
- }
- }
- }
- super.showLayoutTargetFeedback(request);
- }
-
- @Override
- protected void eraseLayoutTargetFeedback(Request request) {
- super.eraseLayoutTargetFeedback(request);
- highlightUtil.unhighlight();
- }
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View)child.getModel();
- switch(UMLVisualIDRegistry.getVisualID(childView)) {
- case StateInvariantEditPart.VISUAL_ID:
- return new StateInvariantResizableEditPolicy();
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- return super.createChildEditPolicy(child);
- }
-
- @Override
- protected Rectangle getCurrentConstraintFor(GraphicalEditPart child) {
- IFigure fig = child.getFigure();
- Object con = fig.getParent().getLayoutManager().getConstraint(fig);
- if(con instanceof Rectangle) {
- return (Rectangle)con;
- }
- return fig.getBounds();
- }
-
- @Override
- protected Object getConstraintFor(CreateRequest request) {
- Rectangle constraint = (Rectangle)super.getConstraintFor(request);
- if(request instanceof CreateViewAndElementRequest) {
- CreateViewAndElementRequest req = (CreateViewAndElementRequest)request;
- IHintedType type = (IHintedType)UMLElementTypes.Lifeline_3001;
- if(type.getSemanticHint().equals(req.getViewAndElementDescriptor().getSemanticHint())) {
- constraint.y = 0; // fix layout offset
- }
-
- String destructionHint = ((IHintedType)UMLElementTypes.DestructionOccurrenceSpecification_3022).getSemanticHint();
- if(destructionHint.equals(req.getViewAndElementDescriptor().getSemanticHint()) && constraint.width < 0 && constraint.height < 0) {
- constraint.width = constraint.height = 20;// set initial size, same as DestructionOccurrenceSpecificationPreferencePage
- }
- }
- return constraint;
- }
-
- private static Rectangle getNewBoundsForCoRegion(LifelineEditPart lifelineEP, Rectangle bounds) {
- Rectangle newBounds = bounds.getCopy();
-
- // Get the dotline figure
- LifelineDotLineFigure figureLifelineDotLineFigure = lifelineEP.getPrimaryShape().getFigureLifelineDotLineFigure();
-
- // Translate the absolute location to relative
- figureLifelineDotLineFigure.translateToRelative(newBounds);
- newBounds.translate(figureLifelineDotLineFigure.getBounds().getLocation().getCopy().negate());
-
- Rectangle dotLineFigureBounds = figureLifelineDotLineFigure.getBounds();
-
- newBounds.x = dotLineFigureBounds.width / 2 - COREGION_INIT_WIDTH / 2;
- newBounds.width = COREGION_INIT_WIDTH;
-
- return newBounds;
- }
-
- private Command getCommandForCoRegionCreation(CreateViewRequest cvr, ViewDescriptor viewDescriptor) {
- Rectangle newBounds = new Rectangle();
- if(cvr.getLocation() != null) {
- newBounds.setLocation(cvr.getLocation());
- }
- if(cvr.getSize() != null) {
- newBounds.setSize(cvr.getSize());
- } else {
- newBounds.width = -1;
- newBounds.height = -1;
- }
-
- if(newBounds.x < 0 || newBounds.y < 0) {
- newBounds.x = newBounds.y = 0;
- }
-
- newBounds = getNewBoundsForCoRegion((LifelineEditPart)getHost(), newBounds);
-
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
- return new ICommandProxy(new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, viewDescriptor, newBounds));
- }
-
- private Rectangle getCreateExecuteSpecificationBounds(Point location, Dimension size, String semanticHint) {
- Point newLocation = location == null ? new Point() : location.getCopy();
-
- if(newLocation.x < 0 || newLocation.y < 0) {
- newLocation.x = newLocation.y = 0;
- }
-
- LifelineEditPart editPart = (LifelineEditPart)getHost();
-
- // Get the dotline figure
- LifelineDotLineFigure figureLifelineDotLineFigure = editPart.getPrimaryShape().getFigureLifelineDotLineFigure();
- List<ShapeNodeEditPart> executionSpecificationList = editPart.getChildShapeNodeEditPart();
-
- // Translate the absolute location to relative
- figureLifelineDotLineFigure.translateToRelative(newLocation);
-
- Rectangle dotLineFigureBounds = figureLifelineDotLineFigure.getBounds();
- // If we are creating an ES from the popup menu bar
- // We need to get a valid location to be able to create the ES figure
- if(newLocation.y < dotLineFigureBounds.y) {
- int max = dotLineFigureBounds.y;
- for(ShapeNodeEditPart sp : executionSpecificationList) {
- int figureBottom = sp.getFigure().getBounds().y + sp.getFigure().getBounds().height;
- if(figureBottom > max) {
- max = figureBottom;
- }
- }
- // Vertically, the new ES is located after all existing ES on the lifeline
- newLocation.y = max + SPACING_HEIGHT;
- // Horizontally, the figure is placed at the center of the lifeline
- newLocation.x = dotLineFigureBounds.x + dotLineFigureBounds.width / 2 - EXECUTION_INIT_WIDTH / 2;
- }
-
- // Get the height of the Execution specification
- int newHeight = getFigureHeight(semanticHint, size);
-
- // Define the bounds of the new Execution specification
- return new Rectangle(newLocation.x, newLocation.y, -1, newHeight);
- }
-
- private ShapeNodeEditPart getParentWhenCreationExecuteSpecification(Point location, Dimension size, String semanticHint) {
-
- // Define the bounds of the new Execution specification
- Rectangle newBounds = getCreateExecuteSpecificationBounds(location, size, semanticHint);
- // Get the dotline figure
- List<ShapeNodeEditPart> executionSpecificationList = ((LifelineEditPart)getHost()).getChildShapeNodeEditPart();
-
- return getParent((LifelineEditPart)getHost(), newBounds, executionSpecificationList);
- }
-
- private Command getCommandForExecutionSpecificationCreation(CreateViewRequest cvr, ViewDescriptor viewDescriptor) {
-
- LifelineEditPart editPart = (LifelineEditPart)getHost();
-
- List<ShapeNodeEditPart> executionSpecificationList = editPart.getChildShapeNodeEditPart();
-
- Point location = cvr.getLocation();
- Dimension size = cvr.getSize();
- String semanticHint = viewDescriptor.getSemanticHint();
-
- // Define the bounds of the new Execution specification
- Rectangle newBounds = getCreateExecuteSpecificationBounds(location, size, semanticHint);
- ShapeNodeEditPart parent = getParentWhenCreationExecuteSpecification(location, size, semanticHint);
- newBounds = getExecutionSpecificationNewBounds(true, editPart, new Rectangle(), newBounds, new ArrayList<ShapeNodeEditPart>(0), false);
- if(newBounds == null) {
- return UnexecutableCommand.INSTANCE;
- }
- Command p = new ICommandProxy(new SetBoundsCommand(editPart.getEditingDomain(), "Creation of an ExecutionSpecification", viewDescriptor, newBounds));
-
- // resize parent bar
- if(parent != null) {
- p = p.chain(resizeParentExecutionSpecification((LifelineEditPart)getHost(), parent, newBounds.getCopy(), executionSpecificationList));
- }
- return p;
- }
-
- private static Command resizeParentExecutionSpecification(LifelineEditPart lifelinePart, ShapeNodeEditPart part, Rectangle childBounds, List<ShapeNodeEditPart> list) {
- Rectangle bounds = getRelativeBounds(part.getFigure());
-
- childBounds.x = bounds.x;
- childBounds.width = bounds.width;
- if(bounds.contains(childBounds)) {
- return null;
- }
- bounds.union(childBounds);
- Command c = new ICommandProxy(new SetBoundsCommand(part.getEditingDomain(), "Resize of Parent Bar", part, bounds.getCopy()));
-
- list.remove(part);
- ShapeNodeEditPart parent = getParent(lifelinePart, part.getFigure().getBounds(), list);
- if(parent == null) {
- return c;
- }
-
- return c.chain(resizeParentExecutionSpecification(lifelinePart, parent, bounds.getCopy(), list));
- }
-
- /**
- * Get the command for setting initial bounds of a Time Observation or Constraint representation
- *
- * @param cver
- * the request
- * @return command or null if none is appropriate
- */
- private Command getCommandForTimeObservationOrConstraint(CreateViewRequest cvr, ViewDescriptor viewDescriptor) {
- Object loc = cvr.getExtendedData().get(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION);
- if(loc instanceof Point) {
- IFigure parentFigure = ((IGraphicalEditPart)getHost()).getFigure();
- Point referencePoint = ((Point)loc).getCopy();
- parentFigure.translateToRelative(referencePoint);
- referencePoint.translate(parentFigure.getBounds().getLocation().getCopy().negate());
- // Get the height of the element
- int newHeight = getFigureHeight(viewDescriptor.getSemanticHint(), cvr.getSize());
- // Define the bounds of the new time element
- Rectangle newBounds = new Rectangle(referencePoint.x, referencePoint.y - newHeight / 2, -1, newHeight);
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
- return new ICommandProxy(new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, viewDescriptor, newBounds));
- }
- return null;
- }
-
- /**
- * Get the command for setting initial bounds of a Duration Constraint representation
- *
- * @param cver
- * the request
- * @return command or null if none is appropriate
- */
- private Command getCommandForDurationConstraint(CreateViewRequest cvr, ViewDescriptor viewDescriptor) {
- Object locTop = cvr.getExtendedData().get(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION);
- Object locBottom = cvr.getExtendedData().get(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2);
- if(locTop instanceof Point && locBottom instanceof Point) {
- IFigure parentFigure = ((IGraphicalEditPart)getHost()).getFigure();
- Point referenceTop = ((Point)locTop).getCopy();
- Point referenceBottom = ((Point)locBottom).getCopy();
- // Get the height of the element
- int newHeight = referenceBottom.y - referenceTop.y;
- if(newHeight > 0) {
- parentFigure.translateToRelative(referenceTop);
- Point parentFigDelta = parentFigure.getBounds().getLocation().getCopy().negate();
- referenceTop.translate(parentFigDelta);
- // Define the bounds of the new time element
- Rectangle newBounds = new Rectangle(referenceTop.x, referenceTop.y, -1, newHeight);
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
- return new ICommandProxy(new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, viewDescriptor, newBounds));
- } else if(newHeight < 0) {
- parentFigure.translateToRelative(referenceBottom);
- Point parentFigDelta = parentFigure.getBounds().getLocation().getCopy().negate();
- referenceBottom.translate(parentFigDelta);
- // Define the bounds of the new time element
- Rectangle newBounds = new Rectangle(referenceBottom.x, referenceBottom.y, -1, -newHeight);
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
- return new ICommandProxy(new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, viewDescriptor, newBounds));
- }
- }
- return null;
- }
-
- /**
- * Get the adapted height, taking in account the represented figure
- *
- * @param cr
- * the create request
- * @return the height defined in the create request or a default value depending on the created figure
- */
- private int getFigureHeight(String semanticHint, Dimension size) {
- int newHeight;
- if(TIME_OBSERVATION_HINT.equals(semanticHint) || TIME_CONSTRAINT_HINT.equals(semanticHint)) {
- // height for a time bar (takes precedence on request's size)
- newHeight = TIME_BAR_HEIGHT;
- } else if(size != null) {
- // heigh from request
- newHeight = size.height;
- } else {
- newHeight = EXECUTION_INIT_HEIGHT;
- }
- return newHeight;
- }
-
- /**
- * Useful operation to know where the figure of a ExecutionSpecification EditPart should be
- * positioned within a Lifeline EditPart. The notToCheckList is needed to avoid checking those
- * ExecutionSpecification EditParts. The returned bounds are relative to the Lifeline figure so
- * they can be used, directly, within a SetBoundsCommand.
- *
- * @param lifelineEP
- * the lifeline ep
- * @param oldBounds
- * The old bounds of the ES
- * @param newBounds
- * The new initial bounds
- * @param notToCheckExecutionSpecificationList
- * The ExecutionSpecification EditPart's List that won't be checked
- *
- * @return The new bounds of the executionSpecificationEP figure
- */
- protected final static Rectangle getExecutionSpecificationNewBounds(boolean isMove, LifelineEditPart lifelineEP, Rectangle oldBounds, Rectangle newBounds, List<ShapeNodeEditPart> notToCheckExecutionSpecificationList, boolean useFixedXPos) {
- // Lifeline's figure where the child is drawn
- Rectangle dotLineBounds = lifelineEP.getPrimaryShape().getFigureLifelineDotLineFigure().getBounds();
-
- // if ExecutionSpecification is resize outside of the lifeline bounds
- if(newBounds.y <= dotLineBounds.y || newBounds.x < dotLineBounds.x || newBounds.x > dotLineBounds.right()) {
- return null;
- }
-
- List<ShapeNodeEditPart> toCheckExecutionSpecificationList = lifelineEP.getChildShapeNodeEditPart();
- toCheckExecutionSpecificationList.removeAll(notToCheckExecutionSpecificationList);
-
- if(isMove) {
- ShapeNodeEditPart parent = getParent(lifelineEP, newBounds, toCheckExecutionSpecificationList);
-
- if(useFixedXPos) {
- newBounds.x = oldBounds.x;
- } else if(parent == null) {
- // No mother, center position
- int width = newBounds.width > 0 ? newBounds.width : EXECUTION_INIT_WIDTH;
- newBounds.x = dotLineBounds.x + dotLineBounds.width / 2 - width / 2;
- } else {
- Rectangle parentBounds = parent.getFigure().getBounds();
- int width = parentBounds.width > 0 ? parentBounds.width : EXECUTION_INIT_WIDTH;
- newBounds.x = parentBounds.x + width / 2 + 1;
- }
- } else {
- ShapeNodeEditPart oldParent = getParent(lifelineEP, oldBounds, toCheckExecutionSpecificationList);
- // forbid resize if the new bounds exceed Y-wise the bounds of a non-parent ES
- for(ShapeNodeEditPart esPart : toCheckExecutionSpecificationList) {
- Rectangle esBounds = esPart.getFigure().getBounds();
- int esYBottom = esBounds.y + esBounds.height;
- if(esPart != oldParent) {
- if(((oldBounds.y + oldBounds.height) <= esBounds.y && (newBounds.y + newBounds.height) >= esBounds.y) || (oldBounds.y >= esYBottom && newBounds.y <= esYBottom)) {
- return null;
- }
- }
- }
- }
-
- // Change to relative bounds of the LifelineEP
- newBounds.x -= dotLineBounds.x;
- newBounds.y -= dotLineBounds.y;
-
- return newBounds;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Command getResizeChildrenCommand(ChangeBoundsRequest request) {
- // This policy is hosted in a LifelineEditPart
- LifelineEditPart lifelineEP = (LifelineEditPart)getHost();
- Command command = getResizeOrMoveChildrenCommand(lifelineEP, request, false, true, false);
-
- if(command == null) {
- command = super.getResizeChildrenCommand(request);
- }
- return command;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- // This policy is hosted in a LifelineEditPart
- LifelineEditPart lifelineEP = (LifelineEditPart)getHost();
- Command command = getResizeOrMoveChildrenCommand(lifelineEP, (ChangeBoundsRequest)request, true, true, false);
-
- if(command == null) {
- command = super.getMoveChildrenCommand(request);
- }
- return command;
- }
-
- @SuppressWarnings("unchecked")
- public static Command getResizeOrMoveChildrenCommand(LifelineEditPart lifelineEP, ChangeBoundsRequest request, boolean isMove, boolean updateEnclosingInteraction, boolean useFixedXPos) {
- List<EditPart> editParts = request.getEditParts();
-
- if(editParts != null) {
- CompoundCommand compoundCmd = new CompoundCommand();
- compoundCmd.setLabel("Move or resize");
- compoundCmd.setDebugLabel("Debug: Move or resize of an ExecutionSpecification");
-
- for(EditPart ep : editParts) {
-
- if(ep instanceof ActionExecutionSpecificationEditPart || ep instanceof BehaviorExecutionSpecificationEditPart) {
-
- // an execution specification have been moved or resized
- ShapeNodeEditPart executionSpecificationEP = (ShapeNodeEditPart)ep;
-
- // Check if height is within the limits of the figure
- Dimension newSizeDelta = adaptSizeDeltaToMaxHeight(executionSpecificationEP.getFigure(), request.getSizeDelta());
-
- // Current bounds of the ExecutionSpecification
- Rectangle oldBounds = executionSpecificationEP.getFigure().getBounds().getCopy();
-
- Rectangle newBounds = oldBounds.getCopy();
-
- // According to the parameters, the new bounds would be the following
- newBounds.x += request.getMoveDelta().x;
- newBounds.y += request.getMoveDelta().y;
- newBounds.height += newSizeDelta.height;
-
- // Not to check list
- List<ShapeNodeEditPart> notToCheckExecutionSpecificationList = new BasicEList<ShapeNodeEditPart>();
- // Affixed ExecutionSpecification List
- notToCheckExecutionSpecificationList.addAll(getAffixedExecutionSpecificationEditParts(executionSpecificationEP));
- // Add also current ExecutionSpecification EditPart
- notToCheckExecutionSpecificationList.add(executionSpecificationEP);
-
- // find parent bar
- List<ShapeNodeEditPart> executionSpecificationList = lifelineEP.getChildShapeNodeEditPart();
- executionSpecificationList.remove(executionSpecificationEP);
- ShapeNodeEditPart parentBar = getParent(lifelineEP, newBounds, executionSpecificationList);
-
- // change bounds to relative
- newBounds = getExecutionSpecificationNewBounds(isMove, lifelineEP, oldBounds, newBounds, notToCheckExecutionSpecificationList, useFixedXPos);
- if(newBounds == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- if(parentBar != null) {
- compoundCmd.add(resizeParentExecutionSpecification(lifelineEP, parentBar, newBounds.getCopy(), executionSpecificationList));
- }
-
- // Create and add the command to the compound command
- SetBoundsCommand setBoundsCmd = new SetBoundsCommand(executionSpecificationEP.getEditingDomain(), "Resize of a ExecutionSpecification", executionSpecificationEP, newBounds);
- compoundCmd.add(new ICommandProxy(setBoundsCmd));
-
- Rectangle realMoveDelta = getRealMoveDelta(getRelativeBounds(executionSpecificationEP.getFigure()), newBounds);
-
- if(isMove) {
- // Move also children
- compoundCmd.add(createMovingAffixedExecutionSpecificationCommand(executionSpecificationEP, realMoveDelta, newBounds));
-
- compoundCmd.add(createZOrderCommand(lifelineEP, executionSpecificationEP, newBounds, notToCheckExecutionSpecificationList));
- }
-
- // Move also linked Time elements
- compoundCmd = OccurrenceSpecificationMoveHelper.completeMoveExecutionSpecificationCommand(compoundCmd, executionSpecificationEP, newBounds, request);
-
- IFigure parentFigure = executionSpecificationEP.getFigure().getParent();
- parentFigure.translateToAbsolute(newBounds);
- // translateToAbsolute only does half of the work, I don't know why
- newBounds.translate(parentFigure.getBounds().getLocation());
-
- if(updateEnclosingInteraction) {
- // update the enclosing interaction of a moved execution specification
- compoundCmd.add(SequenceUtil.createUpdateEnclosingInteractionCommand(executionSpecificationEP, request.getMoveDelta(), newSizeDelta));
- }
-
- // keep absolute position of anchors
- compoundCmd.add(new ICommandProxy(new LifelineEditPart.PreserveAnchorsPositionCommandEx(executionSpecificationEP, new Dimension(realMoveDelta.width, realMoveDelta.height), PreserveAnchorsPositionCommand.PRESERVE_Y, executionSpecificationEP.getFigure(), request.getResizeDirection())));
- }
-
- if(ep instanceof CombinedFragment2EditPart) {
- CombinedFragment2EditPart cf2EP = (CombinedFragment2EditPart)ep;
- IFigure cf2Figure = cf2EP.getFigure();
- Rectangle bounds = cf2Figure.getBounds().getCopy();
- cf2Figure.getParent().translateToAbsolute(bounds);
-
- Dimension sizeDelta = request.getSizeDelta();
- if(sizeDelta != null) {
- if(sizeDelta.width != 0) {
- return UnexecutableCommand.INSTANCE;
- }
- bounds.resize(sizeDelta);
- }
- Point moveDelta = request.getMoveDelta();
- if(moveDelta != null) {
- bounds.translate(moveDelta);
- }
-
- // Create and add the set bounds command to the compound command
- SetBoundsCommand setBoundsCmd = new SetBoundsCommand(cf2EP.getEditingDomain(), "Resize of a CoRegion", cf2EP, getNewBoundsForCoRegion(lifelineEP, bounds));
- compoundCmd.add(new ICommandProxy(setBoundsCmd));
- }
- }
-
- if(!compoundCmd.isEmpty()) {
- return compoundCmd;
- }
- }
-
- return null;
- }
-
- /**
- * Command for change ZOrder of ExecutionSpecification ordered from parent to children.
- *
- * @param lifelineEP
- * the lifeline ep
- * @param executionSpecificationEP
- * the execution specification ep
- * @param newBounds
- * the new bounds
- * @param notToCheckExecutionSpecificationList
- * the not to check bes list
- *
- * @return the command
- */
- protected final static Command createZOrderCommand(LifelineEditPart lifelineEP, ShapeNodeEditPart executionSpecificationEP, Rectangle newBounds, List<ShapeNodeEditPart> notToCheckExecutionSpecificationList) {
- List<ShapeNodeEditPart> toCheckExecutionSpecificationList = lifelineEP.getChildShapeNodeEditPart();
- toCheckExecutionSpecificationList.removeAll(notToCheckExecutionSpecificationList);
- CompoundCommand cmd = new CompoundCommand();
- for(ShapeNodeEditPart externalExecutionSpecificationEP : toCheckExecutionSpecificationList) {
- Rectangle externalExecutionSpecificationBounds = getRelativeBounds(externalExecutionSpecificationEP.getFigure());
- // Check if there is any contact
- if(externalExecutionSpecificationBounds.touches(newBounds)) {
- View containerView = ViewUtil.getContainerView(executionSpecificationEP.getPrimaryView());
- if(containerView != null) {
- int i = 0;
- int parentIndex = -1;
- int childIndex = -1;
- for(Object child : containerView.getChildren()) {
- if(child == externalExecutionSpecificationEP.getPrimaryView()) {
- parentIndex = i;
- } else if(child == executionSpecificationEP.getPrimaryView()) {
- childIndex = i;
- }
- if(parentIndex != -1 && childIndex != -1) {
- if(childIndex > parentIndex) {
- cmd.add(new ICommandProxy(new CustomZOrderCommand(executionSpecificationEP.getEditingDomain(), executionSpecificationEP.getPrimaryView(), parentIndex)));
- cmd.add(new ICommandProxy(new CustomZOrderCommand(externalExecutionSpecificationEP.getEditingDomain(), externalExecutionSpecificationEP.getPrimaryView(), childIndex)));
- } else {
- break;
- }
- }
- i++;
- }
- }
- }
- }
-
- if(!cmd.isEmpty()) {
- return cmd;
- }
- return null;
- }
-
- /**
- * Useful operation to know where the figure of a ExecutionSpecification EditPart should be
- * positioned within a Lifeline EditPart. The notToCheckList is needed to avoid checking those
- * ExecutionSpecification EditParts. The returned bounds are relative to the Lifeline figure so
- * they can be used, directly, within a SetBoundsCommand.
- *
- * @param lifelineDotLineFigure
- * TODO
- * @param newBounds
- * The new initial bounds
- * @param executionSpecifactionEditPart
- * TODO
- * @param notToCheckExecutionSpecificationList
- * The ExecutionSpecification EditPart's List that won't be checked
- *
- * @return The new bounds of the executionSpecificationEP figure
- */
-
-
- /**
- * Get the (futur) parent of a ExecutionSpecification
- *
- * @param lifelinePart
- *
- * @param childBounds
- * the child bounds
- * @param toCheckExecutionSpecificationList
- * List of EditPart to check
- * @return The parent
- */
- public final static ShapeNodeEditPart getParent(LifelineEditPart lifelinePart, Rectangle childBounds, List<ShapeNodeEditPart> toCheckExecutionSpecificationList) {
- ShapeNodeEditPart parent = null;
- // Loop through the ExecutionSpecification list and try to find the most to the right
- // ExecutionSpecification within the executionSpecificationEP Y-axis bounds
- Rectangle externalBounds = childBounds.getCopy();
- for(ShapeNodeEditPart externalExecutionSpecificationEP : toCheckExecutionSpecificationList) {
- Rectangle externalExecutionSpecificationBounds = externalExecutionSpecificationEP.getFigure().getBounds();
- externalBounds.x = externalExecutionSpecificationBounds.x;
- externalBounds.width = externalExecutionSpecificationBounds.width;
- if(externalExecutionSpecificationBounds.touches(externalBounds) && externalExecutionSpecificationBounds.x <= childBounds.x) {
- if(parent == null || externalExecutionSpecificationBounds.x > parent.getFigure().getBounds().x) {
- parent = externalExecutionSpecificationEP;
- }
- }
- }
- return parent;
- }
-
- /**
- * Used to modify the sizeDelta if the given value is higher/lower than the highest/lowest
- * allowed values of the figure.
- *
- * @param figure
- * the figure
- * @param sizeDelta
- * the size delta
- *
- * @return a corrected sizeDelta
- */
- public final static Dimension adaptSizeDeltaToMaxHeight(IFigure figure, Dimension sizeDelta) {
- Dimension newSizeDelta = new Dimension(sizeDelta);
-
- int figureHeight = figure.getBounds().height;
- int maximunFigureHeight = figure.getMaximumSize().height;
- int minimunFigureHeight = figure.getMinimumSize().height;
-
- int height = figureHeight + newSizeDelta.height;
- if(height > maximunFigureHeight) {
- newSizeDelta.height = maximunFigureHeight - figureHeight;
- } else if(height < minimunFigureHeight) {
- newSizeDelta.height = minimunFigureHeight - figureHeight;
- }
-
- return newSizeDelta;
- }
-
- /**
- * Returns all the ExecutionSpecification EditParts that are affixed to the right side of the
- * given ExecutionSpecification EditPart. Not only the ones directly affixed to the
- * executionSpecificationEP are returned, but the ones that are indirectly affixed as well (this
- * is done recursively)
- *
- * @param executionSpecificationEP
- * the execution specification ep
- *
- * @return the list of affixed ExecutionSpecification. If there is no affixed
- * ExecutionSpecification, then an empty list will be returned
- */
- public final static List<ShapeNodeEditPart> getAffixedExecutionSpecificationEditParts(ShapeNodeEditPart executionSpecificationEP) {
- List<ShapeNodeEditPart> notToCheckExecutionSpecificationList = new ArrayList<ShapeNodeEditPart>();
- return getAffixedExecutionSpecificationEditParts(executionSpecificationEP, notToCheckExecutionSpecificationList);
-
- }
-
- /**
- * Operation used by the above operation. It's main goal is to obtain, recursively, all the
- * affixed ExecutionSpecification. In order to do so, it is needed a ExecutionSpecification
- * EditPart and the notToCheckList.
- *
- * @param executionSpecificationEP
- * the execution specification ep
- * @param notToCheckExecutionSpecificationList
- * the not to check ExecutionSpecification list
- *
- * @return the list of affixed ExecutionSpecification. If there is no affixed
- * ExecutionSpecification, then an empty list will be returned
- */
- protected final static List<ShapeNodeEditPart> getAffixedExecutionSpecificationEditParts(ShapeNodeEditPart executionSpecificationEP, List<ShapeNodeEditPart> notToCheckExecutionSpecificationList) {
- // Add itself to the notToCheck list
- List<ShapeNodeEditPart> newNotToCheckExecutionSpecificationList = new ArrayList<ShapeNodeEditPart>(notToCheckExecutionSpecificationList);
- newNotToCheckExecutionSpecificationList.add(executionSpecificationEP);
-
- // LifelineEditPart where the ExecutionSpecification EditPart is contained
- LifelineEditPart lifelineEP = (LifelineEditPart)executionSpecificationEP.getParent();
-
- // ExecutionSpecification EditParts list
- List<ShapeNodeEditPart> executionSpecificationList = lifelineEP.getChildShapeNodeEditPart();
- executionSpecificationList.remove(newNotToCheckExecutionSpecificationList);
-
- // List to store the Affixed ExecutionSpecification
- List<ShapeNodeEditPart> affixedExecutionSpecificationList = new ArrayList<ShapeNodeEditPart>();
-
- // Loop ExecutionSpecificationough the ExecutionSpecification list
- for(ShapeNodeEditPart childExecutionSpecificationEP : executionSpecificationList) {
- if(isAffixedToRight(executionSpecificationEP.getFigure().getBounds(), childExecutionSpecificationEP.getFigure().getBounds())) {
- affixedExecutionSpecificationList.add(childExecutionSpecificationEP);
- // Add also it's affixed ExecutionSpecification
- affixedExecutionSpecificationList.addAll(getAffixedExecutionSpecificationEditParts(childExecutionSpecificationEP, newNotToCheckExecutionSpecificationList));
- }
- }
-
- // To the ExecutionSpecification list
- return affixedExecutionSpecificationList;
- }
-
- /**
- * Checks whether the right EditPart is affixed to the left EditPart. In order to do so, the
- * operation checks if the right figure is really on the right and, if so, it just returns true
- * if figures touch each other.
- *
- * @param leftFigure
- * The left rectangle
- * @param rightFigure
- * The right rectangle
- *
- * @return true if the rectangles of both figures touch and the right figure is really on the
- * right. False otherwise
- */
- public final static boolean isAffixedToRight(Rectangle leftFigure, Rectangle rightFigure) {
- return leftFigure.touches(rightFigure) && leftFigure.x < rightFigure.x;
- }
-
- /**
- * If a ExecutionSpecification EditPart is going to be moved according to a moveDelta, this
- * operation returns a compoundCommand that also moves the affixed ExecutionSpecification
- * according to that delta.
- *
- * @param executionSpecificationEP
- * The ExecutionSpecification EditPart that is going to be moved
- * @param moveDelta
- * The moveDelta of the previous EditPart
- * @param newBounds
- * the new bounds
- *
- * @return the compound command
- */
- protected final static CompoundCommand createMovingAffixedExecutionSpecificationCommand(ShapeNodeEditPart executionSpecificationEP, Rectangle moveDelta, Rectangle newBounds) {
- if(moveDelta.y != 0 || moveDelta.height != 0) {
- CompoundCommand compoundCmd = new CompoundCommand();
- for(ShapeNodeEditPart childExecutionSpecificationEP : getAffixedExecutionSpecificationEditParts(executionSpecificationEP)) {
- // Get Relative Bounds
- Rectangle childBounds = getRelativeBounds(childExecutionSpecificationEP.getFigure());
- // Apply delta
- childBounds.y += moveDelta.y;
- childBounds.x += moveDelta.x;
-
- // Create the child's SetBoundsCommand
- SetBoundsCommand childSetBoundsCmd = new SetBoundsCommand(executionSpecificationEP.getEditingDomain(), "Movement of affixed ExecutionSpecification", childExecutionSpecificationEP, childBounds);
- compoundCmd.add(new ICommandProxy(childSetBoundsCmd));
-
-
- IFigure parentFigure = childExecutionSpecificationEP.getFigure().getParent();
- parentFigure.translateToAbsolute(newBounds);
- // translateToAbsolute only does half of the work, I don't know why
- newBounds.translate(parentFigure.getBounds().getLocation());
-
- // change the enclosing interaction of the moved affixed child if necessary
- compoundCmd.add(SequenceUtil.createUpdateEnclosingInteractionCommand(childExecutionSpecificationEP, moveDelta.getLocation(), moveDelta.getSize()));
-
- // Move it's children as well
- if(!getAffixedExecutionSpecificationEditParts(childExecutionSpecificationEP).isEmpty()) {
- compoundCmd.add(createMovingAffixedExecutionSpecificationCommand(childExecutionSpecificationEP, moveDelta, childBounds));
- }
- }
- if(!compoundCmd.isEmpty()) {
- return compoundCmd;
- }
- }
- return null;
- }
-
-
-
- /**
- * Given an AbstractGraphialEditPart and the new relative bounds that the EditPart will have, it
- * returns the real delta applied to the movement.
- *
- * @param oldRelativeBounds
- * The old position of the mentioned EditPart
- * @param newRelativeBounds
- * The new position of the mentioned EditPart
- *
- * @return The real MoveDelta applied
- */
- public final static Rectangle getRealMoveDelta(Rectangle oldRelativeBounds, Rectangle newRelativeBounds) {
- Rectangle realMoveDelta = new Rectangle();
- realMoveDelta.x = newRelativeBounds.x - oldRelativeBounds.x;
- realMoveDelta.y = newRelativeBounds.y - oldRelativeBounds.y;
- realMoveDelta.height = newRelativeBounds.height - oldRelativeBounds.height;
- realMoveDelta.width = newRelativeBounds.width - oldRelativeBounds.width;
- return realMoveDelta;
- }
-
- /**
- * It returns the relative bounds of an Figure.
- *
- * @param figure
- * The Figure
- *
- * @return The relative bounds regarding it's parent figure
- */
- public final static Rectangle getRelativeBounds(IFigure figure) {
- Rectangle relBounds = figure.getBounds().getCopy();
- Rectangle parentRectangle = figure.getParent().getBounds();
- relBounds.x -= parentRectangle.x;
- relBounds.y -= parentRectangle.y;
- return relBounds;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageConnectionEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageConnectionEditPolicy.java
deleted file mode 100644
index 4f9a23d7ce0..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageConnectionEditPolicy.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:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.internal.editpolicies.ConnectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * This edit policy also deletes time/duration edit parts which are linked with the deleted edit part.
- */
-public class MessageConnectionEditPolicy extends ConnectionEditPolicy {
-
- @Override
- protected Command createDeleteSemanticCommand(GroupRequest deleteRequest) {
- CompoundCommand deleteSemanticsCommand = new CompoundCommand();
- Command deleteSemanticCommand = super.createDeleteSemanticCommand(deleteRequest);
- deleteSemanticsCommand.add(deleteSemanticCommand);
-
- return LifelineMessageCreateHelper.restoreLifelineOnMessageDelete(deleteSemanticsCommand, getHost());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Command createDeleteViewCommand(GroupRequest deleteRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = super.createDeleteViewCommand(deleteRequest);
- deleteViewsCommand.add(deleteViewCommand);
- if(getHost() instanceof ConnectionNodeEditPart) {
- TransactionalEditingDomain editingDomain = ((ConnectionNodeEditPart)getHost()).getEditingDomain();
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, editingDomain, getHost());
- }
-
- return LifelineMessageCreateHelper.restoreLifelineOnMessageDelete(deleteViewsCommand, getHost());
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageConnectionLineSegEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageConnectionLineSegEditPolicy.java
deleted file mode 100644
index a2e57f864b0..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageConnectionLineSegEditPolicy.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.AbstractRouter;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.ConnectionRouter;
-import org.eclipse.draw2d.FigureCanvas;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.BendpointRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gef.ui.parts.ScrollingGraphicalViewer;
-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.ConnectionNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConnectionBendpointEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.diagram.ui.util.SelectInDiagramHelper;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.LineMode;
-import org.eclipse.papyrus.uml.diagram.sequence.draw2d.routers.MessageRouter.RouterKind;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart.MessageCreate;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OccurrenceSpecificationMoveHelper;
-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.MessageEnd;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * This bendpoint edit policy is used to allow drag of horizontal messages and forbid drag otherwise.
- *
- * @author mvelten
- *
- */
-@SuppressWarnings("restriction")
-public class MessageConnectionLineSegEditPolicy extends ConnectionBendpointEditPolicy {
-
- public MessageConnectionLineSegEditPolicy() {
- super(LineMode.ORTHOGONAL_FREE);
- }
-
- @Override
- public Command getCommand(Request request) {
- RouterKind kind = RouterKind.getKind(getConnection(), getConnection().getPoints());
- if(kind == RouterKind.SELF || kind == RouterKind.HORIZONTAL || getConnection() instanceof MessageCreate){
- return super.getCommand(request);
- }
- return null;
- }
-
- /**
- * Move the anchors along with the line and update bendpoints accordingly.
- */
- @Override
- protected Command getBendpointsChangedCommand(BendpointRequest request) {
- if((getHost().getViewer() instanceof ScrollingGraphicalViewer) && (getHost().getViewer().getControl() instanceof FigureCanvas)) {
- SelectInDiagramHelper.exposeLocation((FigureCanvas)getHost().getViewer().getControl(), request.getLocation().getCopy());
- }
-
- if(getHost() instanceof ConnectionNodeEditPart) {
- ConnectionNodeEditPart connectionPart = (ConnectionNodeEditPart)getHost();
- EObject message = connectionPart.resolveSemanticElement();
- if(message instanceof Message) {
- MessageEnd send = ((Message)message).getSendEvent();
- MessageEnd rcv = ((Message)message).getReceiveEvent();
- EditPart srcPart = connectionPart.getSource();
- LifelineEditPart srcLifelinePart = SequenceUtil.getParentLifelinePart(srcPart);
- EditPart tgtPart = connectionPart.getTarget();
- LifelineEditPart tgtLifelinePart = SequenceUtil.getParentLifelinePart(tgtPart);
- if(send instanceof OccurrenceSpecification && rcv instanceof OccurrenceSpecification && srcLifelinePart != null && tgtLifelinePart != null) {
- RouterKind kind = RouterKind.getKind(getConnection(), getConnection().getPoints());
- if(getHost() instanceof Message2EditPart && kind == RouterKind.SELF){
- return getSelfLinkMoveCommand(request, connectionPart, send, rcv, srcLifelinePart);
- }else if(getHost() instanceof Message4EditPart){
- IFigure fig = tgtLifelinePart.getPrimaryShape().getFigureLifelineNameContainerFigure();
- Rectangle bounds = fig.getBounds().getCopy();
- fig.translateToAbsolute(bounds);
-
- PointList points = getConnection().getPoints();
- Point sourceRefPoint = points.getFirstPoint().getCopy();;
- getConnection().translateToAbsolute(sourceRefPoint);
-
- int dy = sourceRefPoint.y - bounds.getCenter().y;
- Point location = tgtLifelinePart.getFigure().getBounds().getLocation().getCopy().translate(0, dy);
- Command moveCmd = new ICommandProxy(new SetBoundsCommand(tgtLifelinePart.getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize, new EObjectAdapter(tgtLifelinePart.getNotationView()), location));
-
- // Take care of the order of commands, to make sure target is always bellow the source.
- if(dy < 0){ // move up
- return LifelineMessageCreateHelper.moveCascadeLifeline(tgtLifelinePart,moveCmd,dy);
- }else{ // move down
- Command cmd = LifelineMessageCreateHelper.moveCascadeLifeline(tgtLifelinePart,null,dy);
- cmd = cmd == null? moveCmd: cmd.chain(moveCmd);
- return cmd;
- }
- }else{
- int y = request.getLocation().y;
- List<EditPart> empty = Collections.emptyList();
- Command srcCmd = OccurrenceSpecificationMoveHelper.getMoveOccurrenceSpecificationsCommand((OccurrenceSpecification)send, null, y, -1, srcLifelinePart, empty);
- Command tgtCmd = OccurrenceSpecificationMoveHelper.getMoveOccurrenceSpecificationsCommand((OccurrenceSpecification)rcv, null, y, -1, tgtLifelinePart, empty);
- CompoundCommand compoudCmd = new CompoundCommand(Messages.MoveMessageCommand_Label);
- /*
- * Take care of the order of commands, to make sure target is always bellow the source.
- * Otherwise, moving the target above the source would cause order conflict with existing CF.
- */
- Point oldLocation = SequenceUtil.getAbsoluteEdgeExtremity(connectionPart, true);
- if(oldLocation != null) {
- int oldY = oldLocation.y;
- if(oldY < y) {
- compoudCmd.add(tgtCmd);
- compoudCmd.add(srcCmd);
- } else {
- compoudCmd.add(srcCmd);
- compoudCmd.add(tgtCmd);
- }
- return compoudCmd;
- }
- }
- }
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- protected Command getSelfLinkMoveCommand(BendpointRequest request, ConnectionNodeEditPart connectionPart, MessageEnd send, MessageEnd rcv, LifelineEditPart srcLifelinePart) {
- CompoundCommand compoudCmd = new CompoundCommand(Messages.MoveMessageCommand_Label);
- PointList points = getConnection().getPoints();
- Point sourceRefPoint = points.getFirstPoint();;
- Point targetRefPoint = points.getLastPoint();;
- getConnection().translateToAbsolute(sourceRefPoint);
- getConnection().translateToAbsolute(targetRefPoint);
-
- Point oldSourcePoint = SequenceUtil.findLocationOfEvent(srcLifelinePart, (OccurrenceSpecification)send);
- int dy = sourceRefPoint.y - oldSourcePoint.y;
- int dx = request.getLocation().x > sourceRefPoint.x ? 3 : -3;
-
- // check bounds
- NodeFigure fig = srcLifelinePart.getPrimaryShape().getFigureLifelineDotLineFigure().getDashLineRectangle();
- Rectangle bounds = fig.getBounds().getCopy();
- fig.translateToAbsolute(bounds);
-
- bounds.expand(6, 0);
- if(!bounds.contains(sourceRefPoint) || !bounds.contains(targetRefPoint)){
- return UnexecutableCommand.INSTANCE; // cannot move outside lifeline part
- }
- sourceRefPoint = sourceRefPoint.translate(dx, 0);
- targetRefPoint = targetRefPoint.translate(dx, 0);
- Command srcCmd = getReconnectCommand(connectionPart, srcLifelinePart, sourceRefPoint, RequestConstants.REQ_RECONNECT_SOURCE);
- Command tgtCmd = getReconnectCommand(connectionPart, srcLifelinePart, targetRefPoint, RequestConstants.REQ_RECONNECT_TARGET);
-
- if(dy < 0){ // move up
- compoudCmd.add(srcCmd);
- compoudCmd.add(tgtCmd);
- }else{ // move down
- compoudCmd.add(tgtCmd);
- compoudCmd.add(srcCmd);
- }
- return compoudCmd;
- }
-
- protected Command getReconnectCommand(ConnectionNodeEditPart connectionPart, LifelineEditPart targetPart, Point location, String requestType) {
- // Create and set the properties of the request
- ReconnectRequest reconnReq = new ReconnectRequest();
- reconnReq.setConnectionEditPart(connectionPart);
- reconnReq.setLocation(location);
- reconnReq.setTargetEditPart(targetPart);
- reconnReq.setType(requestType);
- // add a parameter to bypass the move impact to avoid infinite loop
- reconnReq.getExtendedData().put(SequenceRequestConstant.DO_NOT_MOVE_EDIT_PARTS, true);
- Command cmd = targetPart.getCommand(reconnReq);
- return cmd;
- }
-
- /**
- * don't show feedback if the drag is forbidden (message not horizontal).
- */
- @Override
- public void showSourceFeedback(Request request) {
- if(request instanceof BendpointRequest) {
- RouterKind kind = RouterKind.getKind(getConnection(), getConnection().getPoints());
- if(kind == RouterKind.SELF || kind == RouterKind.HORIZONTAL || getConnection() instanceof MessageCreate){
- super.showSourceFeedback(request);
- }
- }
- }
-
- private ConnectionRouter router;
-
- static class DummyRouter extends AbstractRouter {
-
- public void route(Connection conn) {
- }
- }
-
- protected void showMoveLineSegFeedback(BendpointRequest request) {
- RouterKind kind = RouterKind.getKind(getConnection(), getConnection().getPoints());
- if(getHost() instanceof Message2EditPart && kind == RouterKind.SELF ){
- if(router == null){
- router = getConnection().getConnectionRouter();
- getConnection().setConnectionRouter( new DummyRouter());
- }
- PointList linkPoints = getConnection().getPoints().getCopy();
-
- Point ptLoc = new Point(request.getLocation());
- getConnection().translateToRelative(ptLoc);
- int dy = 0;
- if(request.getIndex() == 0)
- dy = ptLoc.y - linkPoints.getFirstPoint().y;
- else if(request.getIndex() == 2)
- dy = ptLoc.y - linkPoints.getLastPoint().y;
-
- // move each point on link
- int size = linkPoints.size();
- for(int i = 0; i < size; i ++){
- Point p = linkPoints.getPoint(i).translate(0, dy);
- linkPoints.setPoint(p, i);
- }
-
- // link should not exceed lifeline bounds
- if(checkBounds(linkPoints)){
- getConnection().setPoints(linkPoints);
- getConnection().getLayoutManager().layout(getConnection());
- }
- return;
- }
- if(getHost() instanceof Message4EditPart){
- if(router == null){
- router = getConnection().getConnectionRouter();
- getConnection().setConnectionRouter( new DummyRouter());
- }
- PointList linkPoints = getConnection().getPoints().getCopy();
-
- Point ptLoc = new Point(request.getLocation());
- getConnection().translateToRelative(ptLoc);
- int dy = ptLoc.y - linkPoints.getFirstPoint().y;
- int size = linkPoints.size();
- for(int i = 0; i < size; i ++){
- Point p = linkPoints.getPoint(i).translate(0, dy);
- linkPoints.setPoint(p, i);
- }
- if(checkBounds(linkPoints)){
- getConnection().setPoints(linkPoints);
- getConnection().getLayoutManager().layout(getConnection());
- }
- return;
- }
- super.showMoveLineSegFeedback(request);
- }
-
- protected boolean checkBounds(PointList linkPoints) {
- EditPart sourcePart = ((ConnectionNodeEditPart)getHost()).getSource();
- if(sourcePart instanceof LifelineEditPart){
- LifelineEditPart lep = (LifelineEditPart)sourcePart;
- NodeFigure fig = lep.getPrimaryShape().getFigureLifelineDotLineFigure().getDashLineRectangle();
- Rectangle bounds = fig.getBounds().getCopy();
- fig.translateToAbsolute(bounds);
-
- Rectangle conBounds = linkPoints.getBounds();
- getConnection().translateToAbsolute(conBounds);
- // check top and bottom y limit
- if(conBounds.y <= bounds.y || conBounds.getBottom().y >= bounds.getBottom().y)
- return false;
- }
- return true;
- }
-
- @Override
- protected void eraseConnectionFeedback(BendpointRequest request, boolean removeFeedbackFigure) {
- getConnection().setVisible(true);
- super.eraseConnectionFeedback(request, removeFeedbackFigure);
-
- if(router != null)
- getConnection().setConnectionRouter(router);
- router = null;
- }
-
-// private boolean isHorizontal() {
-// Connection connection = getConnection();
-// RouterKind kind = RouterKind.getKind(connection, connection.getPoints());
-//
-// if(kind.equals(RouterKind.HORIZONTAL)) {
-// return true;
-// }
-// return false;
-// }
-//
-// final private static char TERMINAL_START_CHAR = '(';
-//
-// final private static char TERMINAL_DELIMITER_CHAR = ',';
-//
-// final private static char TERMINAL_END_CHAR = ')';
-//
-// private static String composeTerminalString(PrecisionPoint p) {
-// StringBuffer s = new StringBuffer(24);
-// s.append(TERMINAL_START_CHAR); // 1 char
-// s.append(p.preciseX); // 10 chars
-// s.append(TERMINAL_DELIMITER_CHAR); // 1 char
-// s.append(p.preciseY); // 10 chars
-// s.append(TERMINAL_END_CHAR); // 1 char
-// return s.toString(); // 24 chars max (+1 for safety, i.e. for string termination)
-// }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageLabelEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageLabelEditPolicy.java
deleted file mode 100644
index 9c68048832a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageLabelEditPolicy.java
+++ /dev/null
@@ -1,1000 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.StereotypedElementLabelHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.preferences.MessagePreferencePage;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
-import org.eclipse.papyrus.uml.tools.utils.MultiplicityElementUtil;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.papyrus.uml.tools.utils.ParameterUtil;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.papyrus.uml.tools.utils.TypeUtil;
-import org.eclipse.papyrus.uml.tools.utils.TypedElementUtil;
-import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.ParameterDirectionKind;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Signal;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-
-public class MessageLabelEditPolicy extends AbstractMaskManagedEditPolicy {
-
- public static interface ICustomMessageLabel{
-
- }
-
- private DefaultValueListener defaultValueListener;
-
- /**
- * Refreshes the display of the edit part
- */
- @Override
- public void refreshDisplay() {
- // calls the helper for this edit Part
- ConnectionEditPart lp = (ConnectionEditPart)getHost();
- List children = lp.getChildren();
- for(Object p : children)
- if(p instanceof ICustomMessageLabel){
- MessageLabelHelper.getInstance().refreshEditPartDisplay((GraphicalEditPart)p);
- }
- }
-
- public int getCurrentDisplayValue() {
- EAnnotation customeDisplayAnnotation = ((View)getHost().getModel()).getEAnnotation(VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION);
- int displayValue = getDefaultDisplayValue();
- if(customeDisplayAnnotation != null) {
- displayValue = Integer.parseInt(customeDisplayAnnotation.getDetails().get(VisualInformationPapyrusConstants.CUSTOM_APPEARANCE_MASK_VALUE));
- } else {
- // no specific information => look in preferences
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- int displayValueTemp = store.getInt(MessagePreferencePage.LABEL_DISPLAY_PREFERENCE);
- if(displayValueTemp != 0) {
- displayValue = displayValueTemp;
- }
- }
- return displayValue;
- }
-
- public int getDefaultDisplayValue() {
- return MessagePreferencePage.DEFAULT_LABEL_DISPLAY;
- }
-
- public String getMaskLabel(int value) {
- return MessageLabelHelper.getInstance().getMaskLabel(value);
- }
-
- public Collection<String> getMaskLabels() {
- return MessageLabelHelper.getInstance().getMaskLabels();
- }
-
- public Map<Integer, String> getMasks() {
- return MessageLabelHelper.getInstance().getMasks();
- }
-
- public Collection<Integer> getMaskValues() {
- return MessageLabelHelper.getInstance().getMaskValues();
- }
-
- public String getPreferencePageID() {
- return "org.eclipse.papyrus.uml.diagram.sequence.preferences.MessagePreferencePage";
- }
-
- @Override
- public Message getUMLElement() {
- if(hostSemanticElement instanceof Message)
- return ((Message)hostSemanticElement);
- return null;
- }
-
- @Override
- public void addAdditionalListeners() {
- super.addAdditionalListeners();
- this.defaultValueListener = new DefaultValueListener();
- Message e = getUMLElement();
- // check host semantic element is not null
- if(e == null || e.getSignature() == null) {
- return;
- }
- NamedElement sig = e.getSignature();
- if(sig instanceof Operation){
- Operation operation = (Operation)sig;
- getDiagramEventBroker().addNotificationListener(operation, this);
- // adds a listener to the element itself, and to linked elements, like Type
- for(Parameter parameter : operation.getOwnedParameters()) {
- getDiagramEventBroker().addNotificationListener(parameter, this);
- getDiagramEventBroker().addNotificationListener(parameter.getDefaultValue(), defaultValueListener);
-
- // should also add this element as a listener of parameter type
- getDiagramEventBroker().addNotificationListener(parameter.getType(), this);
- }
- }else if(sig instanceof Signal){
- Signal signal = (Signal)sig;
- getDiagramEventBroker().addNotificationListener(signal, this);
- for(Property property : signal.getOwnedAttributes()) {
- getDiagramEventBroker().addNotificationListener(property, this);
- getDiagramEventBroker().addNotificationListener(property.getDefaultValue(), defaultValueListener);
-
- // should also add this element as a listener of parameter type
- getDiagramEventBroker().addNotificationListener(property.getType(), this);
- }
- }
-
- EList<ValueSpecification> argments = e.getArguments();
- for(ValueSpecification v : argments)
- if(v instanceof EObject) {
- getDiagramEventBroker().addNotificationListener((EObject)v, this);
- }
- }
-
- @Override
- protected void removeAdditionalListeners() {
- super.removeAdditionalListeners();
- Message e = getUMLElement();
- // check host semantic element is not null
- if(e == null || e.getSignature() == null) {
- return;
- }
- NamedElement sig = e.getSignature();
- if(sig instanceof Operation){
- Operation operation = (Operation)sig;
- getDiagramEventBroker().removeNotificationListener(operation, this);
- for(Parameter parameter : operation.getOwnedParameters()) {
- getDiagramEventBroker().removeNotificationListener(parameter, this);
- getDiagramEventBroker().removeNotificationListener(parameter.getDefaultValue(), defaultValueListener);
-
- // remove parameter type listener
- getDiagramEventBroker().removeNotificationListener(parameter.getType(), this);
- }
- }else if(sig instanceof Signal){
- Signal signal = (Signal)sig;
- getDiagramEventBroker().removeNotificationListener(signal, this);
- for(Property property : signal.getOwnedAttributes()) {
- getDiagramEventBroker().removeNotificationListener(property, this);
- getDiagramEventBroker().removeNotificationListener(property.getDefaultValue(), defaultValueListener);
-
- // remove parameter type listener
- getDiagramEventBroker().removeNotificationListener(property.getType(), this);
- }
- }
-
- EList<ValueSpecification> argments = e.getArguments();
- for(ValueSpecification v : argments)
- if(v instanceof EObject) {
- getDiagramEventBroker().removeNotificationListener((EObject)v, this);
- }
- }
-
- @Override
- public void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- final Object object = notification.getNotifier();
- Message e = getUMLElement();
- // check host semantic element is not null
- if(e == null) {
- return;
- }
- if(UMLPackage.Literals.MESSAGE__ARGUMENT.equals( notification.getFeature())){
- parameterListChange(notification);
- return;
- }else if(e.getArguments().contains(object)){
- refreshDisplay();
- return;
- }
-
- NamedElement sig = e.getSignature();
- if(sig instanceof Operation){
- Operation operation = (Operation)sig;
-
- if(object.equals(operation)) {
- notifyOperationChanged(operation, notification);
- } else if(isParameter(object, operation)) {
- notifyParameterChanged(notification);
- } else if(isParameterType(object, operation)) {
- notifyTypeChanged(notification);
- }
- }else if(sig instanceof Signal){
- Signal signal = (Signal)sig;
- if(object.equals(signal)) {
- notifySignalChanged(signal, notification);
- }else if(isProperty(object, signal)) {
- notifyPropertyChanged(notification);
- }else if(isPropertyType(object, signal)) {
- notifyTypeChanged(notification);
- }else if(object instanceof ValueSpecification){
- Element own = ((ValueSpecification)object).getOwner();
- if(isProperty(own, signal)){
- refreshDisplay(); // may be default value
- }
- }
- }
-
- if(isMaskManagedAnnotation(object) ){
- refreshDisplay();
- }else if(isRemovedMaskManagedLabelAnnotation(object, notification)) {
- refreshDisplay();
- }else if(sig == null && object instanceof Message && notification.getFeature().equals(UMLPackage.eINSTANCE.getNamedElement_Name())){
- refreshDisplay();
- }
- }
-
- class DefaultValueListener implements NotificationListener{
-
- public void notifyChanged(Notification notification) {
- refreshDisplay();
- }
- }
-
- private void notifyPropertyChanged(Notification notification) {
- switch(notification.getFeatureID(Property.class)) {
- case UMLPackage.PROPERTY__DEFAULT_VALUE: // set or unset default value
- if(notification.getOldValue() instanceof EObject)
- getDiagramEventBroker().removeNotificationListener((EObject)notification.getOldValue(), defaultValueListener);
- if(notification.getNewValue() instanceof EObject)
- getDiagramEventBroker().addNotificationListener((EObject)notification.getNewValue(), defaultValueListener);
- refreshDisplay();
- break;
- case UMLPackage.PROPERTY__NAME:
- case UMLPackage.PROPERTY__IS_ORDERED:
- case UMLPackage.PROPERTY__LOWER:
- case UMLPackage.PROPERTY__UPPER:
- case UMLPackage.PROPERTY__LOWER_VALUE:
- case UMLPackage.PROPERTY__UPPER_VALUE:
- refreshDisplay();
- break;
- case UMLPackage.PROPERTY__TYPE:
- parameterListChange(notification);
-
- break;
- default:
- // does nothing in other cases
- break;
- }
- }
-
- /**
- * notifies that a parameter of the operation has changed.
- *
- * @param parameter
- * the {@link Parameter} that has changed
- * @param notification
- * the notification send when the element has been changed
- */
- protected void notifyParameterChanged(Notification notification) {
- switch(notification.getFeatureID(Parameter.class)) {
- case UMLPackage.PARAMETER__DEFAULT_VALUE:
- if(notification.getOldValue() instanceof EObject)
- getDiagramEventBroker().removeNotificationListener((EObject)notification.getOldValue(), defaultValueListener);
- if(notification.getNewValue() instanceof EObject)
- getDiagramEventBroker().addNotificationListener((EObject)notification.getNewValue(), defaultValueListener);
- refreshDisplay();
- break;
- case UMLPackage.PARAMETER__NAME:
- case UMLPackage.PARAMETER__DIRECTION:
- case UMLPackage.PARAMETER__IS_STREAM:
- case UMLPackage.PARAMETER__IS_ORDERED:
- case UMLPackage.PARAMETER__LOWER:
- case UMLPackage.PARAMETER__UPPER:
- case UMLPackage.PARAMETER__LOWER_VALUE:
- case UMLPackage.PARAMETER__UPPER_VALUE:
- refreshDisplay();
- break;
- case UMLPackage.PARAMETER__TYPE:
- parameterListChange(notification);
-
- break;
- default:
- // does nothing in other cases
- break;
- }
- }
-
- protected void parameterListChange(Notification notification) {
- switch(notification.getEventType()) {
- // if it is added => adds listener to the type element
- case Notification.ADD:
- getDiagramEventBroker().addNotificationListener((EObject)notification.getNewValue(), this);
- refreshDisplay();
- // if it is removed => removes listener from the type element
- break;
- case Notification.ADD_MANY:
- if(notification.getNewValue() instanceof List<?>) {
- List<?> addedElements = (List<?>)notification.getNewValue();
- for(Object addedElement : addedElements) {
- if(addedElement instanceof EObject) {
- getDiagramEventBroker().addNotificationListener((EObject)addedElement, this);
- }
- }
- }
- refreshDisplay();
- break;
- case Notification.REMOVE:
- getDiagramEventBroker().removeNotificationListener((EObject)notification.getOldValue(), this);
- refreshDisplay();
- break;
- case Notification.REMOVE_MANY:
- if(notification.getOldValue() instanceof List<?>) {
- List<?> removedElements = (List<?>)notification.getOldValue();
- for(Object removedElement : removedElements) {
- if(removedElement instanceof EObject) {
- getDiagramEventBroker().removeNotificationListener((EObject)removedElement, this);
- }
- }
- }
- refreshDisplay();
- break;
- // if it is set, remove the old one and adds the new one. this is the method use when
- // the type is set or removed...
- case Notification.SET:
- if(notification.getNewValue() != null) {
- getDiagramEventBroker().addNotificationListener((EObject)notification.getNewValue(), this);
- }
- if(notification.getOldValue() != null) {
- getDiagramEventBroker().removeNotificationListener((EObject)notification.getOldValue(), this);
- }
- refreshDisplay();
-
- default:
- break;
-
- }
- }
-
- /**
- * notifies that a parameter of the operation has changed.
- *
- * @param parameter
- * the {@link Parameter} that has changed
- * @param notification
- * the notification send when the element has been changed
- */
- protected void notifyTypeChanged(Notification notification) {
- // should be type.class, but seems to be a bug if this is put instead.
- switch(notification.getFeatureID(notification.getNotifier().getClass())) {
- case UMLPackage.TYPE__NAME:
- case UMLPackage.TYPE__TEMPLATE_PARAMETER:
- case UMLPackage.TYPE__VISIBILITY:
- refreshDisplay();
- break;
- default:
- // does nothing in other cases
- break;
- }
- }
-
- /**
- * notifies that the the property has changed.
- *
- * @param operation
- * the operation that has changed
- * @param notification
- * the notification send when the element has been changed
- */
- protected void notifyOperationChanged(Operation operation, Notification notification) {
- switch(notification.getFeatureID(Operation.class)) {
- case UMLPackage.OPERATION__NAME:
- case UMLPackage.OPERATION__VISIBILITY:
- case UMLPackage.OPERATION__IS_UNIQUE:
- case UMLPackage.OPERATION__REDEFINED_OPERATION:
- case UMLPackage.OPERATION__IS_ORDERED:
- case UMLPackage.OPERATION__LOWER:
- case UMLPackage.OPERATION__UPPER:
- case UMLPackage.OPERATION__IS_STATIC:
- refreshDisplay();
- break;
- case UMLPackage.OPERATION__OWNED_PARAMETER:
- parameterListChange(notification);
- break;
- default:
- // does nothing in other cases
- break;
- }
- }
-
-
- private void notifySignalChanged(Signal signal, Notification notification) {
- switch(notification.getFeatureID(Signal.class)) {
- case UMLPackage.SIGNAL__NAME:
- case UMLPackage.SIGNAL__VISIBILITY:
- refreshDisplay();
- break;
- case UMLPackage.SIGNAL__OWNED_ATTRIBUTE:
- parameterListChange(notification);
- break;
- default:
- // does nothing in other cases
- break;
- }
- }
-
- /**
- * Checks if the given object is one of the parameter type of the operation
- *
- * @param object
- * the object to test
- * @param operation
- * @return <code>true</code> if the object corresponds to the type of a parameter of the
- * operation
- */
- protected boolean isParameterType(Object object, Operation operation) {
- if(!(object instanceof Type)) {
- return false;
- }
-
- for(Parameter parameter : operation.getOwnedParameters()) {
- if(object.equals(parameter.getType())) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Checks if the given object is one of the parameter of the operation
- *
- * @param object
- * the object to test
- * @param operation
- * @return <code>true</code> if the object is a parameter of the operation
- */
- protected boolean isParameter(Object object, Operation operation) {
- if(!(object instanceof Parameter)) {
- return false;
- }
-
- return operation.getOwnedParameters().contains(object);
- }
-
- private boolean isPropertyType(Object object, Signal signal) {
- if(!(object instanceof Type)) {
- return false;
- }
-
- for(Property property :signal.getOwnedAttributes()) {
- if(object.equals(property.getType())) {
- return true;
- }
- }
- return false;
- }
-
- private boolean isProperty(Object object, Signal signal) {
- if(!(object instanceof Property)) {
- return false;
- }
-
- return signal.getOwnedAttributes().contains(object);
- }
-
- static class MessageLabelHelper extends StereotypedElementLabelHelper{
- /**
- * singelton instance
- */
- private static MessageLabelHelper labelHelper;
-
- /** Map for masks */
- protected final Map<Integer, String> masks = new HashMap<Integer, String>(11);
-
- protected MessageLabelHelper() {
- // initialize the map
- masks.put(ICustomAppearence.DISP_VISIBILITY, "Visibility");
- masks.put(ICustomAppearence.DISP_NAME, "Name");
- masks.put(ICustomAppearence.DISP_PARAMETER_NAME, "Parameters Name");
- masks.put(ICustomAppearence.DISP_PARAMETER_DIRECTION, "Parameters Direction");
- masks.put(ICustomAppearence.DISP_PARAMETER_TYPE, "Parameters Type");
- masks.put(ICustomAppearence.DISP_RT_TYPE, "Return Type");
- masks.put(ICustomAppearence.DISP_PARAMETER_MULTIPLICITY, "Parameters Multiplicity");
- masks.put(ICustomAppearence.DISP_PARAMETER_DEFAULT, "Parameters Default Value");
- masks.put(ICustomAppearence.DISP_DERIVE, "Parameters Value");
- masks.put(ICustomAppearence.DISP_PARAMETER_MODIFIERS, "Parameters Modifiers");
- masks.put(ICustomAppearence.DISP_MOFIFIERS, "Modifiers");
-
- }
-
- /**
- * Returns the singleton instance of this class
- *
- * @return the singleton instance.
- */
- public static MessageLabelHelper getInstance() {
- if(labelHelper == null) {
- labelHelper = new MessageLabelHelper();
- }
- return labelHelper;
- }
-
- public Message getUMLElement(GraphicalEditPart editPart) {
- EObject e = ((View)editPart.getModel()).getElement();
- if(e instanceof Message)
- return ((Message)e);
- return null;
- }
-
- protected String elementLabel(GraphicalEditPart editPart) {
- if(editPart instanceof LabelEditPart)
- editPart = (GraphicalEditPart)editPart.getParent();
-
- int displayValue = MessagePreferencePage.DEFAULT_LABEL_DISPLAY;
-
- IMaskManagedLabelEditPolicy policy = (IMaskManagedLabelEditPolicy)editPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(policy != null) {
- displayValue = policy.getCurrentDisplayValue();
- }
- Message e = getUMLElement(editPart);
- NamedElement signature = e.getSignature();
-
- if(signature instanceof Operation) {
- return OperationUtil.getCustomLabel(e, (Operation)signature, displayValue);
- }else if(signature instanceof Signal) {
- return SignalUtil.getCustomLabel(e, (Signal)signature, displayValue);
- } else if(signature != null) {
- return signature.getName();
- }
-
- return e.getName();
- }
-
- public String getMaskLabel(int value) {
- return masks.get(value);
- }
-
- public Collection<String> getMaskLabels() {
- return masks.values();
- }
-
- public Map<Integer, String> getMasks() {
- return masks;
- }
-
- public Set<Integer> getMaskValues() {
- return masks.keySet();
- }
- }
-
- static public class SignalUtil {
- private static String getCustomPropertyLabel(Message e, Property property, int style) {
- StringBuffer buffer = new StringBuffer();
- // visibility
-
- buffer.append(" ");
- if((style & ICustomAppearence.DISP_VISIBILITY) != 0) {
- buffer.append(NamedElementUtil.getVisibilityAsSign(property));
- }
-
- // derived property
- if((style & ICustomAppearence.DISP_DERIVE) != 0) {
- if(property.isDerived()) {
- buffer.append("/");
- }
- }
-
- boolean showEqualMark = false;
- // name
- if((style & ICustomAppearence.DISP_PARAMETER_NAME) != 0) {
- buffer.append(" ");
- String name = trimToEmpty(property.getName());
- if(name.trim().length() > 0)
- showEqualMark = true;
- buffer.append(name);
- }
-
- if((style & ICustomAppearence.DISP_PARAMETER_TYPE) != 0) {
- // type
- if(property.getType() != null) {
- buffer.append(": " + trimToEmpty(property.getType().getName()));
- } else {
- buffer.append(": " + TypeUtil.UNDEFINED_TYPE_NAME);
- }
- showEqualMark = true;
- }
-
- if((style & ICustomAppearence.DISP_MULTIPLICITY) != 0) {
- // multiplicity -> do not display [1]
- String multiplicity = MultiplicityElementUtil.getMultiplicityAsString(property);
- buffer.append(multiplicity);
- }
-
- if((style & ICustomAppearence.DISP_DERIVE) != 0) {
- String value = getValue(e, property);
- if(value != null){
- if(showEqualMark)
- buffer.append(" = ");
- buffer.append(value);
- }
- }else if((style & ICustomAppearence.DISP_PARAMETER_DEFAULT) != 0) {
- // default value
- if(property.getDefault() != null) {
- if(showEqualMark)
- buffer.append(" = ");
- buffer.append(property.getDefault());
- }
- }
-
- if((style & ICustomAppearence.DISP_MOFIFIERS) != 0) {
- boolean multiLine = ((style & ICustomAppearence.DISP_MULTI_LINE) != 0);
- // property modifiers
- String modifiers = PropertyUtil.getModifiersAsString(property, multiLine);
- if(!modifiers.equals("")) {
- if(multiLine) {
- buffer.append("\n");
- }
-
- if (!buffer.toString().endsWith(" ")){
- buffer.append(" ");
- }
-
- buffer.append(modifiers);
- }
- }
- return buffer.toString();
- }
-
- private static String getValue(Message e, Property property) {
- try {
- Signal signal = (Signal)property.getOwner();
- int index = signal.getOwnedAttributes().indexOf(property);
- EList<ValueSpecification> arguments = e.getArguments();
- if(arguments.size() > index){
- return ValueSpecificationUtil.getSpecificationValue( arguments.get(index) );
- }
- } catch (Exception e1) {
- }
- return null;
- }
-
- /**
- * return the custom label of the signal, given UML2 specification and a custom style.
- * @param e
- *
- * @param style
- * the integer representing the style of the label
- *
- * @return the string corresponding to the label of the signal
- */
- public static String getCustomLabel(Message e, Signal signal, int style) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(" "); // adds " " first for correct display considerations
-
- // visibility
- if((style & ICustomAppearence.DISP_VISIBILITY) != 0) {
- buffer.append(NamedElementUtil.getVisibilityAsSign(signal));
- }
-
- // name
- if((style & ICustomAppearence.DISP_NAME) != 0) {
- buffer.append(" ");
- buffer.append(trimToEmpty(signal.getName()));
- }
-
- //
- // parameters : '(' parameter-list ')'
- buffer.append("(");
- buffer.append(getPropertiesAsString(e, signal, style));
- buffer.append(")");
-
- return buffer.toString();
- }
-
- /**
- * Returns signal properties as a string, the label is customized using a bit mask
- *
- * @return a string containing all properties separated by commas
- */
- private static String getPropertiesAsString(Message e, Signal signal, int style) {
- StringBuffer propertiesString = new StringBuffer();
- boolean firstProperty = true;
- for(Property property : signal.getOwnedAttributes()) {
- // get the label for this property
- String propertyString = getCustomPropertyLabel(e, property, style);
- if(!propertyString.trim().equals("")) {
- if(!firstProperty) {
- propertiesString.append(", ");
- }
- propertiesString.append(propertyString);
- firstProperty = false;
- }
- }
- return propertiesString.toString();
- }
- }
-
- static class OperationUtil {
- public static String getCustomLabel(Message e, int paramIndex, Parameter parameter, int style) {
- StringBuffer buffer = new StringBuffer();
- // visibility
- buffer.append(" ");
- if((style & ICustomAppearence.DISP_VISIBILITY) != 0) {
- buffer.append(NamedElementUtil.getVisibilityAsSign(parameter));
- }
-
- // direction property
- if((style & ICustomAppearence.DISP_PARAMETER_DIRECTION) != 0) {
- buffer.append(" ");
- buffer.append(parameter.getDirection().getLiteral());
- }
-
- boolean showEqualMark = false;
- // name
- if((style & ICustomAppearence.DISP_PARAMETER_NAME) != 0) {
- buffer.append(" ");
- String name = trimToEmpty(parameter.getName());
- if(name.trim().length() > 0)
- showEqualMark = true;
- buffer.append(name);
- }
-
- if((style & ICustomAppearence.DISP_PARAMETER_TYPE) != 0) {
- // type
- if(parameter.getType() != null) {
- buffer.append(": " + trimToEmpty(parameter.getType().getName()));
- } else {
- buffer.append(": " + TypeUtil.UNDEFINED_TYPE_NAME);
- }
- showEqualMark = true;
- }
-
- if((style & ICustomAppearence.DISP_PARAMETER_MULTIPLICITY) != 0) {
- // multiplicity -> do not display [1]
- String multiplicity = MultiplicityElementUtil.getMultiplicityAsString(parameter);
- buffer.append(multiplicity);
- }
-
- if((style & ICustomAppearence.DISP_DERIVE) != 0) {
- String value = getValue(e, paramIndex, parameter);
- if(value != null){
- if(showEqualMark)
- buffer.append(" = ");
- buffer.append(value);
- }
- }else if((style & ICustomAppearence.DISP_PARAMETER_DEFAULT) != 0) {
- // default value
- if(parameter.getDefault() != null) {
- if(showEqualMark)
- buffer.append(" = ");
- buffer.append(parameter.getDefault());
- }
- }
-
- if((style & ICustomAppearence.DISP_MOFIFIERS) != 0) {
- boolean multiLine = ((style & ICustomAppearence.DISP_MULTI_LINE) != 0);
- // property modifiers
- String modifiers = ParameterUtil.getModifiersAsString(parameter, multiLine);
- if(!modifiers.equals("")) {
- if(multiLine) {
- buffer.append("\n");
- }
- buffer.append(modifiers);
- }
- }
- return buffer.toString();
- }
-
- private static String getValue(Message e, int paramIndex, Parameter parameter) {
- try {
- EList<ValueSpecification> arguments = e.getArguments();
- if(arguments.size() > paramIndex){
- return ValueSpecificationUtil.getSpecificationValue( arguments.get(paramIndex) );
- }
- } catch (Exception e1) {
- }
- return null;
- }
-
- public static String getCustomLabel(Message e, Operation operation, int style) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(" "); // adds " " first for correct display considerations
-
- // visibility
- if((style & ICustomAppearence.DISP_VISIBILITY) != 0) {
- buffer.append(NamedElementUtil.getVisibilityAsSign(operation));
- }
-
- // name
- if((style & ICustomAppearence.DISP_NAME) != 0) {
- buffer.append(" ");
- buffer.append(trimToEmpty(operation.getName()));
- }
-
- //
- // parameters : '(' parameter-list ')'
- buffer.append("(");
- buffer.append(getParametersAsString(e, operation, style));
- buffer.append(")");
-
- // return type
- if((style & ICustomAppearence.DISP_RT_TYPE) != 0) {
- buffer.append(getReturnTypeAsString(operation, style));
- }
-
- // modifiers
- if((style & ICustomAppearence.DISP_MOFIFIERS) != 0) {
- String modifiers = getModifiersAsString(operation);
- if(!modifiers.equals("")) {
- buffer.append("{");
- buffer.append(modifiers);
- buffer.append("}");
- }
- }
- return buffer.toString();
- }
-
- /**
- * Returns operation modifiers as string, separated with comma.
- *
- * @return a string containing the modifiers
- */
- private static String getModifiersAsString(Operation operation) {
- StringBuffer buffer = new StringBuffer();
- boolean needsComma = false;
-
- // Return parameter modifiers
- Parameter returnParameter = OperationUtil.getReturnParameter(operation);
- if(returnParameter != null) {
- // non unique parameter
- if(!returnParameter.isUnique()) {
- buffer.append("nonunique");
- needsComma = true;
- }
-
- // return parameter has ordered values
- if(returnParameter.isOrdered()) {
- if(needsComma) {
- buffer.append(", ");
- }
- buffer.append("ordered");
- needsComma = true;
- }
- }
-
- // is the operation a query ?
- if(operation.isQuery()) {
- if(needsComma) {
- buffer.append(", ");
- }
- buffer.append("query");
- needsComma = true;
- }
-
- // is the operation redefining another operation ?
- Iterator<Operation> it = operation.getRedefinedOperations().iterator();
- while(it.hasNext()) {
- Operation currentOperation = it.next();
- if(needsComma) {
- buffer.append(", ");
- }
- buffer.append("redefines ");
- buffer.append(currentOperation.getName());
- needsComma = true;
- }
-
- // has the operation a constraint ?
- Iterator<Constraint> it2 = operation.getOwnedRules().iterator();
- while(it2.hasNext()) {
- Constraint constraint = it2.next();
- if(needsComma) {
- buffer.append(", ");
- }
- if(constraint.getSpecification() != null) {
- buffer.append(constraint.getSpecification().stringValue());
- }
- needsComma = true;
- }
-
- return buffer.toString();
- }
-
- /**
- * Returns return parameter label as a string, string parametrized with a style mask.
- *
- * @param style
- * the mask that indicates which element to display
- * @return a string containing the return parameter type
- */
- private static String getReturnTypeAsString(Operation operation, int style) {
- boolean displayType = ((style & ICustomAppearence.DISP_RT_TYPE) != 0);
- boolean displayMultiplicity = ((style & ICustomAppearence.DISP_RT_MULTIPLICITY) != 0);
- StringBuffer label = new StringBuffer("");
-
- // Retrieve the return parameter (assume to be unique if defined)
- Parameter returnParameter = getReturnParameter(operation);
- // Create the string for the return type
- if(returnParameter == null) {
- // no-operation: label = ""
-
- } else if(!displayType && !displayMultiplicity) {
- // no-operation: label = ""
-
- } else {
- label.append(": ");
- if(displayType) {
- label.append(TypedElementUtil.getTypeAsString(returnParameter));
- }
-
- if(displayMultiplicity) {
- label.append(MultiplicityElementUtil.getMultiplicityAsString(returnParameter));
- }
- }
- return label.toString();
- }
-
- /**
- * Gives the return parameter for this operation, or <code>null</code> if none exists.
- *
- * @return the return parameter of the operation or <code>null</code>
- */
- private static Parameter getReturnParameter(Operation operation) {
- // Retrieve the return parameter (assume to be unique if defined)
- Parameter returnParameter = null;
-
- Iterator<Parameter> it = operation.getOwnedParameters().iterator();
- while((returnParameter == null) && (it.hasNext())) {
- Parameter parameter = it.next();
- if(parameter.getDirection().equals(ParameterDirectionKind.RETURN_LITERAL)) {
- returnParameter = parameter;
- }
- }
- return returnParameter;
- }
-
- /**
- * Returns operation parameters as a string, the label is customized using a bit mask
- * @param e
- *
- * @return a string containing all parameters separated by commas
- */
- private static String getParametersAsString(Message e, Operation operation, int style) {
- StringBuffer paramString = new StringBuffer();
- Iterator<Parameter> paramIterator = operation.getOwnedParameters().iterator();
- boolean firstParameter = true;
- int paramIndex = 0;
- while(paramIterator.hasNext()) {
- Parameter parameter = paramIterator.next();
- // Do not include return parameters
- if(!parameter.getDirection().equals(ParameterDirectionKind.RETURN_LITERAL)) {
- // get the label for this parameter
- String parameterString = getCustomLabel(e, paramIndex, parameter, style);
- paramIndex ++;
- if (!parameterString.trim().equals("")) {
- if (!firstParameter) {
- paramString.append(", ");
- }
- paramString.append(parameterString);
- firstParameter = false;
- }
- }
- }
- return paramString.toString();
- }
- }
-
- static String trimToEmpty(String str){
- return str == null? "" : str;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MoveableNonResizableLabelEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MoveableNonResizableLabelEditPolicy.java
deleted file mode 100644
index 70dd691b1e6..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MoveableNonResizableLabelEditPolicy.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Polyline;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.DragTracker;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editparts.AbstractConnectionEditPart;
-import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx;
-import org.eclipse.gmf.runtime.diagram.ui.internal.figures.LabelHelper;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx;
-import org.eclipse.gmf.runtime.draw2d.ui.geometry.PointListUtilities;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * This class offers the same features as {@link NonResizableLabelEditPolicy}, except that move is privileged instead of drag and drop.
- * It is useful for edit parts on messages.
- */
-public class MoveableNonResizableLabelEditPolicy extends NonResizableEditPolicyEx {
-
- @Override
- protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
- mh.setBorder(null);
- mh.setDragTracker(createSelectionHandleDragTracker());
- return Collections.singletonList(mh);
- }
-
- private Polyline tether = null;
-
- protected void eraseChangeBoundsFeedback(ChangeBoundsRequest request) {
- super.eraseChangeBoundsFeedback(request);
- if(tether != null)
- removeFeedback(tether);
- tether = null;
- }
-
- protected IFigure createDragSourceFeedbackFigure() {
- IFigure feedback = super.createDragSourceFeedbackFigure();
- tether = new Polyline();
- tether.setLineStyle(Graphics.LINE_DASHDOT);
- tether.setForegroundColor(((IGraphicalEditPart)getHost()).getFigure().getForegroundColor());
- addFeedback(tether);
- return feedback;
- }
-
- /**
- * Calculates a point located at the middel of the parent connection
- *
- * @return the point
- */
- private Point getReferencePoint() {
- if(getHost().getParent() instanceof AbstractConnectionEditPart) {
- PointList ptList = ((Connection)((ConnectionEditPart)getHost().getParent()).getFigure()).getPoints();
- Point refPoint = PointListUtilities.calculatePointRelativeToLine(ptList, 0, 50, true);
- return refPoint;
- } else if(getHost().getParent() instanceof GraphicalEditPart) {
- return ((AbstractGraphicalEditPart)getHost().getParent()).getFigure().getBounds().getCenter();
- }
- return null;
- }
-
- protected void showChangeBoundsFeedback(ChangeBoundsRequest request) {
- super.showChangeBoundsFeedback(request);
-
- IFigure p = getDragSourceFeedbackFigure();
- Rectangle r = p.getBounds();
- Point refPoint = getReferencePoint();
-
- // translate the feedback figure
- PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
- getHostFigure().translateToAbsolute(rect);
- rect.translate(request.getMoveDelta());
- rect.resize(request.getSizeDelta());
- p.translateToRelative(rect);
- p.setBounds(rect);
-
- Rectangle centerMain = null;
- // TODO: remove this hack. We should be using the reference point for
- // the teher end, however,
- // the reference point is causing miscaculation when positioning. This
- // has to be redone in version 2.
- if(((IGraphicalEditPart)getHost().getParent()).getFigure() instanceof Connection) {
- centerMain = new Rectangle(refPoint.x, refPoint.y, 0, 0);
- getHostFigure().translateToAbsolute(centerMain);
- p.translateToRelative(centerMain);
- } else {
- centerMain = ((IGraphicalEditPart)getHost().getParent()).getFigure().getBounds().getCopy();
- centerMain.translate(centerMain.width / 2, centerMain.height / 2);
- getHostFigure().translateToAbsolute(centerMain);
- p.translateToRelative(centerMain);
- }
-
- PrecisionRectangle ref = new PrecisionRectangle(centerMain);
-
- Point midTop = new Point(r.x + r.width / 2, r.y);
- Point midBottom = new Point(r.x + r.width / 2, r.y + r.height);
- Point midLeft = new Point(r.x, r.y + r.height / 2);
- Point midRight = new Point(r.x + r.width, r.y + r.height / 2);
-
- Point startPoint = midTop;
-
- int x = r.x + r.width / 2 - refPoint.x;
- int y = r.y + r.height / 2 - refPoint.y;
-
- if(y > 0 && y > x && y > -x)
- startPoint = midTop;
- else if(y < 0 && y < x && y < -x)
- startPoint = midBottom;
- else if(x < 0 && y > x && y < -x)
- startPoint = midRight;
- else
- startPoint = midLeft;
-
- tether.setStart(startPoint);
- tether.setEnd(ref.getLocation());
- }
-
- protected Command getMoveCommand(ChangeBoundsRequest request) {
- GraphicalEditPart editPart = (GraphicalEditPart)getHost();
- Point refPoint = getReferencePoint();
-
- // translate the feedback figure
- PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
- getHostFigure().translateToAbsolute(rect);
- rect.translate(request.getMoveDelta());
- rect.resize(request.getSizeDelta());
- getHostFigure().translateToRelative(rect);
-
- Point normalPoint = LabelHelper.offsetFromRelativeCoordinate(getHostFigure(), rect, refPoint);
-
- ICommand moveCommand = new SetBoundsCommand(editPart.getEditingDomain(), DiagramUIMessages.MoveLabelCommand_Label_Location, new EObjectAdapter((View)editPart.getModel()), normalPoint);
- return new ICommandProxy(moveCommand);
- }
-
- /**
- * Overridden to use a customized drag tracker for the handles. The <code>isMove()</code> method of the drag tracker needs to be overridden
- * as the parent of the label and connection will not be the same as the
- * target editpart, instead it returns true always since labels can only be
- * moved and not resized.
- *
- * @return a drag tracker
- */
- protected DragTracker createSelectionHandleDragTracker() {
- return new DragEditPartsTrackerEx(getHost()) {
-
- protected boolean isMove() {
- return true;
- }
- };
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ObservationLinkPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ObservationLinkPolicy.java
deleted file mode 100644
index f5cd849fe7b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ObservationLinkPolicy.java
+++ /dev/null
@@ -1,728 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.FeedbackHelper;
-import org.eclipse.gef.requests.CreateConnectionRequest;
-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.CompositeCommand;
-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.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.IdentityAnchor;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.RelativeBendpoints;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint;
-import org.eclipse.gmf.runtime.notation.impl.ConnectorImpl;
-import org.eclipse.papyrus.uml.diagram.sequence.ObservationLinkMetamodelType;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ObservationLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.MessageSort;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.TimeObservation;
-
-/**
- * This policy is to process observation link creating, reconnecting
- *
- */
-public class ObservationLinkPolicy extends GraphicalNodeEditPolicy {
- private final EditPart editPart;
-
- public ObservationLinkPolicy(EditPart editPart) {
- this.editPart = editPart;
- }
-
- public Command getCommand(Request request) {
- if(request instanceof CreateUnspecifiedTypeConnectionRequest){
- if(((CreateUnspecifiedTypeConnectionRequest) request).getElementTypes().contains(ObservationLinkMetamodelType.getInstance())){
- if (SequenceUtil.OBSERVATION_LINK_REQUEST_START.equals(request.getType()))
- return getConnectionCreateCommand((CreateConnectionRequest) request);
- if (SequenceUtil.OBSERVATION_LINK_REQUEST_END.equals(request.getType()))
- return getConnectionCompleteCommand((CreateConnectionRequest) request);
- }
- return null;
- }
- if(request instanceof CreateConnectionRequest){
- CreateConnectionRequest cc = (CreateConnectionRequest) request;
- if(cc.getNewObject()!=null){
- if(cc.getNewObject() instanceof ObservationLink){
- if (SequenceUtil.OBSERVATION_LINK_REQUEST_START.equals(request.getType()))
- return getConnectionCreateCommand((CreateConnectionRequest) request);
- if (SequenceUtil.OBSERVATION_LINK_REQUEST_END.equals(request.getType()))
- return getConnectionCompleteCommand((CreateConnectionRequest) request);
- }
- }
- return null;
- }
- if(request instanceof ReconnectRequest){
- ReconnectRequest rr = (ReconnectRequest) request;
- if(rr.getConnectionEditPart() instanceof ObservationLinkEditPart){
- if (SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_SOURCE.equals(request.getType()))
- return getReconnectSourceCommand((ReconnectRequest) request);
- if (SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_TARGET.equals(request.getType()))
- return getReconnectTargetCommand((ReconnectRequest) request);
- }
-
- }
-
- return null;
- }
-
- public EditPart getTargetEditPart(Request request) {
- if (SequenceUtil.OBSERVATION_LINK_REQUEST_START.equals(request.getType())
- || SequenceUtil.OBSERVATION_LINK_REQUEST_END.equals(request.getType())
- || SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_SOURCE.equals(request.getType())
- || SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_TARGET.equals(request.getType())){
- if (request instanceof CreateConnectionRequest) {
- if (((CreateConnectionRequest) request).getSourceEditPart() instanceof TimeObservationLabelEditPart) {
- if (getHost() instanceof AbstractMessageEditPart) {
- return null;
- }
- }
- }
- if(SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_TARGET.equals(request.getType())){
- if (request instanceof ReconnectRequest) {
- if (((ReconnectRequest) request).getConnectionEditPart().getSource() instanceof TimeObservationLabelEditPart) {
- if (getHost() instanceof AbstractMessageEditPart) {
- return null;
- }
- }
- }
- }
- return getHost();
- }
- return null;
- }
-
- @Override
- protected Command getConnectionCreateCommand(
- CreateConnectionRequest request) {
- EditPart host = getHost();
- if(host instanceof TimeObservationLabelEditPart){
- TimeObservationLabelEditPart timeObservationLabelEditPart = (TimeObservationLabelEditPart)host;
- if(timeObservationLabelEditPart.getSourceConnections().size()>0){
- return null;
- }
- }else if(host instanceof DurationObservationEditPart){
- DurationObservationEditPart durationObservationEditPart = (DurationObservationEditPart)host;
- if(durationObservationEditPart.getSourceConnections().size()>0){
- return null;
- }
- }else{
- return null;
- }
-
- CompositeCommand cc = new CompositeCommand(
- DiagramUIMessages.Commands_CreateCommand_Connection_Label);
-
- CreateObservationLinkCommand cmd = new CreateObservationLinkCommand(((GraphicalEditPart) editPart).getEditingDomain(), "Create connection command", null);
-
- cmd.setSourceEditPart(host);
- cmd.setRequest(request);
-
- cc.compose(cmd);
- Command c = new ICommandProxy(cc);
- request.setStartCommand(c);
- return c;
- }
-
- @Override
- protected Command getConnectionCompleteCommand(
- final CreateConnectionRequest request) {
- EditPart sourceEditPart = request.getSourceEditPart();
-
- if((sourceEditPart instanceof TimeObservationLabelEditPart)&&!(getHost() instanceof LifelineEditPart)){
- return null;
- }else if(sourceEditPart instanceof DurationObservationEditPart&&!(getHost() instanceof AbstractMessageEditPart)){
- return null;
- }
-
- ICommandProxy proxy = (ICommandProxy) request
- .getStartCommand();
- if (proxy == null) {
- return null;
- }
-
- CompositeCommand result = new CompositeCommand("Add observation link command");
-
- if(sourceEditPart instanceof TimeObservationLabelEditPart){
- result.add(new UpdateTimeObservationLinkTargetElementCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), "Update semantic model", null, request,getHost()));
- }else if(sourceEditPart instanceof DurationObservationEditPart){
- result.add(new UpdateDurationObservationLinkTargetElementCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), "Update semantic model", null, request,getHost()));
- }
-
- //1:
- CompositeCommand cc = (CompositeCommand) proxy.getICommand();
- Iterator commandItr = cc.iterator();
- CreateObservationLinkCommand createConnectorViewCommand = (CreateObservationLinkCommand) commandItr.next();
- createConnectorViewCommand.setSourceEditPart(request.getSourceEditPart());
- createConnectorViewCommand.setTargetEditPart(request.getTargetEditPart());
-
- result.add(cc);
- return new ICommandProxy(result);
- }
-
- @Override
- protected Command getReconnectSourceCommand(final ReconnectRequest request) {
- Command reconnectSourceCommand = super
- .getReconnectSourceCommand(request);
- ICommandProxy proxy = (ICommandProxy) reconnectSourceCommand;
- CompositeCommand cc = (CompositeCommand) proxy.getICommand();
-
- // update semantic model
- if(request.getConnectionEditPart().getSource() instanceof TimeObservationLabelEditPart && getHost() instanceof TimeObservationLabelEditPart){
- TimeObservationLabelEditPart timeObservationLabelEditPart = (TimeObservationLabelEditPart)getHost();
- if(timeObservationLabelEditPart.getSourceConnections().size()>0){
- return null;
- }
- cc.add(new UpdateTimeObservationLinkSourceElementCommand(
- ((IGraphicalEditPart) getHost()).getEditingDomain(),
- "Update semantic model", null, request, getHost()));
- }else if(request.getConnectionEditPart().getSource() instanceof DurationObservationEditPart && getHost() instanceof DurationObservationEditPart){
- DurationObservationEditPart durationObservationEditPart = (DurationObservationEditPart)getHost();
- if(durationObservationEditPart.getSourceConnections().size()>0){
- return null;
- }
- cc.add(new UpdateDurationObservationLinkSourceElementCommand(
- ((IGraphicalEditPart) getHost()).getEditingDomain(),
- "Update semantic model", null, request, getHost()));
- }
-
- return reconnectSourceCommand;
- }
-
- @Override
- protected Command getReconnectTargetCommand(final ReconnectRequest request) {
- Command reconnectTargetCommand = super
- .getReconnectTargetCommand(request);
- ICommandProxy proxy = (ICommandProxy) reconnectTargetCommand;
- CompositeCommand cc = (CompositeCommand) proxy.getICommand();
-
- // update semantic model
- if(request.getConnectionEditPart().getSource() instanceof TimeObservationLabelEditPart){
- cc.add(new UpdateTimeObservationLinkTargetElementCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), "Update semantic model", null, request,getHost()));
- }else if(request.getConnectionEditPart().getSource() instanceof DurationObservationEditPart){
- cc.add(new UpdateDurationObservationLinkTargetElementCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), "Update semantic model", null, request,getHost()));
- }
-
- return proxy;
- }
-
- @Override
- public void showSourceFeedback(Request request) {
- if ((SequenceUtil.OBSERVATION_LINK_REQUEST_END).equals(request.getType()))
- showCreationFeedback((CreateConnectionRequest) request);
- }
-
- protected FeedbackHelper getFeedbackHelper(CreateConnectionRequest request) {
- if (feedbackHelper == null) {
- feedbackHelper = new FeedbackHelper();
- Point p = request.getLocation();
- connectionFeedback = createDummyConnection(request);
- connectionFeedback
- .setConnectionRouter(getDummyConnectionRouter(request));
- connectionFeedback
- .setSourceAnchor(getSourceConnectionAnchor(request));
- connectionFeedback.setForegroundColor(ColorConstants.black);
- feedbackHelper.setConnection(connectionFeedback);
- addFeedback(connectionFeedback);
- feedbackHelper.update(null, p);
- }
- return feedbackHelper;
- }
-
- @Override
- public void showTargetFeedback(Request request) {
- if (SequenceUtil.OBSERVATION_LINK_REQUEST_START.equals(request.getType())
- || SequenceUtil.OBSERVATION_LINK_REQUEST_END.equals(request.getType())
- || SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_SOURCE.equals(request.getType())
- || SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_TARGET.equals(request.getType()))
- showTargetConnectionFeedback((DropRequest) request);
- }
-
- @Override
- public void eraseSourceFeedback(Request request) {
- if ( SequenceUtil.OBSERVATION_LINK_REQUEST_END.equals(request.getType()))
- eraseCreationFeedback((CreateConnectionRequest) request);
- }
-
- @Override
- public void eraseTargetFeedback(Request request) {
- if (SequenceUtil.OBSERVATION_LINK_REQUEST_START.equals(request.getType())
- || SequenceUtil.OBSERVATION_LINK_REQUEST_END.equals(request.getType())
- || SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_SOURCE.equals(request.getType())
- || SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_TARGET.equals(request.getType()))
- eraseTargetConnectionFeedback((DropRequest) request);
- }
-
- private class UpdateDurationObservationLinkSourceElementCommand extends
- AbstractTransactionalCommand {
- private final ReconnectRequest request;
- private EditPart hostPart;
- private DurationObservationEditPart sourceTolEP;
-
- List<OccurrenceSpecification> occList = Collections.emptyList();
-
- public UpdateDurationObservationLinkSourceElementCommand(
- TransactionalEditingDomain domain, String label,
- List affectedFiles, ReconnectRequest request, EditPart hostPart) {
- super(domain, label, affectedFiles);
- this.request = request;
- sourceTolEP = (DurationObservationEditPart) request
- .getConnectionEditPart().getSource();
- this.hostPart = hostPart;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- if (sourceTolEP == hostPart) {
- return CommandResult.newCancelledCommandResult();
- }
-
- View sourceView = (View) sourceTolEP.getModel();
- DurationObservation sourceDurationObservation = (DurationObservation) sourceView
- .getElement();
-
- DurationObservationEditPart targetDoEP = (DurationObservationEditPart) hostPart;
- View targetView = (View) targetDoEP.getModel();
- DurationObservation targetDurationObservation = (DurationObservation) targetView
- .getElement();
- targetDurationObservation.getEvents().addAll(
- sourceDurationObservation.getEvents());
-
- sourceDurationObservation.getEvents().clear();
- return CommandResult.newOKCommandResult();
- }
-
- @Override
- public boolean canExecute() {
- if (hostPart instanceof DurationObservationEditPart) {
- return true;
- }
- return false;
- }
-
- }
-
- public class UpdateDurationObservationLinkTargetElementCommand extends
- AbstractTransactionalCommand {
- private final Request request;
- private EditPart hostPart;
-
- public UpdateDurationObservationLinkTargetElementCommand(
- TransactionalEditingDomain domain, String label,
- List affectedFiles, Request request, EditPart hostPart) {
- super(domain, label, affectedFiles);
- this.request = request;
- this.hostPart = hostPart;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- DurationObservationEditPart doEP = null;
- if (request instanceof CreateConnectionRequest) {
- doEP = (DurationObservationEditPart) (((CreateConnectionRequest) request).getSourceEditPart());
- } else if (request instanceof ReconnectRequest) {
- doEP = (DurationObservationEditPart) (((ReconnectRequest) request).getConnectionEditPart().getSource());
- }
- View view = (View) doEP.getModel();
- DurationObservation durationObservation = (DurationObservation) view.getElement();
- EList<NamedElement> events = durationObservation.getEvents();
- // if is reconnect operation, first remove orginal message event of DurationObservation
- if (request instanceof ReconnectRequest) {
- events.clear();
- }
- Map<String, Object> extendedData = request.getExtendedData();
- // assign the occurrence specification
- Object paramOcc1 = extendedData
- .get(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
- Object paramOcc2 = extendedData
- .get(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2);
- if (paramOcc1 != null && paramOcc2 != null) {
- events.add((OccurrenceSpecification) paramOcc1);
- events.add((OccurrenceSpecification) paramOcc2);
- }
- return CommandResult.newOKCommandResult();
- }
-
- @Override
- public boolean canExecute() {
- if (hostPart instanceof ConnectionNodeEditPart) {
- Map<String, Object> extendedData = request.getExtendedData();
-
- if (hostPart instanceof AbstractMessageEditPart) {
- AbstractMessageEditPart messageEP = (AbstractMessageEditPart) hostPart;
- View view = (View) messageEP.getModel();
- Message message = (Message) view.getElement();
-
- if (message.getSendEvent() != null)
- extendedData
- .put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION,
- message.getSendEvent());
- if (message.getReceiveEvent() != null)
- extendedData
- .put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2,
- message.getReceiveEvent());
- }
-
- if (extendedData
- .containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION)
- && extendedData
- .containsKey(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2)) {
- return true;
- }
- }
- return false;
- }
-
- }
-
- private class UpdateTimeObservationLinkSourceElementCommand extends
- AbstractTransactionalCommand {
- private final ReconnectRequest request;
- private EditPart hostPart;
- private TimeObservationLabelEditPart sourceTolEP;
-
- List<OccurrenceSpecification> occList = Collections.emptyList();
-
- public UpdateTimeObservationLinkSourceElementCommand(
- TransactionalEditingDomain domain, String label,
- List affectedFiles, ReconnectRequest request, EditPart hostPart) {
- super(domain, label, affectedFiles);
- this.request = request;
- sourceTolEP = (TimeObservationLabelEditPart) request
- .getConnectionEditPart().getSource();
- this.hostPart = hostPart;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- if (sourceTolEP == hostPart) {
- return CommandResult.newCancelledCommandResult();
- }
-
- View sourceView = (View) sourceTolEP.getModel();
- TimeObservation sourceTimeObservation = (TimeObservation) sourceView
- .getElement();
-
- TimeObservationLabelEditPart targetTolEP = (TimeObservationLabelEditPart) hostPart;
- View targetView = (View) targetTolEP.getModel();
- TimeObservation targetTimeObservation = (TimeObservation) targetView
- .getElement();
- targetTimeObservation.setEvent(sourceTimeObservation.getEvent());
-
- sourceTimeObservation.setEvent(null);
- return CommandResult.newOKCommandResult();
- }
-
- @Override
- public boolean canExecute() {
- if (hostPart instanceof TimeObservationLabelEditPart) {
- return true;
- }
- return false;
- }
- }
-
- private class UpdateTimeObservationLinkTargetElementCommand extends
- AbstractTransactionalCommand {
- private final Request request;
- private EditPart hostPart;
-
- List<OccurrenceSpecification> occList = Collections.emptyList();
-
- public UpdateTimeObservationLinkTargetElementCommand(
- TransactionalEditingDomain domain, String label,
- List affectedFiles, Request request, EditPart hostPart) {
- super(domain, label, affectedFiles);
- this.request = request;
- this.hostPart = hostPart;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- TimeObservationLabelEditPart tolEP = null;
- if (request instanceof CreateConnectionRequest) {
- tolEP = (TimeObservationLabelEditPart) (((CreateConnectionRequest) request)
- .getSourceEditPart());
- } else if (request instanceof ReconnectRequest) {
- tolEP = (TimeObservationLabelEditPart) (((ReconnectRequest) request)
- .getConnectionEditPart().getSource());
- }
- View view = (View) tolEP.getModel();
- TimeObservation timeObservation = (TimeObservation) view
- .getElement();
-
- // assign the occurrence specification
- if (!occList.isEmpty()) {
- for (OccurrenceSpecification occurrence : occList) {
- if (occurrence instanceof MessageOccurrenceSpecification) {
- Message mess = ((MessageOccurrenceSpecification) occurrence)
- .getMessage();
- if (mess.getReceiveEvent().equals(occurrence)
- && 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
- timeObservation.setEvent(occurrence);
- break;
- }
- }
-
- // reset request vertical location
- if (timeObservation.getEvent() instanceof MessageOccurrenceSpecification) {
- Point messageOccurrenceLoc = SequenceUtil
- .findLocationOfMessageOccurrence(
- (GraphicalEditPart) hostPart,
- (MessageOccurrenceSpecification) timeObservation
- .getEvent());
- setRequestLocation(messageOccurrenceLoc);
- } else if (timeObservation.getEvent() instanceof ExecutionOccurrenceSpecification) {
- Point executionOccurrenceLoc = SequenceUtil
- .findLocationOfExecutionOccurrence(
- (GraphicalEditPart) hostPart,
- (ExecutionOccurrenceSpecification) timeObservation
- .getEvent());
- setRequestLocation(executionOccurrenceLoc);
- }
-
- return CommandResult.newOKCommandResult();
- }
-
- private void setRequestLocation(Point occurrenceLoc) {
- if(occurrenceLoc == null)
- return;
-
- if (request instanceof CreateConnectionRequest) {
- CreateConnectionRequest req = (CreateConnectionRequest) request;
- req.setLocation(new Point(req.getLocation().x,
- occurrenceLoc.y));
- } else if (request instanceof ReconnectRequest) {
- ReconnectRequest req = (ReconnectRequest) request;
- req.setLocation(new Point(req.getLocation().x,
- occurrenceLoc.y));
- }
- }
-
- @Override
- public boolean canExecute() {
- if (hostPart instanceof LifelineEditPart) {
- Point location = null;
- if (request instanceof CreateConnectionRequest) {
- location = ((CreateConnectionRequest) request)
- .getLocation();
- } else if (request instanceof ReconnectRequest) {
- location = ((ReconnectRequest) request).getLocation();
- }
-
- Entry<Point, List<OccurrenceSpecification>> eventAndLocation = SequenceUtil
- .findNearestEvent(location, (LifelineEditPart) hostPart);
- // find an event near enough to create the
- // constraint or observation
- occList = Collections.emptyList();
- if (eventAndLocation != null) {
- occList = eventAndLocation.getValue();
- }
- if (!occList.isEmpty()) {
- for (OccurrenceSpecification occurrence : occList) {
- if (occurrence instanceof MessageOccurrenceSpecification) {
- Message mess = ((MessageOccurrenceSpecification) occurrence)
- .getMessage();
- if (mess.getReceiveEvent().equals(occurrence)
- && 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;
- }
- }
-
- private class CreateObservationLinkCommand extends AbstractTransactionalCommand {
-
- private EditPart sourceEditPart;
- private EditPart targetEditPart;
-
- private CreateConnectionRequest request;
- private ObservationLink c;
- private String newSourceTerminal;
-
- public CreateObservationLinkCommand(TransactionalEditingDomain domain,
- String label, List affectedFiles) {
- super(domain, label, affectedFiles);
- }
-
- public void setSourceEditPart(EditPart sourceEditPart) {
- this.sourceEditPart = sourceEditPart;
- }
-
- public void setTargetEditPart(EditPart targetEditPart) {
- this.targetEditPart = targetEditPart;
- }
-
- public void setRequest(CreateConnectionRequest request) {
- this.request = request;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- c = new ObservationLink();
- c.setType(SequenceUtil.OBSERVATION_LINK_TYPE);
- c.setElement(null);
-
- View newSourceView = (View) sourceEditPart.getModel();
- c.setSource(newSourceView);
-
- ViewUtil.insertChildView(newSourceView.getDiagram(), c, -1, true);
-
- INodeEditPart ce = (INodeEditPart) sourceEditPart;
- ConnectionAnchor sourceAnchor = ce.getSourceConnectionAnchor(request);
- newSourceTerminal = ce.mapConnectionAnchorToTerminal(sourceAnchor);
- if (newSourceTerminal != null) {
- if (newSourceTerminal.length() == 0)
- c.setSourceAnchor(null);
- else {
- IdentityAnchor a = (IdentityAnchor) c.getSourceAnchor();
- if (a == null)
- a = NotationFactory.eINSTANCE.createIdentityAnchor();
- a.setId(newSourceTerminal);
- c.setSourceAnchor(a);
- }
- }
-
- initCompleteCommand();
-
- return CommandResult.newOKCommandResult();
- }
-
- private void initCompleteCommand() {
- // reset the target edit-part for the request
- if (targetEditPart != null) {
- View newTargetView = ((IGraphicalEditPart) targetEditPart)
- .getNotationView();
- c.setTarget(newTargetView);
- // 3:
- INodeEditPart ce = (INodeEditPart) targetEditPart;
-
- ConnectionAnchor targetAnchor = null;
- if(ce instanceof LifelineEditPart){
- LifelineEditPart lifelinePart = (LifelineEditPart)ce;
- targetAnchor = lifelinePart.getNodeFigure().getTargetConnectionAnchorAt(request.getLocation());
- }else{
- targetAnchor = ce
- .getTargetConnectionAnchor(request);
- }
-
- String newTargetTerminal = ce
- .mapConnectionAnchorToTerminal(targetAnchor);
- if (newTargetTerminal != null) {
- if (newTargetTerminal.length() == 0)
- c.setTargetAnchor(null);
- else {
- IdentityAnchor a = (IdentityAnchor) c.getTargetAnchor();
- if (a == null)
- a = NotationFactory.eINSTANCE.createIdentityAnchor();
- a.setId(newTargetTerminal);
- c.setTargetAnchor(a);
- }
- }
- // 4:
- INodeEditPart sourceEditPart = (INodeEditPart) request
- .getSourceEditPart();
- ConnectionAnchor sourceAnchor = sourceEditPart
- .mapTerminalToConnectionAnchor(newSourceTerminal);
- PointList pointList = new PointList();
- if (request.getLocation() == null) {
- pointList.addPoint(sourceAnchor.getLocation(targetAnchor
- .getReferencePoint()));
- pointList.addPoint(targetAnchor.getLocation(sourceAnchor
- .getReferencePoint()));
- } else {
- pointList.addPoint(sourceAnchor.getLocation(request
- .getLocation()));
- pointList.addPoint(targetAnchor.getLocation(request
- .getLocation()));
- }
- List newBendpoints = new ArrayList();
- int numOfPoints = pointList.size();
- for (short i = 0; i < numOfPoints; i++) {
- Dimension s = pointList.getPoint(i).getDifference(
- sourceAnchor.getReferencePoint());
- Dimension t = pointList.getPoint(i).getDifference(
- targetAnchor.getReferencePoint());
- newBendpoints.add(new RelativeBendpoint(s.width, s.height,
- t.width, t.height));
- }
-
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
- .createRelativeBendpoints();
- bendpoints.setPoints(newBendpoints);
- c.setBendpoints(bendpoints);
-
- }
-
- }
-
- }
-
- public static class ObservationLink extends ConnectorImpl {
- public ObservationLink() {
- super();
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/RemoveOrphanViewPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/RemoveOrphanViewPolicy.java
deleted file mode 100644
index 981e3c2e9ce..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/RemoveOrphanViewPolicy.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.OrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineNameEditPart;
-
-/**
- * this policy is used to suppress orphan node view in GMF view the policy to remove orphan
- * connection is more complex. It is dependent of the diagram. see remove OrphanConnectionView
- * policy
- *
- */
-public class RemoveOrphanViewPolicy extends OrphanViewPolicy {
-
- public int[] notOrphanNode = { LifelineNameEditPart.VISUAL_ID };
-
- public RemoveOrphanViewPolicy() {
- super();
- init(notOrphanNode);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/SequenceGraphicalNodeEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/SequenceGraphicalNodeEditPolicy.java
deleted file mode 100644
index c0a156820f7..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/SequenceGraphicalNodeEditPolicy.java
+++ /dev/null
@@ -1,517 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Polyline;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.CreateConnectionRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest.ConnectionViewAndElementDescriptor;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool.CreateAspectUnspecifiedTypeConnectionRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-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.OccurrenceSpecification;
-
-
-/**
- * A specific policy to handle the message :
- * - Message cannot be uphill.
- * - Message Occurrence Specification which are created along the message may have a different container than the message.
- * - Message feedback on creation is always drawn in black (to avoid invisible feedback)
- *
- */
-@SuppressWarnings({ "restriction", "unchecked", "rawtypes" })
-public class SequenceGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
-
- /** A static margin to allow drawing of straight message */
- private static final int MARGIN = 2;
-
- /**
- * Gets the command to start the creation of a new connection and relationship. This will update the request appropriately. Also completes the
- * request with nearby occurrence specification information.
- *
- * @param request
- * creation request
- * @return Command
- */
- @Override
- protected Command getConnectionAndRelationshipCreateCommand(CreateConnectionViewAndElementRequest request) {
- Map<String, Object> extendedData = request.getExtendedData();
-
- // record the nearest event if necessary
- String requestHint = request.getConnectionViewAndElementDescriptor().getSemanticHint();
- if(isCreatedNearOccurrenceSpecification(requestHint)) {
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(getHost());
- if(lifelinePart != null) {
- Entry<Point, List<OccurrenceSpecification>> eventAndLocation = SequenceUtil.findNearestEvent(request.getLocation(), lifelinePart);
- // find an event near enough to create the constraint or observation
- List<OccurrenceSpecification> events = Collections.emptyList();
- Point location = null;
- if(eventAndLocation != null) {
- location = eventAndLocation.getKey();
- events = eventAndLocation.getValue();
- }
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION, events);
- extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION, location);
- if(location != null) {
- request.setLocation(location);
- }
- }
- }
- return super.getConnectionAndRelationshipCreateCommand(request);
- }
-
- /**
- * Gets the command to complete the creation of a new connection and relationship. Also completes the request with nearby occurrence specification
- * information.
- *
- * @param request
- * the creation request
- * @return Command
- */
- @Override
- protected Command getConnectionAndRelationshipCompleteCommand(CreateConnectionViewAndElementRequest request) {
- Map<String, Object> extendedData = request.getExtendedData();
-
- // record the nearest event if necessary
- String requestHint = request.getConnectionViewAndElementDescriptor().getSemanticHint();
- if(isCreatedNearOccurrenceSpecification(requestHint)) {
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(getHost());
- if(lifelinePart != null) {
- Entry<Point, List<OccurrenceSpecification>> eventAndLocation = SequenceUtil.findNearestEvent(request.getLocation(), lifelinePart);
- // find an event near enough to create the constraint or observation
- List<OccurrenceSpecification> events = Collections.emptyList();
- Point location = null;
- if(eventAndLocation != null) {
- location = eventAndLocation.getKey();
- events = eventAndLocation.getValue();
- }
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2, events);
- extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2, location);
- if(location != null) {
- request.setLocation(location);
- }
- }
- }
- return super.getConnectionAndRelationshipCompleteCommand(request);
- }
-
- /**
- * Return true if creation must be performed to or from an occurrence specification
- *
- * @param requestHint
- * the hint of object to create
- * @return true if creation to or from an occurrence specification
- */
- private boolean isCreatedNearOccurrenceSpecification(String requestHint) {
- String generalOrderingHint = ((IHintedType)UMLElementTypes.GeneralOrdering_4012).getSemanticHint();
- return generalOrderingHint.equals(requestHint);
- }
-
- /**
- * Return true if a message is being created
- *
- * @param requestHint
- * the hint of object to create
- * @return true if creation of a message
- */
- private boolean isMessageHint(String requestHint) {
- List<String> messageHints = new ArrayList<String>(7);
- String messageHint = ((IHintedType)UMLElementTypes.Message_4003).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4004).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4005).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4006).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4007).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4008).getSemanticHint();
- messageHints.add(messageHint);
- messageHint = ((IHintedType)UMLElementTypes.Message_4009).getSemanticHint();
- messageHints.add(messageHint);
- return messageHints.contains(requestHint);
- }
-
- @Override
- protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
- // move source point to the bottom if it is contained in LifelineNameContainerFigure
- EditPart targetEditPart = request.getTargetEditPart();
- if (targetEditPart != null
- && targetEditPart instanceof LifelineEditPart) {
- LifelineEditPart target = (LifelineEditPart) targetEditPart;
- if (target.getPrimaryShape() != null) {
- Rectangle sourceBounds = target.getPrimaryShape()
- .getFigureLifelineNameContainerFigure().getBounds()
- .getCopy();
- Point sourcePointCopy = request.getLocation().getCopy();
- target.getFigure().translateToRelative(sourcePointCopy);
- if (sourcePointCopy.y() < sourceBounds.getBottom().y()) {
- target.getFigure().translateToAbsolute(sourceBounds);
- request.getLocation()
- .setY(sourceBounds.getBottom().y()+1);
- }
- }
-
- }
-
- request.getExtendedData().put(
- SequenceRequestConstant.SOURCE_LOCATION_DATA,
- request.getLocation());
-
- return super.getConnectionCreateCommand(request);
- }
-
- /**
- * Overrides to disable uphill message
- */
- @Override
- protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
- Command command = super.getConnectionCompleteCommand(request);
- if(command == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // disable the following code if we are not creating a message.
- String requestHint = null;
- if(request instanceof CreateConnectionViewRequest) {
- requestHint = ((CreateConnectionViewRequest)request).getConnectionViewDescriptor().getSemanticHint();
- if(!isMessageHint(requestHint)) {
- return command;
- }
- }
- // ICommandProxy proxy = (ICommandProxy)request.getStartCommand();
- // CompositeCommand cc = (CompositeCommand)proxy.getICommand();
- // Iterator<?> commandItr = cc.iterator();
- // while(commandItr.hasNext()) {
- // Object obj = commandItr.next();
- // if(obj instanceof SetConnectionBendpointsCommand) {
- // SetConnectionBendpointsCommand sbbCommand = (SetConnectionBendpointsCommand)obj;
- //final PointList pointList = sbbCommand.getNewPointList();
-
- Point sourcePoint = (Point)request.getExtendedData().get(SequenceRequestConstant.SOURCE_LOCATION_DATA);
- Point targetPoint = request.getLocation();
-
- // prevent uphill message (leave margin for horizontal messages)
- boolean messageCreate =((IHintedType)UMLElementTypes.Message_4006).getSemanticHint().equals(requestHint);
- if(sourcePoint == null || sourcePoint.y >= targetPoint.y + MARGIN) {
- if(!messageCreate && !isLostFoundMessage(requestHint))
- return UnexecutableCommand.INSTANCE;
- }
- // prevent uphill message (for self recursive message)
- if(request.getSourceEditPart().equals(request.getTargetEditPart()) && sourcePoint.y >= targetPoint.y) {
- return UnexecutableCommand.INSTANCE;
- }
- // prevent uphill message (for reply message)
- if(request instanceof CreateConnectionViewAndElementRequest) {
- ConnectionViewAndElementDescriptor desc = ((CreateConnectionViewAndElementRequest)request).getConnectionViewAndElementDescriptor();
- String replyHint = ((IHintedType)UMLElementTypes.Message_4005).getSemanticHint();
- if(replyHint.equals(desc.getSemanticHint()) && request.getSourceEditPart() instanceof IGraphicalEditPart) {
- Rectangle srcBounds = SequenceUtil.getAbsoluteBounds((IGraphicalEditPart)request.getSourceEditPart());
- int bottom = srcBounds.getBottom().y;
- if(bottom >= targetPoint.y + MARGIN) {
- return UnexecutableCommand.INSTANCE;
- }
- }
- }
-
- // prevent duplicate create link
- if( messageCreate && request.getSourceEditPart() != null && request.getTargetEditPart() != null){
- if(LifelineMessageCreateHelper.hasMessageCreate((GraphicalEditPart)request.getSourceEditPart(), request.getTargetEditPart()))
- return UnexecutableCommand.INSTANCE;
- }
-
- request.getExtendedData().put(SequenceRequestConstant.SOURCE_MODEL_CONTAINER, SequenceUtil.findInteractionFragmentContainerAt(sourcePoint, getHost()));
- request.getExtendedData().put(SequenceRequestConstant.TARGET_MODEL_CONTAINER, SequenceUtil.findInteractionFragmentContainerAt(targetPoint, getHost()));
- // In case we are creating a connection to/from a CoRegion, we will need the lifeline element where is drawn the CoRegion later in the process.
- EditPart targetEditPart = getTargetEditPart(request);
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- request.getExtendedData().put(SequenceRequestConstant.LIFELINE_GRAPHICAL_CONTAINER, ((CombinedFragment2EditPart)targetEditPart).getAttachedLifeline());
- }
-
- // change constraint of the target lifeline after added a Create Message
- if (request.getTargetEditPart() instanceof LifelineEditPart
- && !(request.getSourceEditPart().equals(request
- .getTargetEditPart()))) {
- if (requestHint.equals((((IHintedType) UMLElementTypes.Message_4006).getSemanticHint()))) {
- LifelineEditPart target = (LifelineEditPart) request
- .getTargetEditPart();
- command = LifelineMessageCreateHelper.moveLifelineDown(command, target, sourcePoint.getCopy());
- }
- }
-
- return command;
- }
-
- /**
- * Override to disable uphill message
- */
- @Override
- protected Command getReconnectSourceCommand(ReconnectRequest request) {
- if(isUphillMessage(request) && !isLostFoundMessage(request)) {
- return UnexecutableCommand.INSTANCE;
- }
- // prevent duplicate link
- if(request.getConnectionEditPart() instanceof Message4EditPart && request.getTarget() != null && !LifelineMessageCreateHelper.canReconnectMessageCreate(request)){
- return UnexecutableCommand.INSTANCE;
- }
- return super.getReconnectSourceCommand(request);
- }
-
- private boolean isLostFoundMessage(ReconnectRequest request) {
- ConnectionEditPart connectionEditPart = request.getConnectionEditPart();
- if(connectionEditPart instanceof Message7EditPart || connectionEditPart instanceof Message6EditPart )
- return true;
- return false;
- }
-
- private boolean isLostFoundMessage(String requestHint) {
- if(((IHintedType)UMLElementTypes.Message_4008).getSemanticHint().equals(requestHint) || ((IHintedType)UMLElementTypes.Message_4009).getSemanticHint().equals(requestHint))
- return true;
- return false;
- }
-
- /**
- * Override to disable uphill message
- */
- @Override
- protected Command getReconnectTargetCommand(ReconnectRequest request) {
- if(isUphillMessage(request) && !isLostFoundMessage(request)) {
- return UnexecutableCommand.INSTANCE;
- }
- // prevent duplicate link
- if(request.getConnectionEditPart() instanceof Message4EditPart && request.getTarget() != null && !LifelineMessageCreateHelper.canReconnectMessageCreate(request)){
- return UnexecutableCommand.INSTANCE;
- }
-
- return super.getReconnectTargetCommand(request);
- }
-
- /**
- * Check that a message doesn't have its target point above its source point
- *
- * @param request
- * the ReconnectRequest
- * @return true if the target point is above the source point
- */
- protected boolean isUphillMessage(ReconnectRequest request) {
- ConnectionEditPart connectionEditPart = request.getConnectionEditPart();
- if(connectionEditPart.getModel() instanceof Edge) {
- Edge edge = (Edge)connectionEditPart.getModel();
- if(edge.getElement() instanceof Message) {
- if(connectionEditPart.getFigure() instanceof Polyline) {
- // get connection end points translated to absolute
- Polyline polyline = (Polyline)connectionEditPart.getFigure();
- Point end = polyline.getEnd().getCopy();
- Point start = polyline.getStart().getCopy();
- polyline.getParent().translateToAbsolute(end);
- polyline.getParent().translateToAbsolute(start);
-
- // look at the request rather than at both polyline ends which may not be up to date
- if(REQ_RECONNECT_SOURCE.equals(request.getType())) {
- return request.getLocation().y >= end.y + MARGIN;
- } else if(REQ_RECONNECT_TARGET.equals(request.getType())) {
- return start.y >= request.getLocation().y + MARGIN;
- } else {
- return start.y >= end.y + MARGIN;
- }
- }
- }
- }
- return false;
- }
-
-
- /**
- * Overrides to set the color of the dummyConnection to color black.
- * This allow to see the feedback of the connection when it is created.
- * By default, the color was the foreground color of the lifeline, which is always blank leading to an invisible feedback.
- *
- */
- @Override
- protected Connection createDummyConnection(Request req) {
- Connection conn = super.createDummyConnection(req);
- conn.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);
- return conn;
- }
-
- /**
- * Gets a command that pops up a menu which allows the user to select which
- * type of connection to be created and then creates the connection.
- *
- * @param content
- * The list of items making up the content of the popup menu.
- * @param request
- * The relevant create connection request.
- * @return the command to popup up the menu and create the connection
- */
- protected ICommand getPromptAndCreateConnectionCommand(List content, CreateConnectionRequest request) {
- return new SequencePromptAndCreateConnectionCommand(content, request);
- }
-
-
- /**
- * Extends {@link PromptAndCreateConnectionCommand} to specify the type of message that can be selected.
- */
- protected class SequencePromptAndCreateConnectionCommand extends PromptAndCreateConnectionCommand {
-
- /**
- * @see {@link PromptAndCreateConnectionCommand#PromptAndCreateConnectionCommand(List, CreateConnectionRequest)}
- */
- public SequencePromptAndCreateConnectionCommand(List content, CreateConnectionRequest request) {
- super(content, request);
- }
-
-
- /**
- * Defines a specific label provider to handle message.
- */
- @Override
- protected ILabelProvider getLabelProvider() {
- return new LabelProvider() {
-
- @Override
- public String getText(Object object) {
- if(object instanceof IHintedType) {
- IHintedType elementType = (IHintedType)object;
- switch(UMLVisualIDRegistry.getVisualID(elementType.getSemanticHint())) {
- case MessageEditPart.VISUAL_ID:
- return Messages.createMessageSync1CreationTool_title;
- case Message2EditPart.VISUAL_ID:
- return Messages.createMessageAsync2CreationTool_title;
- case Message3EditPart.VISUAL_ID:
- return Messages.createMessageReply3CreationTool_title;
- case Message4EditPart.VISUAL_ID:
- return Messages.createMessageCreate4CreationTool_title;
- case Message5EditPart.VISUAL_ID:
- return Messages.createMessageDelete5CreationTool_title;
- case Message6EditPart.VISUAL_ID:
- return Messages.createMessageLost6CreationTool_title;
- case Message7EditPart.VISUAL_ID:
- return Messages.createMessageFound7CreationTool_title;
- }
- }
- return super.getText(object);
- }
- };
-
- }
- }
-
- public EditPart getTargetEditPart(Request request) {
- if (REQ_CONNECTION_START.equals(request.getType())
- || REQ_CONNECTION_END.equals(request.getType())
- || REQ_RECONNECT_SOURCE.equals(request.getType())
- || REQ_RECONNECT_TARGET.equals(request.getType())){
-
- EditPart host = getHost();
- if(request instanceof CreateConnectionRequest){
- if(host instanceof InteractionEditPart){
- if(REQ_CONNECTION_END.equals(request.getType()) && isCreateConnectionRequest(request,UMLElementTypes.Message_4008 )){
- return host;
- }
- if(REQ_CONNECTION_START.equals(request.getType()) && isCreateConnectionRequest(request,UMLElementTypes.Message_4009 )){
- return host;
- }
-
- InteractionEditPart interactionPart = (InteractionEditPart)host;
- CreateConnectionRequest req = (CreateConnectionRequest)request;
- IFigure figure = interactionPart.getFigure();
- Point location = req.getLocation().getCopy();
- figure.translateToRelative(location);
-
- // if mouse location is far from border, do not handle connection event
- Rectangle innerRetangle = figure.getBounds().getCopy().shrink(20, 20);
- if(innerRetangle.contains(location)){
- return null;
- }
- }else if(host instanceof InteractionOperandEditPart){
- return null;
- }else if(host instanceof CombinedFragmentEditPart){
- CreateConnectionRequest req = (CreateConnectionRequest)request;
- IFigure figure = ((GraphicalEditPart)host).getFigure();
- Point location = req.getLocation().getCopy();
- figure.translateToRelative(location);
-
- // if mouse location is far from border, do not handle connection event
- Rectangle innerRetangle = figure.getBounds().getCopy().shrink(10, 10);
- if(innerRetangle.contains(location)){
- return null;
- }
- }
- }
- return host;
- }
- return null;
- }
-
- protected boolean isCreateConnectionRequest(Request request, IElementType type) {
- if( request instanceof CreateAspectUnspecifiedTypeConnectionRequest){
- List types = ((CreateUnspecifiedTypeConnectionRequest) request).getElementTypes();
- if(types.contains(type)){
- return true;
- }
- }
-
- if(request instanceof CreateConnectionViewRequest ){
- String requestHint = ((CreateConnectionViewRequest)request).getConnectionViewDescriptor().getSemanticHint();
- if(((IHintedType)type).getSemanticHint().equals(requestHint))
- return true;
- }
- return false;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeRelatedSelectionEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeRelatedSelectionEditPolicy.java
deleted file mode 100644
index 49163add6b0..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeRelatedSelectionEditPolicy.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OccurrenceSpecificationMoveHelper;
-
-/**
- * Edit policy to restrict border item movement. This edit policy moves the related events when a Time/Duration Observation/Constraint is moved.
- */
-public class TimeRelatedSelectionEditPolicy extends BorderItemSelectionEditPolicy {
-
- @Override
- protected Command getMoveCommand(ChangeBoundsRequest request) {
- // Prepare request
- if(getHost() instanceof IBorderItemEditPart) {
- OccurrenceSpecificationMoveHelper.prepareTimeRelatedElementMoveRequest(request, (IBorderItemEditPart)getHost());
- }
- Command command = super.getMoveCommand(request);
- if(command != null) {
- command = OccurrenceSpecificationMoveHelper.completeMoveTimeRelatedElementCommand(command, request, getHost(), getHostFigure());
- }
- return command;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java
deleted file mode 100644
index 403afdfa100..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CoRegionCombinedFragmentFigure.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.figures;
-
-import java.util.List;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-
-
-public class CoRegionCombinedFragmentFigure extends RectangleFigure {
-
- // The area (to the left,right, top and bottom) near the border of the Coregion that is sensible to the mouse
- private static final int COREGION_HIT_WIDTH = 6;
-
- private static final int BRACKET_HEIGHT = 7;
-
- private static final int BRACKET_LINE_WIDTH = 3;
-
- /** The DashLine figure where elements will be attached */
- private NodeFigure centralVerticalLine;
-
- /**
- * Constructor
- *
- * @generated
- */
- public CoRegionCombinedFragmentFigure() {
- super();
-
- // Init centralVerticalLine
- centralVerticalLine = new NodeFigure();
- centralVerticalLine.setParent(this);
- setLineWidth(BRACKET_LINE_WIDTH);
- }
-
- /**
- * Draw the vertical bracket
- *
- * @see org.eclipse.draw2d.Shape#paintFigure(org.eclipse.draw2d.Graphics)
- */
- @Override
- public void paintFigure(Graphics graphics) {
- Rectangle r = getBounds().getCopy();
- graphics.setBackgroundColor(this.getBackgroundColor());
- graphics.setForegroundColor(this.getForegroundColor());
- graphics.setLineWidth(getLineWidth() );
- graphics.drawLine(r.x, r.y, r.right() - 1, r.y);
- graphics.drawLine(r.x, r.bottom() - 1, r.right() - 1, r.bottom() - 1);
- graphics.drawLine(r.x, r.y, r.x, r.y + BRACKET_HEIGHT);
- graphics.drawLine(r.right() - 1, r.y + BRACKET_HEIGHT, r.right() - 1, r.y);
- graphics.drawLine(r.right() - 1, r.bottom() - 1, r.right() - 1, r.bottom() - 1 - BRACKET_HEIGHT);
- graphics.drawLine(r.x, r.bottom() - 1, r.x, r.bottom() - 1 - BRACKET_HEIGHT);
-
- // Refresh the line
- int endY = r.height + r.x;
- Point pStart = new Point(r.x + r.width / 2, r.y + 1);
- centralVerticalLine.setSize(1, endY - pStart.y);
- centralVerticalLine.setLocation(pStart);
- }
-
- /**
- * @see org.eclipse.draw2d.Figure#containsPoint(int, int)
- */
- @Override
- public boolean containsPoint(int x, int y) {
- Rectangle rect = getBounds();
- // check if point is at the topline of the figure
- if(x > rect.x && x < rect.x + rect.width) {
- if(y > rect.y - COREGION_HIT_WIDTH && y < rect.y + COREGION_HIT_WIDTH) {
- return true;
- }
- }
-
- // check if point is at the bottom line of the figure
- if(x > rect.x && x < rect.x + rect.width) {
- if(y > rect.y + rect.height - COREGION_HIT_WIDTH && y < rect.y + rect.height + COREGION_HIT_WIDTH) {
- return true;
- }
- }
-
- // check if point is at the left line of the figure
- if(x > rect.x - COREGION_HIT_WIDTH && x < rect.x + COREGION_HIT_WIDTH) {
- if(y > rect.y && y < rect.y + rect.height) {
- return true;
- }
- }
-
- // check if point is at the right line of the figure
- if(x > rect.x + rect.width - COREGION_HIT_WIDTH && x < rect.x + rect.width + COREGION_HIT_WIDTH) {
- if(y > rect.y && y < rect.y + rect.height) {
- return true;
- }
- }
-
- for(IFigure child : (List<IFigure>)getChildren()) {
- Point local = new Point(x, y);
- translateFromParent(local);
- if(child.containsPoint(local)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Get a rectangleFigure representing a central vertical line
- */
- public NodeFigure getCentralVerticalLine() {
- return centralVerticalLine;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java
deleted file mode 100644
index 8fb66ae998e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/CombinedFragmentFigure.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.figures;
-
-import org.eclipse.draw2d.BorderLayout;
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.InteractionRectangleFigure;
-
-public class CombinedFragmentFigure extends InteractionRectangleFigure {
-
- private WrappingLabel titleLabel;
-
- @Override
- protected void createContents() {
- add(createHeaderPane(), BorderLayout.TOP);
- add(createContentPane(), BorderLayout.CENTER);
- setShadow(false);
- interactionContentPane.setOutline(false);
- interactionContentPane.setOpaque(false);
- interactionContentPane.setBorder(null);
- }
-
- protected Figure createHeaderPane() {
- titleLabel = new WrappingLabel();
- titleLabel.setAlignment(PositionConstants.RIGHT);
- titleLabel.setBorder(new MarginBorder(3, 0, 0, 3));
- titleLabel.setTextWrap(false);
- IFigure leftContainer = super.createHeader();
-
- Figure headerPane = new Figure();
- headerPane.setLayoutManager(new BorderLayout());
- headerPane.add(leftContainer, BorderLayout.LEFT);
- headerPane.add(titleLabel, BorderLayout.RIGHT);
-
- return headerPane;
- }
-
- public WrappingLabel getTitleLabel() {
- return titleLabel;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DestructionEventFigure.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DestructionEventFigure.java
deleted file mode 100644
index 66d6f7057d2..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DestructionEventFigure.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 AIRBUS FRANCE. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse
- * Public License v1.0 which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: David Sciamma (Anyware Technologies), Mathieu Garcia (Anyware
- * Technologies), Jacques Lescot (Anyware Technologies), Thomas Friol (Anyware
- * Technologies), Nicolas Lalevée (Anyware Technologies) - initial API and
- * implementation
- ******************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.sequence.figures;
-
-import org.eclipse.draw2d.Graphics;
-
-/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class DestructionEventFigure extends org.eclipse.draw2d.Figure {
-
- /**
- * Constructor <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DestructionEventFigure() {
-
- super();
- }
-
- /**
- * The stop is a cross
- *
- * @see org.eclipse.draw2d.Figure#paintFigure(org.eclipse.draw2d.Graphics)
- */
- protected void paintFigure(Graphics graphics) {
- super.paintFigure(graphics);
- graphics.pushState();
-
- int width = bounds.width;
- int height = bounds.height;
- if(width > height) {
- width = height;
- } else if(width < height) {
- height = width;
- }
- int x = bounds.x + bounds.width / 2 - width / 2;
- int y = bounds.y + bounds.height / 2 - height / 2;
- graphics.setLineWidth(lineWidth);
- graphics.drawLine(x, y, x + width, y + height);
- graphics.drawLine(x + width, y, x, y + height);
- graphics.popState();
- }
-
- public void setLineWidth(int w) {
- if ((lineWidth == w) || (w < 0))
- return;
- lineWidth = w;
- repaint();
- }
-
- private int lineWidth = 1;
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/EllipseDecoration.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/EllipseDecoration.java
deleted file mode 100644
index 3f422fc08b1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/EllipseDecoration.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2009 Borland Software Corporation
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Golubev (Borland) - initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.sequence.figures;
-
-import org.eclipse.draw2d.Ellipse;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.RotatableDecoration;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.swt.graphics.Color;
-
-public class EllipseDecoration extends Ellipse implements RotatableDecoration {
-
- private boolean myAlwaysFill;
-
- public EllipseDecoration() {
- setPreferredSize(new Dimension(5, 5));
- }
-
- public void setAlwaysFill(boolean alwaysFill) {
- myAlwaysFill = alwaysFill;
- }
-
- public void setLocation(Point p) {
- Dimension delta = getPreferredSize().getScaled(0.5).getNegated();
- super.setLocation(p.getTranslated(delta));
- }
-
- public void setReferencePoint(Point p) {
- }
-
- @Override
- protected void outlineShape(Graphics graphics) {
- if(myAlwaysFill) {
- Color oldBack = graphics.getBackgroundColor();
- graphics.setBackgroundColor(graphics.getForegroundColor());
- fillShape(graphics);
- graphics.setBackgroundColor(oldBack);
- }
- super.outlineShape(graphics);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionOperandFigure.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionOperandFigure.java
deleted file mode 100644
index 0d3144a04de..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionOperandFigure.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.figures;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-
-public class InteractionOperandFigure extends PapyrusNodeFigure {
-
- /**
- * True if line separator is printed
- */
- private boolean lineSeparator = true;
-
- @Override
- public void paintFigure(Graphics graphics) {
- super.paintFigure(graphics);
- if(lineSeparator) {
- graphics.setLineStyle(getLineStyle());
- graphics.setLineWidth(getLineWidth());
- graphics.drawLine(getBounds().getTopLeft(), getBounds().getTopRight());
- }
- }
-
- /**
- * Set the line separator
- *
- * @param lineSeparator
- */
- public void setLineSeparator(boolean lineSeparator) {
- this.lineSeparator = lineSeparator;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionUseRectangleFigure.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionUseRectangleFigure.java
deleted file mode 100644
index 27bf1932f18..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/InteractionUseRectangleFigure.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.figures;
-
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.InteractionRectangleFigure;
-
-/**
- * The figure of the InteractionUse
- */
-public class InteractionUseRectangleFigure extends InteractionRectangleFigure {
-
- /** A centered label */
- protected WrappingLabel centerLabel;
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionRectangleFigure#createContentPane()
- */
- @Override
- protected RectangleFigure createContentPane() {
-
- // Create the ContentPane
- RectangleFigure contentPane = new RectangleFigure();
- contentPane.setOutline(false);
- contentPane.setFill(false);
- contentPane.setLayoutManager(new StackLayout());
-
- // Create the centered label
- centerLabel = new WrappingLabel();
- centerLabel.setAlignment(PositionConstants.CENTER);
-
- // Add the label to the contentPane
- contentPane.add(centerLabel);
-
- return contentPane;
- }
-
- public WrappingLabel getCenterLabel() {
- return centerLabel;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifelineDotLineCustomFigure.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifelineDotLineCustomFigure.java
deleted file mode 100644
index bda9b86f576..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/LifelineDotLineCustomFigure.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.figures;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.LayoutManager;
-import org.eclipse.draw2d.TreeSearch;
-import org.eclipse.draw2d.XYLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.LifelineDotLineFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
-
-/**
- * The figure of the LifelineDotLine
- */
-public class LifelineDotLineCustomFigure extends LifelineDotLineFigure {
-
- /**
- * Layout manager for the inline mode
- */
- private LayoutManager inlineModeManager;
-
- /**
- * Layout manager for the inline mode
- */
- private LayoutManager normalModeManager;
-
- /**
- * True if the lifeline is in inline mode
- */
- private boolean inlineMode;
-
- /**
- * Number of inner ConnectableElements
- */
- private int innerConnectableElementsNumber;
-
- /**
- * Default constructor
- */
- public LifelineDotLineCustomFigure() {
- super();
- normalModeManager = new XYLayout();
-
- /*
- inlineModeManager = new FlowLayout(true) {
-
- {
- majorSpacing = 10;
- minorSpacing = 10;
- fill = true;
- }
-
- @Override
- protected Dimension getChildSize(IFigure child, int wHint, int hHint) {
- wHint = getParent().getBounds().width;
- hHint = getParent().getBounds().height;
- if(innerConnectableElementsNumber > 0) {
- wHint /= innerConnectableElementsNumber;
- }
- if(!child.getParent().getChildren().get(innerConnectableElementsNumber - 1).equals(child)) {
- wHint = wHint - majorSpacing;
- }
-
- ((Figure)child).setPreferredSize(wHint, hHint);
- Dimension childSize = super.getChildSize(child, wHint, hHint);
- return childSize;
- }
-
- @Override
- protected Dimension calculatePreferredSize(IFigure container, int wHint, int hHint) {
- Dimension calculatePreferredSize = super.calculatePreferredSize(container, wHint, hHint);
- calculatePreferredSize.width = wHint;
- calculatePreferredSize.height = hHint;
- return calculatePreferredSize;
- }
- };
- */
- inlineModeManager = new XYLayout();
- setLayoutManager(normalModeManager);
- }
-
- /**
- * Configure the lifeline figure
- *
- * @param inlineMode
- * true if inline mode enabled
- * @param innerConnectableElementsNumber
- * Number of children
- */
- public void configure(boolean inlineMode, int innerConnectableElementsNumber) {
- if(inlineMode) {
- this.innerConnectableElementsNumber = innerConnectableElementsNumber;
- }
- if(this.inlineMode != inlineMode) {
- this.inlineMode = inlineMode;
- if(inlineMode) {
- setLayoutManager(inlineModeManager);
- } else {
- setLayoutManager(normalModeManager);
- }
- }
- }
-
- /**
- * Print lifeline if the edit part is not in inline mode
- */
- protected void outlineShape(Graphics graphics) {
- if(!inlineMode) {
- super.outlineShape(graphics);
- }
- }
-
- // fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=384616
- public static class DefaultSizeNodeFigureEx extends DefaultSizeNodeFigure {
-
- public DefaultSizeNodeFigureEx(int width, int height) {
- super(width, height);
- }
-
- 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;
- }
-
- 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;
- }
- };
-
- public static class NodeNamedElementFigureEx extends NodeNamedElementFigure{
-
- 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;
- }
-
- public IFigure findFigureAt(int x, int y, TreeSearch search) {
- if (search.prune(this))
- return null;
- IFigure child = findDescendantAtExcluding(x, y, search);
- if (child != null)
- return child;
- if (!containsPoint(x, y))
- return null;
- if (search.accept(this))
- return this;
- return null;
- }
- }
-}
-
-
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/CenterLocator.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/CenterLocator.java
deleted file mode 100644
index d99d5a64e07..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/CenterLocator.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.locator;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.internal.figures.BorderItemContainerFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart.LifelineFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.DestructionEventFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure;
-
-
-public class CenterLocator extends BorderItemLocator {
-
- /**
- * The LifelineDotLineFigure. It must be access through the method {@link #getLifelineDotLineFigure()}
- */
- private LifelineDotLineCustomFigure lifelineDotLineFigure = null;
-
- /**
- * The BorderItemContainerFigure. It must be access through the method {@link #getBorderItemContainerFigure()}
- */
- private BorderItemContainerFigure borderItemContainerFigure = null;
-
- /**
- * The DestructionEventFigure.
- *
- * It must be access through the method {@link #getDestructionEventFigure()}
- */
- private DestructionEventFigure destructionEventFigure = null;
-
- /**
- * Constructor
- *
- * @param parentFigure
- * the parent figure
- * @param location
- * ContinuationLocator.TOP or ContinuationLocator.BOTTOM
- */
- public CenterLocator(IFigure parentFigure, int location) {
- super(parentFigure, location);
- }
-
- /**
- * Get the LifelineDotLineFigure
- *
- * @return the lifelineDotLineFigure or null
- */
- private LifelineDotLineCustomFigure getLifelineDotLineFigure() {
- if(lifelineDotLineFigure == null) {
- for(Object childFig : getParentFigure().getChildren()) {
- if(childFig instanceof LifelineFigure) {
- lifelineDotLineFigure = ((LifelineFigure)childFig).getFigureLifelineDotLineFigure();
- return lifelineDotLineFigure;
- }
- }
- }
- return lifelineDotLineFigure;
- }
-
- /**
- * Get the BorderItemContainerFigure
- *
- * @return the borderItemContainerFigure or null
- */
- private BorderItemContainerFigure getBorderItemContainerFigure() {
- if(borderItemContainerFigure == null) {
- IFigure figure = getParentFigure().getParent();
- for(Object object : figure.getChildren()) {
- if(object instanceof BorderItemContainerFigure) {
- borderItemContainerFigure = (BorderItemContainerFigure)object;
- return borderItemContainerFigure;
- }
- }
- }
- return borderItemContainerFigure;
- }
-
- /**
- * Get the DestructionEventFigure of the lifeline, if it is drawn.
- *
- * @return the DestructionEventFigure or null
- */
- private DestructionEventFigure getDestructionEventFigure() {
- if(destructionEventFigure == null) {
- BorderItemContainerFigure borderItemContainerFigure = getBorderItemContainerFigure();
- if(borderItemContainerFigure != null) {
- for(Object child : borderItemContainerFigure.getChildren()) {
- if(child instanceof DefaultSizeNodeFigure) {
- for(Object figure : ((DefaultSizeNodeFigure)child).getChildren()) {
- if(figure instanceof DestructionEventFigure) {
- destructionEventFigure = (DestructionEventFigure)figure;
- return destructionEventFigure;
- }
- }
- }
- }
- }
- }
- return destructionEventFigure;
- }
-
- /**
- * Overrides :
- * - the destructionEventFigure is always drawn at the end of the figure
- *
- * @see org.eclipse.draw2d.Locator#relocate(org.eclipse.draw2d.IFigure)
- */
- public void relocate(IFigure borderItem) {
- if(getDestructionEventFigure() != null) {
- if(borderItem.equals(getDestructionEventFigure().getParent())) {
- borderItem.setLocation(new Point(getHorizontalPosition(borderItem), getParentBorder().y + getParentBorder().height - borderItem.getBounds().height / 2));
- return;
- }
- }
- super.relocate(borderItem);
-
- }
-
- public Rectangle getValidLocation(Rectangle proposedLocation,
- IFigure borderItem) {
- if(getDestructionEventFigure() != null) {
- if(borderItem.equals(getDestructionEventFigure().getParent())) {
- Rectangle realLocation = new Rectangle(proposedLocation);
- Point point = new Point(getParentBorder().getCenter().x - realLocation.getSize().width / 2, getParentBorder().y + getParentBorder().height - realLocation.height / 2);
- realLocation.setLocation(point);
- return realLocation;
- }
- }
- return super.getValidLocation(proposedLocation, borderItem);
- }
-
- /**
- * Get the parent dotLine border
- *
- * @return <code>Rectangle</code> that is the bounds of the parent dot line.
- */
- protected Rectangle getParentDotLineBorder() {
- LifelineDotLineCustomFigure dotline = getLifelineDotLineFigure();
- if(dotline != null) {
- return dotline.getBounds().getCopy();
- }
- return super.getParentBorder();
- }
-
-
-
-
- /**
- * Locate the figure on its parent
- *
- * @param suggestedLocation
- * @param suggestedSide
- * @return point
- */
- protected Point locateOnParent(Point suggestedLocation, int suggestedSide, IFigure borderItem) {
-
- Dimension borderItemSize = getSize(borderItem);
-
- int y = getVerticalPosition(suggestedLocation.y, borderItemSize.height);
- int x = getHorizontalPosition(borderItem);
- return new Point(x, y);
- }
-
- /**
- * Get the vertical position of the itemBorder
- *
- * @param y
- * the suggested location
- * @param height
- * the border item height
- * @return the vertical position of the item border on the lifeline
- */
- private int getVerticalPosition(int y, int height) {
- int validY = y;
- Rectangle parentDotLineBorder = getParentDotLineBorder();
- int maxY = parentDotLineBorder.y + parentDotLineBorder.height - getSouthInsets();
- if(y + height > maxY) {
- validY = maxY - height;
- } else if(y < parentDotLineBorder.y) {
- validY = parentDotLineBorder.y;
- }
- return validY;
- }
-
-
- /**
- * Get the horizontal position of the borderItem drawn on a lifeline.
- * Those elements are drawn at the center of the lifeline, ie on the dot line.
- *
- * @param borderItem
- * the borderItem
- * @return the horizontal position of the border item
- */
- private int getHorizontalPosition(IFigure borderItem) {
- return getParentBorder().getCenter().x - borderItem.getSize().width / 2;
- }
-
-
- /**
- * Get the insets to use at the bottom of the figure.
- * It is used to prevent others borderItems to be drawn on or below the destructionEventFigure
- *
- * @return If a destructionEventFigure is drawn, it returns the height of its figure, otherwise it returns 0
- */
- private int getSouthInsets() {
- DestructionEventFigure destructionEventFigure = getDestructionEventFigure();
- if(destructionEventFigure != null) {
- return destructionEventFigure.getBounds().height;
- }
- return 0;
- }
-
-
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/ContinuationLocator.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/ContinuationLocator.java
deleted file mode 100644
index 62d6d068400..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/ContinuationLocator.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:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.locator;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
-
-/**
- * A specific locator for Continuation.
- * This locator is in charge of positioning the continuation at the top or the bottom of its container.
- *
- */
-public class ContinuationLocator extends BorderItemLocator {
-
- private static final int MARGIN = 2;
-
- /**
- * Constructor
- *
- * @param parentFigure
- * the parent figure
- * @param location
- * ContinuationLocator.TOP or ContinuationLocator.BOTTOM
- */
- public ContinuationLocator(IFigure parentFigure, int location) {
- super(parentFigure, location);
- }
-
- /**
- * Locate the figure on its parent
- *
- * @param suggestedLocation
- * @param suggestedSide
- * @return point
- */
- protected Point locateOnParent(Point suggestedLocation, int suggestedSide, IFigure borderItem) {
-
- Rectangle bounds = getParentBorder();
- Dimension borderItemSize = getSize(borderItem);
- if(getPreferredSideOfParent() == PositionConstants.SOUTH) {
- return new Point(bounds.x + MARGIN, bounds.y + bounds.height - borderItemSize.height - MARGIN);
- }
- return new Point(bounds.x + MARGIN, bounds.y + MARGIN);
- }
-
- /**
- * Overrides :
- * - the width of the borderItem is equivalent to its parentBorder width - MARGIN * 2
- * - the CurrentSide and PreferredSide are no more needed.
- *
- * @see org.eclipse.draw2d.Locator#relocate(org.eclipse.draw2d.IFigure)
- */
- public void relocate(IFigure borderItem) {
-
- // Determines the size of the figure
- Dimension size = getParentBorder().getSize().getCopy();
- size.width = size.width - MARGIN * 2;
- size.height = getSize(borderItem).height;
-
- // Set figure bounds
- Point ptNewLocation = locateOnBorder(getPreferredLocation(borderItem), getPreferredSideOfParent(), 0, borderItem);
- borderItem.setBounds(new Rectangle(ptNewLocation, size));
-
- }
-
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/TimeMarkElementPositionLocator.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/TimeMarkElementPositionLocator.java
deleted file mode 100644
index 703eb28a068..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/locator/TimeMarkElementPositionLocator.java
+++ /dev/null
@@ -1,386 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.locator;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.locator.AdvancedBorderItemLocator;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart.LifelineFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.IntervalConstraint;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.TimeObservation;
-
-/**
- * This class is used to constrain the position of a Time/Duration related object on a Lifeline.
- */
-public class TimeMarkElementPositionLocator extends AdvancedBorderItemLocator {
-
- /**
- * The edit part which figure is located.
- * Used to know the horizontal gap or whether the occurrence specifies a destruction event.
- */
- private EditPart editPart = null;
-
- /** Constructor **/
- public TimeMarkElementPositionLocator(IFigure parentFigure) {
- super(parentFigure);
- }
-
- /** Constructor **/
- public TimeMarkElementPositionLocator(IFigure borderItem, IFigure parentFigure, Rectangle constraint) {
- super(borderItem, parentFigure, constraint);
- }
-
- /** Constructor **/
- public TimeMarkElementPositionLocator(IFigure parentFigure, int preferredSide) {
- super(parentFigure, preferredSide);
- }
-
- /** Set the edit part which figure is placed by this locator */
- public void setEditPart(EditPart part) {
- editPart = part;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Rectangle getValidLocation(Rectangle proposedLocation, IFigure borderItem) {
- Rectangle realLocation = new Rectangle(proposedLocation);
- int side = findClosestSideOfParent(realLocation, getParentBorder());
- Point newTopLeft = locateOnBorder(realLocation.getTopLeft(), side, 0, borderItem);
- // correct in case the figure is linked to a destruction event
- if(timeElementPointsDestructionEvent()) {
- Point destr = getDestructionEventCenter();
- if(destr != null) {
- if(editPart instanceof DurationConstraintEditPart) {
- // bottom is at the destruction event y
- realLocation.height = destr.y - newTopLeft.y;
- } else if(editPart instanceof TimeObservationEditPart || editPart instanceof TimeConstraintEditPart) {
- // center is at the destruction event y
- newTopLeft.y = destr.y - realLocation.height / 2;
- }
- }
- }
- realLocation.setLocation(newTopLeft);
- return realLocation;
- }
-
- /**
- * The y location takes precedence on the preferred side or on collision.
- *
- * @param suggestedLocation
- * the suggester location (y must be respected)
- * @param suggestedSide
- * the suggested side
- * @param circuitCount
- * recursion count to avoid an infinite loop
- * @return point
- */
- protected Point locateOnBorder(Point suggestedLocation, int suggestedSide, int circuitCount, IFigure borderItem) {
- Point recommendedLocation = locateOnParent(suggestedLocation, suggestedSide, borderItem);
-
- IFigure conflictingBorderItem = getConflictingBorderItemFigure(recommendedLocation, borderItem);
- // max circuit count of 2 allows to try other side, then go back to original side if occupied
- if(circuitCount < 2 && conflictingBorderItem != null) {
- if(suggestedSide == PositionConstants.WEST) {
- // west is occupied, try east
- return locateOnBorder(recommendedLocation, PositionConstants.EAST, circuitCount + 1, borderItem);
- } else { //EAST
- // east is occupied, try west
- return locateOnBorder(recommendedLocation, PositionConstants.WEST, circuitCount + 1, borderItem);
- }
- }
- return recommendedLocation;
- }
-
- /**
- * Utility to calculate the bounds of the dot line to use as parent with consideration for the handle
- * bounds inset.
- *
- * @return <code>Rectangle</code> that is the bounds of the parent dot line.
- */
- protected Rectangle getParentDotLineBorder() {
- // get the dot line of the lifeline if available
- for(Object childFig : getParentFigure().getChildren()) {
- if(childFig instanceof LifelineFigure) {
- LifelineDotLineCustomFigure dotline = ((LifelineFigure)childFig).getFigureLifelineDotLineFigure();
- return dotline.getBounds().getCopy();
- }
- }
- return super.getParentBorder();
- }
-
- /**
- * Ensure the suggested location actually lies on the parent boundary. The
- * side takes precedence.
- *
- * @param suggestedLocation
- * @param suggestedSide
- * @return point
- */
- protected Point locateOnParent(Point suggestedLocation, int suggestedSide, IFigure borderItem) {
- int[] horizontalGap = getHorizontalGap();
- Rectangle bounds = getParentDotLineBorder();
- int parentFigureXCenter = bounds.getCenter().x;
- int parentFigureHeight = bounds.height;
- int parentFigureY = bounds.y;
- Dimension borderItemSize = getCorrectSize(borderItem);
- int newX = suggestedLocation.x;
- int newY = suggestedLocation.y;
- int westX = parentFigureXCenter - borderItemSize.width + horizontalGap[0];
- int eastX = parentFigureXCenter + horizontalGap[1];
- int southY = parentFigureY + parentFigureHeight - getBorderItemOffset().height;
- int northY = parentFigureY + getBorderItemOffset().height;
- if(suggestedSide == PositionConstants.WEST) {
- if(suggestedLocation.x != westX) {
- newX = westX;
- }
- if(suggestedLocation.y < bounds.getTopLeft().y) {
- newY = northY;
- } else if(suggestedLocation.y > bounds.getBottomLeft().y - borderItemSize.height) {
- newY = southY - borderItemSize.height;
- }
- } else { // EAST
- if(suggestedLocation.x != eastX) {
- newX = eastX;
- }
- if(suggestedLocation.y < bounds.getTopLeft().y) {
- newY = northY;
- } else if(suggestedLocation.y > bounds.getBottomLeft().y - borderItemSize.height) {
- newY = southY - borderItemSize.height;
- }
- }
- return new Point(newX, newY);
- }
-
- /**
- * Get the center of the destruction event figure (relative)
- *
- * @return the destruction center or null
- */
- private Point getDestructionEventCenter() {
- LifelineEditPart lifeline = SequenceUtil.getParentLifelinePart(editPart);
- if(lifeline != null) {
- for(Object child : lifeline.getChildren()) {
- if(child instanceof DestructionOccurrenceSpecificationEditPart) {
- return ((DestructionOccurrenceSpecificationEditPart)child).getFigure().getBounds().getCenter();
- }
- }
- }
- return null;
- }
-
- /**
- * Know whether the figure must be located all down because its element references a destruction event
- *
- * @return true if destruction event is referenced
- */
- private boolean timeElementPointsDestructionEvent() {
- if(editPart instanceof GraphicalEditPart) {
- // get event occurrence(s)
- EObject element = ((GraphicalEditPart)editPart).resolveSemanticElement();
- List<? extends Element> occurrences = Collections.emptyList();
- if(element instanceof TimeObservation) {
- NamedElement occurence = ((TimeObservation)element).getEvent();
- occurrences = Collections.singletonList(occurence);
- } else if(element instanceof TimeConstraint || element instanceof DurationConstraint) {
- occurrences = ((IntervalConstraint)element).getConstrainedElements();
- }
- for(Element occurrence : occurrences) {
- if(occurrence instanceof DestructionOccurrenceSpecificationEditPart) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Get the gaps to know how the figure must be translated from the center of the lifeline, taking in account executions.
- *
- * @return a size 2 array with left translation at index 0 et right at index 1
- */
- private int[] getHorizontalGap() {
- int[] horizontalGap = new int[]{ 0, 0 };
- if(editPart instanceof GraphicalEditPart) {
- // get event occurrence(s)
- LifelineEditPart lifeline = SequenceUtil.getParentLifelinePart(editPart);
- EObject element = ((GraphicalEditPart)editPart).resolveSemanticElement();
- List<? extends Element> occurrences = Collections.emptyList();
- if(element instanceof TimeObservation) {
- NamedElement occurence = ((TimeObservation)element).getEvent();
- occurrences = Collections.singletonList(occurence);
- } else if(element instanceof TimeConstraint || element instanceof DurationConstraint) {
- occurrences = ((IntervalConstraint)element).getConstrainedElements();
- }
- boolean horizontalGapSet = false;
- // check bounds of event's execution
- for(Element occurrence : occurrences) {
- if(occurrence instanceof OccurrenceSpecification) {
- EditPart part = SequenceUtil.getLinkedEditPart(lifeline, (OccurrenceSpecification)occurrence);
- if(part instanceof ConnectionEditPart && occurrence instanceof MessageOccurrenceSpecification) {
- // get the bounds of the execution on which the connection is connected
- ConnectionEditPart conn = (ConnectionEditPart)part;
- Message message = ((MessageOccurrenceSpecification)occurrence).getMessage();
- if(message != null) {
- boolean start = message.getSendEvent() != null && message.getSendEvent().equals(occurrence);
- if(start) {
- part = conn.getSource();
- } else {
- part = conn.getTarget();
- }
- }
- }
- if(part instanceof ShapeNodeEditPart && !lifeline.equals(part)) {
- Rectangle execBounds = ((ShapeNodeEditPart)part).getFigure().getBounds();
- Rectangle parentBounds = getParentBorder();
- int leftGap = execBounds.getLeft().x - parentBounds.getCenter().x;
- int rightGap = execBounds.getRight().x - parentBounds.getCenter().x;
- if(part instanceof DestructionOccurrenceSpecificationEditPart) {
- // center of destruction event is considered
- leftGap = 0;
- rightGap = 0;
- }
- if(!horizontalGapSet) {
- horizontalGap[0] = leftGap;
- horizontalGap[1] = rightGap;
- horizontalGapSet = true;
- } else {
- // take the more exterior gap of all events
- horizontalGap[0] = Math.min(horizontalGap[0], leftGap);
- horizontalGap[1] = Math.max(horizontalGap[1], rightGap);
- }
- }
- }
- }
- }
- return horizontalGap;
- }
-
- /**
- * Find the closest side when x,y is inside parent.
- *
- * @param proposedLocation
- * @param parentBorder
- * @return draw constant
- */
- public static int findClosestSideOfParent(Rectangle proposedLocation, Rectangle parentBorder) {
- // Rectangle parentBorder = getParentBorder();
- Point parentCenter = parentBorder.getCenter();
- Point childCenter = proposedLocation.getCenter();
- if(childCenter.x < parentCenter.x) // West, North or South.
- {
- return PositionConstants.WEST;
- } else { // EAST, NORTH or SOUTH
- return PositionConstants.EAST;
- }
- }
-
- /**
- * Relocate the child border item within the parent
- *
- * @see org.eclipse.papyrus.uml.diagram.common.locator.AdvancedBorderItemLocator#relocate(org.eclipse.draw2d.IFigure)
- *
- * @param borderItem
- * the item to relocate
- */
- @Override
- public void relocate(IFigure borderItem) {
- // reset bounds of borderItem
- Dimension size = getCorrectSize(borderItem);
- Rectangle rectSuggested = getConstraint().getCopy();
- if(rectSuggested.getTopLeft().x == 0 && rectSuggested.getTopLeft().y == 0) {
- rectSuggested.setLocation(getPreferredLocation(borderItem));
- } else {
- // recovered constraint must be translated with the parent location to be absolute
- rectSuggested.setLocation(rectSuggested.getLocation().translate(getParentBorder().getTopLeft()));
- }
- rectSuggested.setSize(size);
- Rectangle validLocation = getValidLocation(rectSuggested, borderItem);
- // the constraint is not reset, but the item bounds are
- borderItem.setBounds(validLocation);
- if(timeElementPointsDestructionEvent() && editPart instanceof DurationConstraintEditPart) {
- // except when duration constraint is reduced ...
- int w = getConstraint().getSize().width;
- getConstraint().setSize(w, validLocation.height);
- }
- // ensure the side property is correctly set
- setCurrentSideOfParent(findClosestSideOfParent(borderItem.getBounds(), getParentBorder()));
-
- // redraw time mark if necessary
- redrawTimeMarks(borderItem, validLocation);
- }
-
- /**
- * Gets the size of the border item figure. Take in account the constraint as a minimum size.
- *
- * @param borderItem
- * @return the size of the border item figure.
- */
- protected final Dimension getCorrectSize(IFigure borderItem) {
- Dimension size = getConstraint().getSize();
- if(size.isEmpty()) {
- size.union(borderItem.getPreferredSize(size.width, size.height));
- }
- return size;
- }
-
- /**
- * Redraw the time marks
- *
- * @param borderItem
- * the relocated border item
- * @param location
- * the new location
- */
- private void redrawTimeMarks(IFigure borderItem, Rectangle location) {
- for(Object child : borderItem.getChildren()) {
- if(child instanceof TimeConstraintEditPart.TimeMarkElementFigure) {
- ((TimeConstraintEditPart.TimeMarkElementFigure)child).setCurrentSideOfFigure(getCurrentSideOfParent(), location);
- } else if(child instanceof TimeObservationEditPart.TimeMarkElementFigure) {
- ((TimeObservationEditPart.TimeMarkElementFigure)child).setCurrentSideOfFigure(getCurrentSideOfParent(), location);
- } else if(child instanceof DurationConstraintEditPart.DurationConstraintFigure) {
- ((DurationConstraintEditPart.DurationConstraintFigure)child).updateArrow(location.width, location.height);
- } else if(child instanceof DefaultSizeNodeFigure) {
- redrawTimeMarks((IFigure)child, location);
- }
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/DurationObservationParser.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/DurationObservationParser.java
deleted file mode 100644
index 9d3e75c3a76..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/DurationObservationParser.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.common.helper.DurationObservationHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.UMLPackage;
-
-
-/**
- * Specific Parser for the DurationObservation.
- */
-public class DurationObservationParser extends MessageFormatParser implements ISemanticParser {
-
- /** The String for displaying a line break */
- private static final String LINE_BREAK = System.getProperty("line.separator");
-
- public DurationObservationParser() {
- super(new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- public DurationObservationParser(EAttribute[] features) {
- super(features);
- }
-
- public DurationObservationParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- /**
- * Gets the e structural feature.
- *
- * @param notification
- * @return the structural feature
- */
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if(notification instanceof Notification) {
- Object feature = ((Notification)notification).getFeature();
- if(feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature)feature;
- }
- }
- return featureImpl;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPrintString(IAdaptable element, int flags) {
- Object adapter = element.getAdapter(EObject.class);
- if(adapter instanceof DurationObservation) {
- return DurationObservationHelper.getLabelString((DurationObservation)adapter);
- }
- return "";
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- public List getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if(element instanceof DurationObservation) {
- DurationObservation observation = (DurationObservation)element;
- semanticElementsBeingParsed.add(observation);
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getMessage_SendEvent().equals(feature) || UMLPackage.eINSTANCE.getMessage_ReceiveEvent().equals(feature) || UMLPackage.eINSTANCE.getDurationObservation_Event().equals(feature);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/InteractionUseCustomParsers.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/InteractionUseCustomParsers.java
deleted file mode 100644
index 0eb25997237..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/InteractionUseCustomParsers.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionUse;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * A specific parser for the InteractionUse. This parser of refreshing the text displayed by the
- * InteractionUse.
- */
-public class InteractionUseCustomParsers extends MessageFormatParser implements ISemanticParser {
-
- public InteractionUseCustomParsers(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public InteractionUseCustomParsers(EAttribute[] features) {
- super(features);
- }
-
- public InteractionUseCustomParsers() {
- super(new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if(notification instanceof Notification) {
- Object feature = ((Notification)notification).getFeature();
- if(feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature)feature;
-
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent(java.lang.Object
- * , int)
- */
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#getPrintString(org.eclipse
- * .core.runtime.IAdaptable, int)
- */
- public String getPrintString(IAdaptable element, int flags) {
- Object obj = element.getAdapter(EObject.class);
- StringBuffer sb = new StringBuffer();
-
- if(obj instanceof InteractionUse) {
- InteractionUse interactionUse = (InteractionUse)obj;
- Interaction interaction = interactionUse.getRefersTo();
-
- if(interaction != null) {
- String interactionName = interaction.getName();
- if(interactionName != null) {
- sb.append(interaction.getName());
- }
- }
- }
- return sb.toString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#areSemanticElementsAffected
- * (org.eclipse.emf.ecore.EObject, java.lang.Object)
- */
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#getSemanticElementsBeingParsed
- * (org.eclipse.emf.ecore.EObject)
- */
- public List getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if(element instanceof InteractionUse) {
- InteractionUse interactionUse = (InteractionUse)element;
- semanticElementsBeingParsed.add(interactionUse);
-
- Interaction interaction = interactionUse.getRefersTo();
- if(interaction != null) {
- // Add the interaction refered.
- semanticElementsBeingParsed.add(interaction);
-
- // TODO : Collaboration and interactionUse
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getInteractionFragment_Covered().equals(feature) || UMLPackage.eINSTANCE.getInteractionUse_RefersTo().equals(feature);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/LifelineCustomParsers.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/LifelineCustomParsers.java
deleted file mode 100644
index e4ad3e6508e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/LifelineCustomParsers.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser;
-import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Expression;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.LiteralSpecification;
-import org.eclipse.uml2.uml.OpaqueExpression;
-import org.eclipse.uml2.uml.PartDecomposition;
-import org.eclipse.uml2.uml.TimeExpression;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-/**
- * A specific parser for the Lifeline header. This parser of refreshing the text displayed by the
- * lifeline.
- */
-public class LifelineCustomParsers extends MessageFormatParser implements ISemanticParser {
-
- public LifelineCustomParsers(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public LifelineCustomParsers(EAttribute[] features) {
- super(features);
- }
-
- public LifelineCustomParsers() {
- super(new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if(notification instanceof Notification) {
- Object feature = ((Notification)notification).getFeature();
- if(feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature)feature;
- }
- }
- return featureImpl;
- }
-
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /**
- * Information identifying the lifeline displayed inside the rectangle
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#getPrintString(org.eclipse.core.runtime.IAdaptable, int)
- */
- public String getPrintString(IAdaptable element, int flags) {
- Object obj = element.getAdapter(EObject.class);
- StringBuffer sb = new StringBuffer();
-
- if(obj instanceof Lifeline) {
- Lifeline lifeline = (Lifeline)obj;
- ConnectableElement connectableElement = lifeline.getRepresents();
- ValueSpecification selector = lifeline.getSelector();
-
- if(connectableElement != null) {
- // Add ConnectableElement Name
- String connectableElementName = connectableElement.getName();
- if(connectableElementName != null) {
- sb.append(connectableElementName);
- }
-
- // Add the selector if it is a LiteralSpecification
- if(selector instanceof LiteralSpecification) {
- sb.append("[").append(ValueSpecificationUtil.getSpecificationValue(selector)).append("]");
- }
-
- // Add the type name
- Type type = connectableElement.getType();
- if(type != null && type.getName() != null && type.getName().length() > 0) {
- sb.append(" : ").append(type.getName());
- }
- }
-
- // Add the selector if it is an Expression
- if(selector instanceof Expression || selector instanceof OpaqueExpression || selector instanceof TimeExpression) {
- String specificationValue = ValueSpecificationUtil.getSpecificationValue(selector);
- if(specificationValue != null && specificationValue.length() > 0) {
- sb.append("\n").append(specificationValue);
- }
- }
-
- // Add the decomposition
- PartDecomposition partDecomposition = lifeline.getDecomposedAs();
- if(partDecomposition != null) {
- Interaction refersTo = partDecomposition.getRefersTo();
- if(refersTo != null) {
- sb.append("\nref ").append(refersTo.getName());
- }
- }
-
- // LifelineIndent cannot be empty so if the stringBuffer is empty we add the name of the
- // lifeline
- // This case occurs when creating the lifeline for example
- if(sb.length() == 0) {
- sb.append(lifeline.getName());
- }
- }
-
- return sb.toString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#areSemanticElementsAffected
- * (org.eclipse.emf.ecore.EObject, java.lang.Object)
- */
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#getSemanticElementsBeingParsed
- * (org.eclipse.emf.ecore.EObject)
- */
- public List getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if(element instanceof Lifeline) {
- Lifeline lifeline = (Lifeline)element;
-
- // Add the lifeline
- semanticElementsBeingParsed.add(lifeline);
- // Add the selector
- if(lifeline.getSelector() != null) {
- semanticElementsBeingParsed.add(lifeline.getSelector());
- }
-
- // Add the partDecomposition
- PartDecomposition partDecomposition = lifeline.getDecomposedAs();
- if(partDecomposition != null) {
- semanticElementsBeingParsed.add(partDecomposition);
- // Add the Interaction refered by the partDecomposition
- if(partDecomposition.getRefersTo() != null) {
- semanticElementsBeingParsed.add(partDecomposition.getRefersTo());
- }
- }
-
- // Add the connectableElement and its type if it has any
- ConnectableElement connectableElement = lifeline.getRepresents();
- if(connectableElement != null) {
- semanticElementsBeingParsed.add(connectableElement);
- if(connectableElement.getType() != null) {
- semanticElementsBeingParsed.add(connectableElement.getType());
- }
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature) || UMLPackage.eINSTANCE.getLiteralInteger_Value().equals(feature) || UMLPackage.eINSTANCE.getLiteralUnlimitedNatural_Value().equals(feature) || UMLPackage.eINSTANCE.getLiteralBoolean_Value().equals(feature) || UMLPackage.eINSTANCE.getLiteralString_Value().equals(feature) || UMLPackage.eINSTANCE.getOpaqueExpression_Body().equals(feature) || UMLPackage.eINSTANCE.getLifeline_Selector().equals(feature) || UMLPackage.eINSTANCE.getLifeline_DecomposedAs().equals(feature) || UMLPackage.eINSTANCE.getLifeline_Represents().equals(feature) || UMLPackage.eINSTANCE.getInteractionUse_RefersTo().equals(feature);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/MessageCustomParser.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/MessageCustomParser.java
deleted file mode 100644
index 4272425d703..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/MessageCustomParser.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
-import org.eclipse.papyrus.uml.tools.utils.OperationUtil;
-import org.eclipse.papyrus.uml.tools.utils.SignalUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Signal;
-import org.eclipse.uml2.uml.UMLPackage;
-
-public class MessageCustomParser extends MessageFormatParser implements ISemanticParser {
-
- public MessageCustomParser(EAttribute[] features) {
- super(features);
- }
-
- public MessageCustomParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public MessageCustomParser() {
- super(new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- @Override
- public String getPrintString(IAdaptable adapter, int flags) {
- Object obj = adapter.getAdapter(EObject.class);
- String result = null;
-
- if(obj instanceof Message) {
- Message message = (Message)obj;
- NamedElement signature = message.getSignature();
-
- if(signature instanceof Operation) {
- Operation operation = (Operation)signature;
- if(MessageSort.REPLY_LITERAL.equals(message.getMessageSort())) {
- result = OperationUtil.getCustomLabel(operation, ICustomAppearence.DISP_NAME | ICustomAppearence.DISP_RT_TYPE);
- } else if(MessageSort.SYNCH_CALL_LITERAL.equals(message.getMessageSort())) {
- result = OperationUtil.getCustomLabel(operation, ICustomAppearence.DISP_NAME | ICustomAppearence.DISP_PARAMETER_NAME | ICustomAppearence.DISP_PARAMETER_TYPE);
- } else {
- result = OperationUtil.getCustomLabel(operation, ICustomAppearence.DISP_NAME | ICustomAppearence.DISP_PARAMETER_NAME | ICustomAppearence.DISP_PARAMETER_TYPE | ICustomAppearence.DISP_RT_TYPE);
- }
- } else if(signature instanceof Signal) {
- result = SignalUtil.getCustomLabel((Signal)signature, ICustomAppearence.DISP_NAME | ICustomAppearence.DISP_TYPE);
- } else if(signature != null) {
- result = signature.getName();
- }
-
- // If the String is empty, we add the name of the message
- if(result == null || result.equals("")) {
- result = message.getName();
- }
- }
-
- return result;
- }
-
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- return true;
- }
-
- public List getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if(element instanceof Message) {
- Message message = (Message)element;
- semanticElementsBeingParsed.add(message);
- NamedElement signature = message.getSignature();
- semanticElementsBeingParsed.add(signature);
-
- if(signature instanceof Operation) {
- for(Parameter parameter : ((Operation)signature).getOwnedParameters()) {
- semanticElementsBeingParsed.add(parameter);
- }
- }
- if(signature instanceof Signal) {
- for(Property property : ((Signal)signature).getOwnedAttributes()) {
- semanticElementsBeingParsed.add(property);
- }
- }
-
- }
- return semanticElementsBeingParsed;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/TimeConstraintParser.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/TimeConstraintParser.java
deleted file mode 100644
index 3a168c29ec6..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/TimeConstraintParser.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.parser.custom;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-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.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser;
-import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Duration;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interval;
-import org.eclipse.uml2.uml.LiteralInteger;
-import org.eclipse.uml2.uml.LiteralString;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-
-/**
- * Specific Parser for the TimeConstraint and DurationConstraint.
- */
-public class TimeConstraintParser extends MessageFormatParser implements ISemanticParser {
-
- /** The String for displaying a line break */
- private static final String LINE_BREAK = System.getProperty("line.separator");
-
- /** The format for displaying time constraint text */
- private static final String FORMAT = "{%s}";
-
- public TimeConstraintParser() {
- super(new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- public TimeConstraintParser(EAttribute[] features) {
- super(features);
- }
-
- public TimeConstraintParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- /**
- * Gets the e structural feature.
- *
- * @param notification
- * @return the structural feature
- */
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if(notification instanceof Notification) {
- Object feature = ((Notification)notification).getFeature();
- if(feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature)feature;
- }
- }
- return featureImpl;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPrintString(IAdaptable element, int flags) {
- Object adapter = element.getAdapter(EObject.class);
- if(adapter instanceof TimeConstraint) {
- TimeConstraint constraint = (TimeConstraint)adapter;
- ValueSpecification spec = constraint.getSpecification();
- return String.format(FORMAT, ValueSpecificationUtil.getSpecificationValue(spec));
- } else if(adapter instanceof DurationConstraint) {
- String value = getDurationConstraint((DurationConstraint)adapter);
- return String.format(FORMAT, value);
- } else if(adapter instanceof Message) {
- StringBuffer result = new StringBuffer();
- Message message = (Message)adapter;
- MessageEnd event1 = message.getSendEvent();
- MessageEnd event2 = message.getReceiveEvent();
- List<DurationConstraint> constraints = DurationConstraintHelper.getDurationConstraintsBetween(event1, event2);
- for(DurationConstraint constraint : constraints) {
- if(result.length() > 0) {
- result.append(LINE_BREAK);
- }
- ValueSpecification spec = constraint.getSpecification();
- result.append(String.format(FORMAT, ValueSpecificationUtil.getSpecificationValue(spec)));
- }
- return result.toString();
- }
- return "";
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public List getSemanticElementsBeingParsed(EObject element) {
- HashSet<Element> semanticElementsBeingParsed = new HashSet<Element>();
- if(element instanceof Constraint) {
- Constraint constraint = (Constraint)element;
- ValueSpecificationUtil.addEnclosedValueSpecificationToCollection(constraint.getSpecification(), semanticElementsBeingParsed);
- } else if(element instanceof Message) {
- Message message = (Message)element;
- semanticElementsBeingParsed.add(message);
- MessageEnd event1 = message.getSendEvent();
- semanticElementsBeingParsed.add(event1);
- MessageEnd event2 = message.getReceiveEvent();
- semanticElementsBeingParsed.add(event2);
- List<DurationConstraint> constraints = DurationConstraintHelper.getDurationConstraintsBetween(event1, event2);
- for(DurationConstraint constraint : constraints) {
- semanticElementsBeingParsed.add(constraint);
- // owner for listening DurationConstraint deletion
- semanticElementsBeingParsed.add(constraint.getOwner());
- }
- }
- return new ArrayList(semanticElementsBeingParsed);
- }
-
- /**
- * Determines if the given feature has to be taken into account in this parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getConstraint_Specification().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
- }
-
- @Override
- public String getEditString(IAdaptable adapter, int flags) {
- EObject element = (EObject)adapter.getAdapter(EObject.class);
- if(element instanceof DurationConstraint) {
- return getDurationConstraint((DurationConstraint)element);
- }
- return super.getEditString(adapter, flags);
- }
-
- protected String getDurationConstraint(DurationConstraint constraint) {
- ValueSpecification spec = constraint.getSpecification();
- if(spec instanceof Interval){
- Interval interval = (Interval)spec;
- String min = ValueSpecificationUtil.getSpecificationValue(interval.getMin());
- String max = ValueSpecificationUtil.getSpecificationValue(interval.getMax());
- if(min.equals(max))
- return min;
- }
- String value = ValueSpecificationUtil.getSpecificationValue(spec);
- return value;
- }
-
- public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
- EObject element = (EObject)adapter.getAdapter(EObject.class);
- if(element instanceof DurationConstraint){
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(element);
- if(editingDomain == null) {
- return UnexecutableCommand.INSTANCE;
- }
- Object[] values = parseInterval(newString);
- if(values == null || values.length != 2) {
- return UnexecutableCommand.INSTANCE;
- }
- return new UpdateDurationConstraintCommand(editingDomain, (DurationConstraint)element, values[0], values[1] );
- }
- return super.getParseCommand(adapter, newString, flags);
- }
-
- private Object[] parseInterval(String newString) {
- int pos = newString.indexOf("..");
- if(pos > -1){
- String[] part = {newString.substring(0, pos), newString.substring(pos + 2)};
- try {
- int min = Integer.parseInt( part[0].trim());
- int max = Integer.parseInt( part[1].trim());
- return new Integer[]{min, max};
- } catch (Exception e) {
- }
- return part;
- }else{
- try {
- int value = Integer.parseInt(newString);
- return new Integer[]{value, value};
- } catch (Exception e) {
- }
-
- // same value for min and max
- return new String[]{newString, newString};
- }
- }
-
- static class UpdateDurationConstraintCommand extends AbstractTransactionalCommand {
- private DurationConstraint constraint;
- private Object min;
- private Object max;
-
- public UpdateDurationConstraintCommand(TransactionalEditingDomain domain, DurationConstraint constraint, Object min, Object max) {
- super(domain, "Set Values", null);
- this.constraint = constraint;
- this.min = min;
- this.max = max;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- ValueSpecification spec = constraint.getSpecification();
- if(spec instanceof Interval){
- Interval interval = (Interval)spec;
- setValue(interval.getMin(), min );
- setValue(interval.getMax(), max );
- }
- return CommandResult.newOKCommandResult();
- }
-
- private void setValue(ValueSpecification spec, Object val) {
- if(spec instanceof Duration){
- Duration dur = (Duration)spec;
- if( dur.getExpr() instanceof LiteralInteger && val instanceof Integer){
- ((LiteralInteger)dur.getExpr()).setValue((Integer)val);
- }else{
- LiteralString str = UMLFactory.eINSTANCE.createLiteralString();
- str.setValue(val.toString());
- dur.setExpr(str);
- }
- }
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/TimeObservationParser.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/TimeObservationParser.java
deleted file mode 100644
index 90ea480b526..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/TimeObservationParser.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.TimeObservation;
-import org.eclipse.uml2.uml.UMLPackage;
-
-
-/**
- * Specific Parser for the TimeObservation.
- */
-public class TimeObservationParser extends MessageFormatParser implements ISemanticParser {
-
- /** The String for displaying a time observation */
- private static final String FORMAT = "@%s";
-
- public TimeObservationParser() {
- super(new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- public TimeObservationParser(EAttribute[] features) {
- super(features);
- }
-
- public TimeObservationParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- /**
- * Gets the e structural feature.
- *
- * @param notification
- * @return the structural feature
- */
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if(notification instanceof Notification) {
- Object feature = ((Notification)notification).getFeature();
- if(feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature)feature;
- }
- }
- return featureImpl;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPrintString(IAdaptable element, int flags) {
- StringBuffer result = new StringBuffer();
- Object adapter = element.getAdapter(EObject.class);
- if(adapter instanceof TimeObservation) {
- TimeObservation observation = (TimeObservation)adapter;
- if(observation.getName() != null) {
- return String.format(FORMAT, observation.getName());
- }
- }
- return result.toString();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- public List getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if(element instanceof TimeObservation) {
- semanticElementsBeingParsed.add((TimeObservation)element);
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPolicyProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPolicyProvider.java
deleted file mode 100644
index 27ad7cf233e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/providers/CustomEditPolicyProvider.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.HighlightConnectionPartEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-
-/**
- * this is an editpolicy provider in charge to install a policy to navigate between diagrams and elements
- *
- */
-public class CustomEditPolicyProvider implements IEditPolicyProvider {
-
- /**
- *
- * {@inheritDoc}
- */
- public void addProviderChangeListener(IProviderChangeListener listener) {
-
- }
-
- /**
- *
- * {@inheritDoc}
- */
- public void createEditPolicies(final EditPart editPart) {
-
- installPopupbarPolicy(editPart);
- installHighlightPolicy(editPart);
-
- SequenceUtil.installObservationLinkPolicy(editPart);
- }
-
- private void installHighlightPolicy(EditPart editPart) {
- if(editPart instanceof LifelineEditPart || editPart instanceof AbstractExecutionSpecificationEditPart || editPart instanceof CombinedFragmentEditPart || editPart instanceof InteractionOperandEditPart || editPart instanceof ConstraintEditPart || editPart instanceof CommentEditPart) {
- editPart.installEditPolicy("highlight", new HighlightConnectionPartEditPolicy());
- }
- }
-
- private void installPopupbarPolicy(final EditPart editPart) {
- }
-
- /**
- *
- * {@inheritDoc}
- */
- public boolean provides(IOperation operation) {
- CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
- if(!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
- return false;
- }
- GraphicalEditPart gep = (GraphicalEditPart)epOperation.getEditPart();
- String diagramType = gep.getNotationView().getDiagram().getType();
- if(PackageEditPart.MODEL_ID.equals(diagramType)) {
- return true;
- }
-
-
- return false;
- }
-
- /**
- *
- * {@inheritDoc}
- */
- public void removeProviderChangeListener(IProviderChangeListener listener) {
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/service/DurationCreationTool.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/service/DurationCreationTool.java
deleted file mode 100644
index 5bf7085774f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/service/DurationCreationTool.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.service;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.FigureCanvas;
-import org.eclipse.draw2d.Viewport;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartListener;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gef.NodeEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.SharedCursors;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gef.tools.TargetingTool;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-
-public class DurationCreationTool extends AspectUnspecifiedTypeCreationTool {
-
-
- static private Cursor CURSOR_TARGET_MENU = new Cursor(Display.getDefault(), SWT.CURSOR_HAND);
-
- /**
- * The state which indicates that the duration creation has begun. This means that the
- * source of the duration has been identified, and the user is still to determine the
- * target.
- */
- protected static final int STATE_CONNECTION_STARTED = TargetingTool.MAX_STATE << 1;
-
- /**
- * The flag which indicates that feedback figure must be shown
- */
- private static final int FLAG_SOURCE_FEEDBACK = TargetingTool.MAX_FLAG << 1;
-
- /**
- * The max state.
- */
- protected static final int MAX_STATE = STATE_CONNECTION_STARTED;
-
- /**
- * The max flag.
- */
- protected static final int MAX_FLAG = FLAG_SOURCE_FEEDBACK;
-
- /**
- * The first element constrained by the duration constraint
- */
- private EditPart connectionSource;
-
- /**
- * The viewer
- */
- private EditPartViewer viewer;
-
- /**
- * Listener for the edit part deactivation
- */
- private EditPartListener.Stub deactivationListener = new EditPartListener.Stub() {
-
- public void partDeactivated(EditPart editpart) {
- handleSourceDeactivated();
- }
- };
-
- /**
- * Constructor of the creation tool.
- *
- * @param elementTypes
- * element types the tool can create
- */
- public DurationCreationTool(List<IElementType> elementTypes) {
- super(elementTypes);
- setDefaultCursor(SharedCursors.CURSOR_PLUG);
- setDisabledCursor(SharedCursors.CURSOR_PLUG_NOT);
- }
-
- /**
- * @see org.eclipse.gef.tools.AbstractTool#handleDrag()
- */
- protected boolean handleDrag() {
- if(isInState(STATE_CONNECTION_STARTED))
- return handleMove();
- return false;
- }
-
- /**
- * @see org.eclipse.gef.tools.AbstractTool#handleDragInProgress()
- */
- protected boolean handleDragInProgress() {
- if(isInState(STATE_ACCESSIBLE_DRAG_IN_PROGRESS))
- return handleMove();
- return false;
- }
-
- /**
- * @see org.eclipse.gef.tools.AbstractTool#getDebugNameForState(int)
- */
- protected String getDebugNameForState(int s) {
- if(s == STATE_CONNECTION_STARTED || s == STATE_ACCESSIBLE_DRAG_IN_PROGRESS)
- return "Connection Started";//$NON-NLS-1$
- return super.getDebugNameForState(s);
- }
-
- /**
- * Sets the location of the request.
- *
- * @see org.eclipse.gef.tools.TargetingTool#updateTargetRequest()
- */
- protected void updateTargetRequest() {
- CreateRequest req = getCreateRequest();
- req.setLocation(getLocation());
- }
-
- /**
- * Sets the target request. This method is typically not called; subclasses normally override {@link #createTargetRequest()}.
- *
- * @see org.eclipse.gef.tools.TargetingTool#setTargetRequest(org.eclipse.gef.Request)
- * @param req
- * the target request
- */
- @Override
- protected void setTargetRequest(Request req) {
- if(req == null && connectionSource != null) {
- // do not erase the request when target changes (behavior inherited from CreationTool)
- return;
- }
- super.setTargetRequest(req);
- }
-
- /**
- * Called if the source editpart is deactivated for some reason during the creation
- * process. For example, the user performs an Undo while in the middle of creating a
- * connection, which undoes a prior command which created the source.
- */
- protected void handleSourceDeactivated() {
- setState(STATE_INVALID);
- handleInvalidInput();
- handleFinished();
- }
-
- /**
- * Method that is called when the gesture to create the connection has been received.
- * Subclasses may extend or override this method to do additional creation setup, such as
- * prompting the user to choose an option about the connection being created. Returns <code>true</code> to indicate that the connection creation
- * succeeded.
- *
- * @return <code>true</code> if the connection creation was performed
- */
- protected boolean handleCreateConnection() {
- eraseSourceFeedback();
- Command endCommand = getCommand();
- setCurrentCommand(endCommand);
- executeCurrentCommand();
- return true;
- }
-
- /**
- * @see org.eclipse.gef.tools.TargetingTool#handleInvalidInput()
- */
- protected boolean handleInvalidInput() {
- eraseSourceFeedback();
- setConnectionSource(null);
- return super.handleInvalidInput();
- }
-
- /**
- * When the button is first pressed, the source node and its command contribution are
- * determined and locked in. After that time, the tool will be looking for the target
- * node to complete the connection
- *
- * @see org.eclipse.gef.tools.AbstractTool#handleButtonDown(int)
- * @param button
- * which button is pressed
- * @return <code>true</code> if the button down was processed
- */
- protected boolean handleButtonDown(int button) {
- if(button == 1 && stateTransition(STATE_CONNECTION_STARTED, STATE_TERMINAL)) {
- return handleCreateConnection();
- }
- if(isInState(STATE_INITIAL) && button == 1) {
- updateTargetRequest();
- updateTargetUnderMouse();
- setConnectionSource(getTargetEditPart());
- Command command = getCommand();
- Request request = getTargetRequest();
- //target elements of request have been set
- if(command != null) {
- setState(STATE_CONNECTION_STARTED);
- setCurrentCommand(command);
- viewer = getCurrentViewer();
- // update request : initialize required extended data
- Map extendedData = request.getExtendedData();
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2, null);
- extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2, null);
- }
- }
- if(isInState(STATE_INITIAL) && button != 1) {
- setState(STATE_INVALID);
- handleInvalidInput();
- }
- if(isInState(STATE_CONNECTION_STARTED))
- //Fake a drag to cause feedback to be displayed immediately on mouse down.
- handleDrag();
- return true;
- }
-
- /**
- * @see org.eclipse.gef.tools.AbstractTool#handleMove()
- */
- protected boolean handleMove() {
- if(isInState(STATE_CONNECTION_STARTED) && viewer != getCurrentViewer())
- return false;
- if(isInState(STATE_CONNECTION_STARTED | STATE_INITIAL | STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
- updateTargetRequest();
- updateTargetUnderMouse();
- showSourceFeedback();
- showTargetFeedback();
- setCurrentCommand(getCommand());
- }
- if(isInState(STATE_CONNECTION_STARTED)) {
- // Expose the diagram as the user scrolls in the area handled by the
- // autoexpose helper.
- updateAutoexposeHelper();
- }
- return true;
- }
-
- /**
- * Sets the source editpart for the creation
- *
- * @param source
- * the source editpart node
- */
- protected void setConnectionSource(EditPart source) {
- if(connectionSource != null) {
- connectionSource.removeEditPartListener(deactivationListener);
- }
- connectionSource = source;
- if(connectionSource != null) {
- connectionSource.addEditPartListener(deactivationListener);
- }
- }
-
- /**
- * Returns <code>true</code> if feedback is being shown.
- *
- * @return <code>true</code> if showing source feedback
- */
- protected boolean isShowingSourceFeedback() {
- return getFlag(FLAG_SOURCE_FEEDBACK);
- }
-
- /**
- * Asks the source editpart to erase connection creation feedback.
- */
- protected void eraseSourceFeedback() {
- if(!isShowingSourceFeedback())
- return;
- setFlag(FLAG_SOURCE_FEEDBACK, false);
- if(connectionSource != null) {
- connectionSource.eraseSourceFeedback(getSourceRequest());
- }
- }
-
- /**
- * Scrolling can happen either in the {@link AbstractTool#STATE_INITIAL initial} state or
- * once the source of the connection has been {@link AbstractConnectionCreationTool#STATE_CONNECTION_STARTED identified}.
- *
- * @see org.eclipse.gef.Tool#mouseWheelScrolled(org.eclipse.swt.widgets.Event, org.eclipse.gef.EditPartViewer)
- */
- public void mouseWheelScrolled(Event event, EditPartViewer viewer) {
- if(isInState(STATE_INITIAL | STATE_CONNECTION_STARTED))
- performViewerMouseWheel(event, viewer);
- }
-
- /**
- * Returns the request sent to the source node. The source node receives the same request
- * that is used with the target node. The only difference is that at that time the
- * request will be typed as {@link RequestConstants#REQ_CONNECTION_START}.
- *
- * @return the request used with the source node editpart
- */
- protected Request getSourceRequest() {
- return getTargetRequest();
- }
-
- /**
- * Sends a show feedback request to the source editpart and sets the feedback flag.
- */
- protected void showSourceFeedback() {
- if(connectionSource != null) {
- connectionSource.showSourceFeedback(getSourceRequest());
- }
- setFlag(FLAG_SOURCE_FEEDBACK, true);
- }
-
- /**
- * Unloads or resets the tool if the state is in the terminal or invalid state.
- *
- * @see org.eclipse.gef.tools.AbstractTool#handleButtonUp(int)
- */
- protected boolean handleButtonUp(int button) {
- if(isInState(STATE_CONNECTION_STARTED)) {
- handleCreateConnection();
- }
- setState(STATE_TERMINAL);
- if(isInState(STATE_TERMINAL | STATE_INVALID)) {
- handleFinished();
- }
- return true;
- }
-
- /**
- * @see org.eclipse.gef.tools.AbstractTool#handleCommandStackChanged()
- */
- protected boolean handleCommandStackChanged() {
- if(!isInState(STATE_INITIAL)) {
- if(getCurrentInput().isMouseButtonDown(1)) {
- setState(STATE_INVALID);
- } else {
- setState(STATE_INITIAL);
- }
- handleInvalidInput();
- return true;
- }
- return false;
- }
-
- /**
- * @see org.eclipse.gef.Tool#deactivate()
- */
- public void deactivate() {
- eraseSourceFeedback();
- setConnectionSource(null);
- super.deactivate();
- setState(STATE_TERMINAL);
- viewer = null;
- }
-
- /**
- * Calculate the cursor to display
- *
- * @see org.eclipse.gef.tools.AbstractConnectionCreationTool#calculateCursor()
- */
- protected Cursor calculateCursor() {
- if(isInState(STATE_CONNECTION_STARTED)) {
- // Give some feedback so the user knows the area where autoscrolling
- // will occur.
- if(getAutoexposeHelper() != null) {
- return SharedCursors.HAND;
- } else {
-
- // Give some feedback so the user knows that they can't drag
- // outside the viewport.
- if(getCurrentViewer() != null) {
- Control control = getCurrentViewer().getControl();
- if(control instanceof FigureCanvas) {
- Viewport viewport = ((FigureCanvas)control).getViewport();
- Rectangle rect = Rectangle.SINGLETON;
- viewport.getClientArea(rect);
- viewport.translateToParent(rect);
- viewport.translateToAbsolute(rect);
-
- if(!rect.contains(getLocation())) {
- return getDisabledCursor();
- }
- }
- }
- }
- }
- Command command = getCurrentCommand();
- if(command != null && command.canExecute()) {
- EditPart ep = getTargetEditPart();
- if(ep instanceof DiagramEditPart || ep instanceof CompartmentEditPart)
- return CURSOR_TARGET_MENU;
- }
- return super.calculateCursor();
- }
-
- /**
- * Get the command to execute
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool#getCommand()
- *
- * @return the command
- */
- @Override
- protected Command getCommand() {
- if(!antiScroll) {
- EditPart targetPart = getTargetEditPart();
- if(targetPart == null) {
- return null;
- }
- Request req = getTargetRequest();
- if(targetPart instanceof ConnectionNodeEditPart) {
- // a message part is targeted. Instead, we must take the nearby lifeline part.
- // redirect to the message part will be performed later in case we really want to draw a duration on a message
- ConnectionNodeEditPart conn = (ConnectionNodeEditPart)targetPart;
- EditPart source = ((ConnectionNodeEditPart)targetPart).getSource();
- EditPart target = ((ConnectionNodeEditPart)targetPart).getTarget();
- if(source instanceof NodeEditPart && target instanceof NodeEditPart) {
- ConnectionAnchor sourceAnch = ((NodeEditPart)source).getSourceConnectionAnchor(conn);
- ConnectionAnchor targetAnch = ((NodeEditPart)target).getSourceConnectionAnchor(conn);
- double sourceDist = getLocation().getDistance(sourceAnch.getReferencePoint());
- double targetDist = getLocation().getDistance(targetAnch.getReferencePoint());
- if(sourceDist > targetDist) {
- targetPart = target;
- } else {
- targetPart = source;
- }
- }
- }
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(targetPart);
- if(lifelinePart instanceof LifelineEditPart) {
- Object paramOcc1 = req.getExtendedData().get(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION);
- List<OccurrenceSpecification> occ1List = SequenceUtil.getAsOccSpecList(paramOcc1);
- Object paramOcc2 = req.getExtendedData().get(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2);
- List<OccurrenceSpecification> occ2List = SequenceUtil.getAsOccSpecList(paramOcc2);
- if(!occ1List.isEmpty() && !occ2List.isEmpty() && Collections.disjoint(occ1List, occ2List)) {
- OccurrenceSpecification[] pair = SequenceUtil.getPairOfCorrespondingOccSpec(occ1List, occ2List);
- if(pair != null && pair.length > 1) {
- OccurrenceSpecification occ1 = pair[0];
- OccurrenceSpecification occ2 = pair[1];
- if(DurationConstraintHelper.endsOfSameMessage(occ1, occ2)) {
- // call request on the link
- EditPart part = SequenceUtil.getLinkedEditPart(lifelinePart, occ2);
- if(part != null) {
- return part.getCommand(req);
- }
- }
- }
- }
- }
- return targetPart.getCommand(req);
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentDeleteHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentDeleteHelper.java
deleted file mode 100644
index 5ca5564929a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CombinedFragmentDeleteHelper.java
+++ /dev/null
@@ -1,323 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-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.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.PopupMenuCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.menus.PopupMenu;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.EditHelperContext;
-import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-
-public class CombinedFragmentDeleteHelper {
-
- public static class EditRequest extends AbstractEditCommandRequest {
-
- /** element to edit */
- private Element elementToEdit;
-
- public EditRequest(TransactionalEditingDomain editingDomain, Element elementToEdit) {
- super(editingDomain);
- this.elementToEdit = elementToEdit;
- }
-
- public Object getEditHelperContext() {
- IClientContext context = getClientContext();
-
- if(context == null) {
- return getElementToEdit();
- } else {
- return new EditHelperContext(getElementToEdit(), context);
- }
- }
-
- public Element getElementToEdit() {
- return elementToEdit;
- }
- }
-
- public static class MoveOperandFragmentsCommand extends EditElementCommand {
-
- private InteractionFragment parent;
-
- private EList<InteractionFragment> fragmentsToMove;
-
- private InteractionOperand sourceOperand;
-
- private CombinedFragment combinedFragment;
-
- private CombinedFragmentEditPart host;
-
- public MoveOperandFragmentsCommand(CombinedFragmentEditPart host, CombinedFragment cf, InteractionOperand op, EditRequest editRequest) {
- super(null, editRequest.getElementToEdit(), editRequest);
- InteractionOperand enclosingOp = cf.getEnclosingOperand();
- if(enclosingOp != null) {
- Element owner = enclosingOp.getOwner();
- if(owner instanceof CombinedFragment) {
- this.parent = enclosingOp;
- }
- } else {
- Element owner = cf.getOwner();
- if(owner instanceof Interaction) {
- this.parent = (InteractionFragment)owner;
- }
- }
- this.host = host;
- this.sourceOperand = op;
- this.combinedFragment = cf;
- fragmentsToMove = op.getFragments();
- }
-
- public boolean canExecute() {
- return (sourceOperand != null && combinedFragment != null);
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(parent != null && !fragmentsToMove.isEmpty()) {
- List<CombinedFragmentEditPart> parts = collectCombinedFragmentParts();
- if(parent instanceof InteractionOperand) {
- ((InteractionOperand)parent).getFragments().addAll(fragmentsToMove);
- moveToOperandPart((InteractionOperandEditPart)host.getParent(), parts);
- } else if(parent instanceof Interaction) {
- ((Interaction)parent).getFragments().addAll(fragmentsToMove);
- moveToInteractionPart((InteractionInteractionCompartmentEditPart)host.getParent(), parts);
- }
- }
- sourceOperand.getFragments().clear();
- return CommandResult.newOKCommandResult();
- }
-
- private void moveToOperandPart(GraphicalEditPart op, List<CombinedFragmentEditPart> keepParts) {
- if(!keepParts.isEmpty()) {
- Rectangle parentBounds = getAbsoluteBounds((AbstractGraphicalEditPart)op.getParent());
- for(CombinedFragmentEditPart cef : keepParts) {
- View view = cef.getNotationView();
- op.getNotationView().getPersistedChildren().add(view);
-
- Bounds bounds = (Bounds)((Shape)cef.getNotationView()).getLayoutConstraint();
- Rectangle absolute = getAbsoluteBounds(cef);
- bounds.setX(absolute.x() - parentBounds.x());
- bounds.setY(absolute.y() - parentBounds.y());
- }
- }
- }
-
- private void moveToInteractionPart(GraphicalEditPart op, List<CombinedFragmentEditPart> keepParts) {
- if(!keepParts.isEmpty()) {
- Rectangle b = getAbsoluteBounds(op);
- for(CombinedFragmentEditPart cef : keepParts) {
- View view = cef.getNotationView();
- op.getNotationView().getPersistedChildren().add(view);
- Bounds bounds = (Bounds)((Shape)cef.getNotationView()).getLayoutConstraint();
-
- Rectangle absolute = getAbsoluteBounds(cef);
- absolute.performTranslate(-b.x, -b.y);
-
- bounds.setX(absolute.x() - 5);
- bounds.setY(absolute.y() - 6);
- }
- }
- }
-
- private List<CombinedFragmentEditPart> collectCombinedFragmentParts() {
- List<CombinedFragmentEditPart> parts = new ArrayList<CombinedFragmentEditPart>();
- for(InteractionFragment f : fragmentsToMove) {
- if(f instanceof CombinedFragment) {
- EditPart p = findEditPartByModel(host, f);
- if(p instanceof CombinedFragmentEditPart)
- parts.add((CombinedFragmentEditPart)p);
- }
- }
- return parts;
- }
- }
-
- static public class SelectLabelProvider extends org.eclipse.jface.viewers.LabelProvider {
-
- public String getText(Object object) {
- return object.toString();
- }
-
- public Image getImage(Object object) {
- return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_ETOOL_DELETE);
- }
- }
-
- public static class SelectAndDeleteCommand extends PopupMenuCommand {
-
- private String choice;
-
- private CompositeTransactionalCommand deletaAllCommand;
-
- private CompositeTransactionalCommand keepCommand;
-
- private String[] labels;
-
- public SelectAndDeleteCommand(CompositeTransactionalCommand deletaAllCommand, CompositeTransactionalCommand keepCommand, String[] labels) {
- super("prompt for delete", Display.getCurrent().getActiveShell());
- PopupMenu popupMenu = new PopupMenu(Arrays.asList(labels), new SelectLabelProvider());
- setPopupMenu(popupMenu);
- this.labels = labels;
- this.deletaAllCommand = deletaAllCommand;
- this.keepCommand = keepCommand;
- }
-
- protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, org.eclipse.core.runtime.IAdaptable info) throws ExecutionException {
- CommandResult cmdResult = super.doExecuteWithResult(progressMonitor, info);
- if(!cmdResult.getStatus().isOK()) {
- return cmdResult;
- }
- this.choice = cmdResult.getReturnValue().toString();
- if(choice.contains(labels[0])) {
- deletaAllCommand.execute(progressMonitor, info);
- return deletaAllCommand.getCommandResult();
- } else {
- keepCommand.execute(progressMonitor, info);
- return keepCommand.getCommandResult();
- }
- }
-
- protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- if(choice.contains(labels[0])) {
- deletaAllCommand.undo(progressMonitor, info);
- return deletaAllCommand.getCommandResult();
- } else {
- keepCommand.undo(progressMonitor, info);
- return keepCommand.getCommandResult();
- }
- }
-
- protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- if(choice.contains(labels[0])) {
- deletaAllCommand.redo(progressMonitor, info);
- return deletaAllCommand.getCommandResult();
- } else {
- keepCommand.redo(progressMonitor, info);
- return keepCommand.getCommandResult();
- }
- }
- }
-
- static class DeleteCombinedFragmentCommand extends AbstractTransactionalCommand {
-
- private IElementEditService provider;
-
- private DestroyElementRequest req;
-
- public DeleteCombinedFragmentCommand(TransactionalEditingDomain domain, IElementEditService provider, DestroyElementRequest req) {
- super(domain, null, null);
- this.provider = provider;
- this.req = req;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- ICommand deleteCommand = provider.getEditCommand(req);
- try {
- deleteCommand.execute(monitor, info);
- } catch (ExecutionException e) {
- e.printStackTrace();
- }
- return CommandResult.newOKCommandResult();
- }
- }
-
-
- public static ICommand createDestroyElementCommand(CombinedFragment cf, TransactionalEditingDomain transactionalEditingDomain, IElementEditService provider, DestroyElementRequest req, ICommand deleteCommand, CombinedFragmentEditPart host) {
- CompositeTransactionalCommand deleteAll = new CompositeTransactionalCommand(transactionalEditingDomain, null);
- deleteAll.add(deleteCommand);
-
- CompositeTransactionalCommand deleteCfOnly = new CompositeTransactionalCommand(transactionalEditingDomain, null);
- {
- // remove children from operands and append to parent combined fragment
- for(InteractionOperand op : cf.getOperands()) {
- deleteCfOnly.add(new MoveOperandFragmentsCommand(host, cf, op, new EditRequest(transactionalEditingDomain, cf)));
- }
-
- deleteCfOnly.add(new DeleteCombinedFragmentCommand(transactionalEditingDomain, provider, req));
- }
- return new SelectAndDeleteCommand(deleteAll, deleteCfOnly, new String[]{ "Delete all", "Keep contents" });
- }
-
- public static ICommand createDeleteViewCommand(CombinedFragment cf, TransactionalEditingDomain transactionalEditingDomain, CombinedFragmentEditPart host) {
- CompositeTransactionalCommand deleteAll = new CompositeTransactionalCommand(transactionalEditingDomain, null);
- {
- // Get the elements associated with the CF
- List<Element> elements = SequenceUtil.getCombinedFragmentAssociatedElement(cf);
- // Create the delete view commands
- SequenceDeleteHelper.deleteView(deleteAll, elements, transactionalEditingDomain);
- }
-
- CompositeTransactionalCommand deleteCfOnly = new CompositeTransactionalCommand(transactionalEditingDomain, null);
- {
- // remove children from operands and append to parent combined fragment
- for(InteractionOperand op : cf.getOperands()) {
- deleteCfOnly.add(new MoveOperandFragmentsCommand(host, cf, op, new EditRequest(transactionalEditingDomain, cf)));
- }
-
- // delete operands from combined fragment
- for(Element element : cf.getOperands()) {
- SequenceDeleteHelper.deleteView(deleteCfOnly, element, transactionalEditingDomain);
- }
- }
- return new SelectAndDeleteCommand(deleteAll, deleteCfOnly, new String[]{ "Hide all", "Keep contents" });
- }
-
- static Rectangle getAbsoluteBounds(AbstractGraphicalEditPart part) {
- Rectangle b = part.getFigure().getBounds().getCopy();
- part.getFigure().translateToAbsolute(b);
- return b;
- }
-
- public static EditPart findEditPartByModel(EditPart part, EObject m) {
- List children = part.getChildren();
- if(children != null && children.size() > 0) {
- for(Object o : children) {
- EditPart p = (EditPart)o;
-
- Object model = p.getModel();
- if(model != null && model instanceof View && m.equals(((View)model).getElement()))
- return p;
-
- EditPart res = findEditPartByModel(p, m);
- if(res != null)
- return res;
- }
- }
- return null;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CommandHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CommandHelper.java
deleted file mode 100644
index d46c58acc6f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/CommandHelper.java
+++ /dev/null
@@ -1,1203 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.Transaction;
-import org.eclipse.emf.transaction.TransactionalCommandStack;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.impl.InternalTransactionalEditingDomain;
-import org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl;
-import org.eclipse.gef.EditDomain;
-import org.eclipse.gef.Tool;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.infra.core.editor.CoreMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
-import org.eclipse.papyrus.uml.diagram.common.util.MessageDirection;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLPaletteFactory.AspectUnspecifiedTypeConnectionToolEx;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.eclipse.uml2.uml.ActionExecutionSpecification;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Event;
-import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.Gate;
-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.InteractionUse;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.MessageSort;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Port;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Signal;
-import org.eclipse.uml2.uml.StateInvariant;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * A helper class for the command.
- *
- */
-public class CommandHelper {
-
-
- /**
- * Title for dialog of no referenced interaction error
- */
- private static final String NO_REFERENCED_INTERACTION_DIALOG_TITLE = "No referenced interaction"; //$NON-NLS-1$
-
- /**
- * Message for dialog of no referenced interaction error
- */
- private static final String NO_REFERENCED_INTERACTION_DIALOG_MSG = "Couldn't had message if there isn't referenced interaction"; //$NON-NLS-1$
-
- /**
- * Message for wrong gate container type error
- */
- private static final String WRONG_GATE_CONTAINER_TYPE_ERROR_MSG = "Wrong element UML type for create a gate"; //$NON-NLS-1$
-
- /**
- * Title for dialog of choose actual gate
- */
- private static final String CHOOSE_GATE_DIALOG_TITLE = "Actual gates of the interaction use"; //$NON-NLS-1$
-
- /**
- * Message for dialog of choose actual gate
- */
- private static final String CHOOSE_GATE_DIALOG_MSG = "Choose the gate to attach the message"; //$NON-NLS-1$
-
-
-
- /**
- * Create a message on the given interaction. It only creates the message and not its messages end.
- *
- * @param interaction
- * the containing interaction
- * @param messageSort
- * the messageSort.
- * @return the created message
- */
- public static Message doCreateMessage(Interaction interaction, MessageSort messageSort, NamedElement signature) {
- Message message = interaction.createMessage(null);
-
- // Set the interaction that will contain the message
- message.setInteraction(interaction);
-
- // Set MessageSort
- message.setMessageSort(messageSort);
-
- String prefix = "";
-
- if(signature != null) {
- prefix = signature.getName() + "_";
- }
-
- ElementInitializers.init_NamedElement(message, prefix);
-
- if(signature != null) {
- message.setSignature(signature);
- }
-
- return message;
- }
-
- /**
- * Create message occurence specification
- *
- * @param interaction
- * The interaction
- * @param event
- * The event to attach
- * @return The message occurence specification
- */
- public static MessageOccurrenceSpecification doCreateMessageOccurrence(InteractionFragment fragment, Event event, Lifeline lifeline) {
-
- // Create the MOS
- MessageOccurrenceSpecification mos = UMLFactory.eINSTANCE.createMessageOccurrenceSpecification();
-
- // Configure the MOS
- doConfigureOccurenceSpecification(mos, event, fragment, lifeline);
-
- return mos;
- }
-
-
- /**
- * Create an ExecutionOccurrenceSpecification
- *
- * @param es
- * the ExecutionSpecification associated with this ExecutionOccurrenceSpecification.
- * @param event
- * the event associated with this OccurrenceSpecification. It must be of type ExecutionEvent.
- * @param fragment
- * the fragment enclosing this OccurenceSpecifcation. It must be an Interaction or an Operand.
- * @return the Execution Occurrence Specification
- */
- public static ExecutionOccurrenceSpecification doCreateExecutionOccurenceSpecification(ExecutionSpecification es, InteractionFragment fragment, Lifeline lifeline) {
-
- // Create the ExecutionOccurrenceSpecification
- ExecutionOccurrenceSpecification eos = UMLFactory.eINSTANCE.createExecutionOccurrenceSpecification();
-
- // Configure the EOS.
- // The event is an ExecutionEvent
- doConfigureOccurenceSpecification(eos, null, fragment, lifeline);
-
- // Set the executionSpecification of the ExecutionOccurrenceSpecification
- eos.setExecution(es);
-
- return eos;
- }
-
- /**
- * Configure an OccurrenceSpecification
- *
- * @param os
- * the occurrenceSpecification to configure
- * @param event
- * the event to associated with the {@link OccurrenceSpecification}
- * @param fragment
- * the fragment containing the {@link OccurrenceSpecification}. It can be an {@link Interaction} or an {@link InteractionOperand}
- * @param lifeline
- * the covered lifeline
- */
- private static void doConfigureOccurenceSpecification(OccurrenceSpecification os, Event event, InteractionFragment fragment, Lifeline lifeline) {
-
- // Set the Container of the OccurrenceSpecification
- if(fragment instanceof Interaction) {
- os.setEnclosingInteraction((Interaction)fragment);
- } else if(fragment instanceof InteractionOperand) {
- os.setEnclosingOperand((InteractionOperand)fragment);
- }
-
- // Set the covered lifeline
- os.getCovereds().add(lifeline);
-
- // Set the event of the OccurrenceSpecification
- //now it doesn't exist
- //os.setEvent(event);
-
- }
-
- /**
- * Attach an Interaction on a Lifeline
- *
- * @param lifeline
- * The lifeline
- * @param fragment
- * The interaction fragment
- */
- public static void setSingleCovered(Lifeline lifeline, InteractionFragment fragment) {
- if(!fragment.getCovereds().contains(lifeline)) {
- fragment.getCovereds().add(lifeline);
- }
- }
-
-
-
- /**
- * Get the signature of the message. Opens a dialog box to select a signature.
- *
- * @param model
- * The model
- * @param source
- * The source of the message
- * @param target
- * The target of the message
- * @return null, if cancel has been pressed. An empty list if the null Element has been
- * selected, or a list with the selected element.
- */
- public static List<NamedElement> getSignature(Element model, Element source, Element target) {
- return getSignature(model, source, target, null);
- }
-
- /**
- * Get the signature of the message. Opens a dialog box to select a signature. Inputs depends on
- * the messageSort, if any.
- *
- * @param model
- * The model
- * @param source
- * The source of the message
- * @param target
- * The target of the message
- * @param messageSort
- * true if message sort is set
- * @return null, if cancel has been pressed. An empty list if the null Element has been
- * selected, or a list with the selected element.
- */
- public static List<NamedElement> getSignature(Element model, Element source, Element target, MessageSort messageSort) {
-
- // element where to look for parents
- Element parentsOwner = target;
-
- // default values
- // used for asynch message where messageSort = null
- boolean useOperations = true;
- boolean useSignals = true;
-
- // according to the type of the message
- // choose which types we should care of
- if(MessageSort.SYNCH_CALL_LITERAL.equals(messageSort)) {
- useSignals = false;
- } else if(MessageSort.CREATE_MESSAGE_LITERAL.equals(messageSort) || MessageSort.DELETE_MESSAGE_LITERAL.equals(messageSort)) {
- useOperations = false;
- } else if(MessageSort.REPLY_LITERAL.equals(messageSort)) {
- parentsOwner = source;
- useSignals = false;
- }
-
- LinkedHashMap<EClass, List<EObject>> mapTypesPossibleParents = new LinkedHashMap<EClass, List<EObject>>();
-
- if(useSignals) {
- mapTypesPossibleParents.put(UMLPackage.eINSTANCE.getSignal(), new LinkedList<EObject>());
- }
- if(useOperations) {
- mapTypesPossibleParents.put(UMLPackage.eINSTANCE.getOperation(), new LinkedList<EObject>());
- }
-
- // add the parents we can find
- boolean existingParent = false;
- List<Type> types = new ArrayList<Type>();
- if(parentsOwner instanceof InteractionFragment) {
- EList<Lifeline> lifelines = ((InteractionFragment)parentsOwner).getCovereds();
- for(Lifeline l : lifelines) {
- if(l.getRepresents() != null && l.getRepresents().getType() != null) {
- types.add(l.getRepresents().getType());
- }
- boolean result = addParentsFromLifeline(l, mapTypesPossibleParents);
- if(result) {
- existingParent = true;
- }
- }
- } else if(parentsOwner instanceof Lifeline) {
- Lifeline l = (Lifeline)parentsOwner;
- if(l.getRepresents() != null && l.getRepresents().getType() != null) {
- types.add(l.getRepresents().getType());
- }
- existingParent = addParentsFromLifeline(l, mapTypesPossibleParents);
- }
-
-
- // if no parent available => no signature
- if(!existingParent) {
- return new ArrayList<NamedElement>();
- }
-
- Set<EObject> existingElements = getExistingElementsFromParents(mapTypesPossibleParents);
-
- // fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=383420, remove connection feedbacks before opening dialog
- clearConnectionFeedback();
-
- TransactionalEditingDomain editingDomain;
- try {
- editingDomain = ServiceUtilsForEObject.getInstance().getTransactionalEditingDomain(model);
- } catch (ServiceException ex) {
- UMLDiagramEditorPlugin.log.error(ex);
- return Collections.<NamedElement> emptyList();
- }
-
- // Open the selection dialog
- SelectOrCreateDialog dialog = new SelectOrCreateDialog(Display.getCurrent().getActiveShell(), Messages.CommandHelper_CreateMessage, createTypeLabelProvider(), new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory()), editingDomain, existingElements, mapTypesPossibleParents, types);
-
- // Get the selected result
- if(dialog.open() == Window.OK) {
- // list to return
- List<NamedElement> returnElements = new ArrayList<NamedElement>();
- EObject element = dialog.getSelected();
- if(element instanceof NamedElement) {
-
- returnElements.add((NamedElement)element);
- return returnElements;
- }
- return returnElements;
- }
-
- return null;
- }
-
- private static void clearConnectionFeedback() {
- AspectUnspecifiedTypeConnectionToolEx conTool = null;
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if(editor instanceof CoreMultiDiagramEditor) {
- editor = ((CoreMultiDiagramEditor)editor).getActiveEditor();
- if(editor instanceof DiagramEditor) {
- DiagramEditor de = (DiagramEditor)editor;
- DiagramEditPart diagramEP = de.getDiagramEditPart();
- EditDomain domain = diagramEP.getRoot().getViewer().getEditDomain();
- Tool tool = domain.getActiveTool();
- if(tool instanceof AspectUnspecifiedTypeConnectionToolEx) {
- conTool = (AspectUnspecifiedTypeConnectionToolEx)tool;
- conTool.clearConnectionFeedback();
- }
- }
- }
- }
-
- /**
- * find the existing elements from the possible parents
- *
- * @param mapTypesPossibleParents
- * map of list containing the possible parents
- * @return
- */
- private static Set<EObject> getExistingElementsFromParents(Map<EClass, List<EObject>> mapTypesPossibleParents) {
- // find the existing elements using the parents we just found
- Set<EObject> existingElements = new HashSet<EObject>();
- for(EClass eClass : mapTypesPossibleParents.keySet()) {
- List<EObject> parents = mapTypesPossibleParents.get(eClass);
- for(EObject parent : parents) {
- if(parent instanceof Classifier) {
- existingElements.addAll(((Classifier)parent).getAllOperations());
-
- // add operations from port
- EList<Property> attrs = ((Classifier)parent).getAllAttributes();
- for(Property p : attrs) {
- if(p instanceof Port && p.getType() instanceof Classifier) {
- existingElements.addAll(((Classifier)p.getType()).getAllOperations());
- }
- }
-
- } else if(parent instanceof Package) {
- EList<Element> ownedElements = ((Package)parent).allOwnedElements();
- for(Element e : ownedElements) {
- if(e instanceof Signal) {
- existingElements.add(e);
- }
- }
- }
- }
- }
- return existingElements;
- }
-
- /**
- * Create a specific label provider for types
- * which remove everything after the first space
- *
- * @return the label provider
- */
- private static AdapterFactoryLabelProvider createTypeLabelProvider() {
- AdapterFactoryLabelProvider typeLabelProvider = new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory()) {
-
- @Override
- public String getText(Object object) {
- // remove the supertypes from the label
- // => keep only the first word
- String text = super.getText(object);
- int index = text.indexOf(" "); //$NON-NLS-1$
- if(index != -1) {
- text = text.substring(0, index);
- }
- return text;
- }
- };
- return typeLabelProvider;
- }
-
- /**
- * add to the map the possible parents (classes, packages)
- * founded "in" the lifeline
- *
- * @param l
- * The lifeline where to look for possible parents
- * @param mapTypesPossibleParents
- * The map where to store this parents
- * @return true if at least one parent was added
- */
- private static boolean addParentsFromLifeline(Lifeline l, Map<EClass, List<EObject>> mapTypesPossibleParents) {
- ConnectableElement e = l.getRepresents();
-
- boolean existingParent = false;
-
- // If there is no connectable element (ie : lifeline doesn't have a represents property yet)
- if(e == null) {
- return false;
- }
-
- Type type = e.getType();
- if(type == null) {
- return false;
- }
-
- // the classes are related to operation
- List<EObject> possibleClassifier = mapTypesPossibleParents.get(UMLPackage.eINSTANCE.getOperation());
- if(possibleClassifier != null) {
- if(type instanceof Classifier) {
- Classifier classifier = (Classifier)type;
- possibleClassifier.add(classifier);
-
- // add the supertypes of the class
- possibleClassifier.addAll(classifier.allParents());
- existingParent = true;
- }
- }
-
- // and the packages to signal
- List<EObject> possiblePackages = mapTypesPossibleParents.get(UMLPackage.eINSTANCE.getSignal());
- if(possiblePackages != null && type.getPackage() != null) {
- Package package_ = type.getPackage();
- possiblePackages.add(package_);
- // add the owners of the package
- possiblePackages.addAll(package_.allOwningPackages());
- existingParent = true;
- }
-
- return existingParent;
- }
-
- /**
- * Get the signature of the message. Opens a dialog box to select a signature. Inputs depends on
- * the messageSort, if any.
- *
- * @param availableProperties
- * list of available properties
- * @return null, if cancel has been pressed. An empty list if the null Element has been
- * selected, or a list with the selected element.
- */
- public static Property getProperties(List<Property> availableProperties) {
-
- ILabelProvider labelProvider = new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(Display.getCurrent().getActiveShell(), labelProvider);
- dialog.setTitle("Property Selection"); //$NON-NLS-1$
- dialog.setMessage("Select a property (* = any string, ? = any char):"); //$NON-NLS-1$
-
- if(availableProperties == null || availableProperties.isEmpty()) {
- return null;
- }
-
- dialog.setElements(availableProperties.toArray());
-
- Property element = null;
- int dialogResult = dialog.open();
- if(dialogResult == Window.OK) {
- if(!"".equals(dialog.getFirstResult())) { //$NON-NLS-1$
- element = (Property)dialog.getFirstResult();
- }
- }
- return element;
- }
-
- /**
- * Execute a EMF command without history (cancelation usage)
- *
- * @param editingDomain
- * The editing domain
- * @param command
- * The command
- */
- public static void executeCommandWithoutHistory(EditingDomain editingDomain, org.eclipse.emf.common.command.Command command) {
- try {
- CommandStack commandStack = editingDomain.getCommandStack();
- if(commandStack instanceof TransactionalCommandStack) {
- ((TransactionalCommandStack)commandStack).execute(command, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
- } else {
- commandStack.execute(command);
- }
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (RollbackException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Execute a EMF command without history
- *
- * @param editingDomain
- * The editing domain
- * @param command
- * The command
- * @param flag
- */
- public static void executeCommandWithoutHistory(EditingDomain editingDomain, org.eclipse.emf.common.command.Command command, boolean flag) {
- TransactionalCommandStackImpl stack = new TransactionalCommandStackImpl();
- stack.setEditingDomain((InternalTransactionalEditingDomain)editingDomain);
- try {
- stack.execute(command, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (RollbackException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Retrieve the Lifeline associated with an ExecutionSpecification.
- * According to the UML Specification, an ExecutionSpecification must have a start and a finish.
- *
- * In Papyrus, an ExecutionSpecification may not have a start and finish.
- * To handle this specific case, we return the first lifeline that the ES covered.
- *
- * @param es
- * the targeted execution specification
- * @return the associated lifeline, or null if the ES has no start, no finish, no covered lifelines.
- */
- public static Lifeline getExecutionSpecificationLifeline(ExecutionSpecification es) {
- Lifeline lifeline = null;
- if(es.getStart() != null) {
- lifeline = es.getStart().getCovereds().get(0);
- } else if(es.getFinish() != null) {
- lifeline = es.getFinish().getCovereds().get(0);
- }
-
- if(lifeline == null) {
- if(!es.getCovereds().isEmpty()) {
- lifeline = es.getCovereds().get(0);
- }
- }
- return lifeline;
- }
-
- /**
- * Create an DestructionEvent and an occurrenceSpecification bounds to the lifeline
- *
- * @param destructionEvent
- * the destructionEvent
- * @param lifeline
- * the lifeline associated with the destructionEvent
- * @param modelContainer
- * the container of the occurrenceSpecification that will bound the lifeline and the destructionEvent.
- * @return
- */
- // public static DestructionEvent doCreateDestructionEvent(Lifeline lifeline, Object modelContainer) {
- //
- // // Get the nearest package
- // Package pack = lifeline.getNearestPackage();
- //
- // EClass destructionEventEClass = UMLPackage.eINSTANCE.getDestructionEvent();
- // // Add the destructionEvent to the Package
- // DestructionEvent destructionEvent = (DestructionEvent)pack.createPackagedElement(ElementInitializers.getNextNumberedName(pack.getOwnedElements(), destructionEventEClass.getName()), destructionEventEClass);
- //
- // // Create an occurrenceSpecification
- // Element element = createElement(modelContainer, UMLPackage.eINSTANCE.getOccurrenceSpecification());
- // OccurrenceSpecification os = null;
- // if(element instanceof OccurrenceSpecification) {
- // os = (OccurrenceSpecification)element;
- // doConfigureOccurenceSpecification(os, destructionEvent, (InteractionFragment)modelContainer, lifeline);
- // }
- //
- // return destructionEvent;
- // }
-
- /**
- * Create an DestructionOccurrenceSpecification bounds to the lifeline
- *
- * @param lifeline
- * the lifeline associated with the destructionEvent
- * @param modelContainer
- * the container of the occurrenceSpecification that will bound the lifeline and the destructionEvent.
- * @return
- */
- public static DestructionOccurrenceSpecification doCreateDestructionOccurrenceSpecification(Lifeline lifeline, Object modelContainer) {
-
- // Get the nearest package
- Package pack = lifeline.getNearestPackage();
-
- // Create an occurrenceSpecification
- Element element = createElement(modelContainer, UMLPackage.eINSTANCE.getDestructionOccurrenceSpecification());
- DestructionOccurrenceSpecification os = null;
- if(element instanceof DestructionOccurrenceSpecification) {
- os = (DestructionOccurrenceSpecification)element;
- doConfigureOccurenceSpecification(os, null, (InteractionFragment)modelContainer, lifeline);
- }
-
- return os;
- }
-
-
-
-
-
- /**
- * Create an StateInvariant
- *
- * @param lifeline
- * the lifeline on which the stateInvariant is created (or which is covered by the StateInvariant).
- * @param modelContainer
- * the model container
- * @return the created stateInvariant or null
- */
- public static StateInvariant doCreateStateInvariant(Lifeline lifeline, Object modelContainer) {
- StateInvariant stateInvariant = null;
-
- Element element = createElement(modelContainer, UMLPackage.eINSTANCE.getStateInvariant());
-
- if(element instanceof StateInvariant) {
- stateInvariant = (StateInvariant)element;
- // Get the covered lifeline
- stateInvariant.getCovereds().add(lifeline);
-
- // Create the associated invariant
- stateInvariant.createInvariant("");
- }
-
- return stateInvariant;
- }
-
- private static Element createElement(Object modelContainer, EClass eClass) {
-
- // Get the enclosing interaction fragment
- if(modelContainer instanceof InteractionOperand) {
- InteractionOperand interactionOperand = (InteractionOperand)modelContainer;
- // Create the ES
- return interactionOperand.createFragment(ElementInitializers.getNextNumberedName(interactionOperand.getFragments(), eClass.getName()), eClass);
- } else if(modelContainer instanceof Interaction) {
- Interaction interaction = (Interaction)modelContainer;
- // Create the ES
- return interaction.createFragment(ElementInitializers.getNextNumberedName(interaction.getFragments(), eClass.getName()), eClass);
- }
- return null;
- }
-
-
- /**
- * Create a CombinedFragment and its associated interaction Operand
- *
- * @param modelContainer
- * the container of the CF. It could be an InteractionOperand or an Interaction.
- * @param operatorKind
- * the operatorKind of the combinedFragment
- * @return the created CombinedFragment or null
- */
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public static CombinedFragment doCreateCombinedFragment(Object modelContainer, InteractionOperatorKind operatorKind, Collection coveredLifelines) {
- CombinedFragment combinedFragment = null;
-
- Element element = createElement(modelContainer, UMLPackage.eINSTANCE.getCombinedFragment());
- if(element instanceof CombinedFragment) {
- combinedFragment = (CombinedFragment)element;
- combinedFragment.getCovereds().addAll(coveredLifelines);
-
- // Set the operator kind
- combinedFragment.setInteractionOperator(operatorKind);
-
- // Create the operand
- createCoRegionInteractionOperand(combinedFragment);
- }
- return combinedFragment;
- }
-
- /**
- * Create a CoRegion element :
- * a CombinedFragment with InteractionOperator set to 'Parallel'
- *
- * @param modelContainer
- * the parent element of the CoRegion
- * @param coveredLifeline
- * the lifeline on which the CoRegion is created
- * @return the created CoRegion or null
- */
- public static CombinedFragment doCreateCoRegion(Object modelContainer, Lifeline coveredLifeline) {
-
- // Create a Parallel CombinedFragment
- Element element = createElement(modelContainer, UMLPackage.eINSTANCE.getCombinedFragment());
- if(element instanceof CombinedFragment) {
- CombinedFragment combinedFragment = (CombinedFragment)element;
- combinedFragment = (CombinedFragment)element;
- combinedFragment.getCovereds().add(coveredLifeline);
-
- // Set the operator kind
- combinedFragment.setInteractionOperator(InteractionOperatorKind.PAR_LITERAL);
-
- return combinedFragment;
- }
- return null;
- }
-
-
- /**
- * Create an ExecutionSpecification. It also creates the start and finish ExecutionOccurenceSpecification of the ExecutionSpecification, and their
- * corresponding events.
- *
- * @param es
- * the executionSpecification to create.
- * @param lifeline
- * the lifeline covered by the ExecutionSpecification.
- * @return the created executionSpecification
- */
- public static ExecutionSpecification doCreateExecutionSpecification(ExecutionSpecification es, Lifeline lifeline, Object modelContainer) {
- InteractionFragment interactionFragment = null;
- // Get the enclosing interaction fragment
- if(modelContainer instanceof InteractionOperand) {
- InteractionOperand interactionOperand = (InteractionOperand)modelContainer;
- interactionFragment = interactionOperand;
- } else {
- Interaction interaction = lifeline.getInteraction();
- interactionFragment = interaction;
- }
-
- // Create events
- org.eclipse.uml2.uml.Package eventContainer = interactionFragment.getNearestPackage();
-
- // ExecutionEvent startingExecutionEvent = EventHelper.doCreateExecutionEvent(eventContainer);
- // ExecutionEvent finishingExecutionEvent = EventHelper.doCreateExecutionEvent(eventContainer);
-
- // Create fragments in the correct order : start OccurenceSpecification, ExecutionSpecification, finish OccurenceSpecification
- // start
- ExecutionOccurrenceSpecification start = CommandHelper.doCreateExecutionOccurenceSpecification(null, interactionFragment, lifeline);
-
- // Create the ExecutionSpecification
- if(modelContainer instanceof InteractionOperand) {
- InteractionOperand interactionOperand = (InteractionOperand)modelContainer;
- // Create the ES
- es = (ExecutionSpecification)interactionOperand.createFragment(null, es.eClass());
- } else {
- Interaction interaction = lifeline.getInteraction();
- // Create the ES
- es = (ExecutionSpecification)interaction.createFragment(null, es.eClass());
- }
-
- // finish
- ExecutionOccurrenceSpecification finish = CommandHelper.doCreateExecutionOccurenceSpecification(es, interactionFragment, lifeline);
-
- // Get the covered lifeline
- es.getCovereds().add(lifeline);
-
- // Set the start and the finish ExecutionOccurrenceSpecification
- es.setStart(start);
- es.setFinish(finish);
- start.setExecution(es);
-
- // Init the name of the ES and its EOS
- initExecutionSpecificationName(es);
-
- return es;
- }
-
-
- private static void initExecutionSpecificationName(ExecutionSpecification es) {
-
- String body = ""; //$NON-NLS-1$
- if(es instanceof ActionExecutionSpecification) {
- body = "ActionExecSpec"; //$NON-NLS-1$
- } else {
- body = "BehaviorExecSpec"; //$NON-NLS-1$
- }
- // Init the name
- ElementInitializers.init_NamedElement(es, "", body, ""); //$NON-NLS-1$ //$NON-NLS-2$
-
- // Init the name of the related executionOccurrenceSpecification
- ElementInitializers.init_NamedElement(es.getStart(), "", es.getName(), "Start"); //$NON-NLS-1$ //$NON-NLS-2$
- ElementInitializers.init_NamedElement(es.getFinish(), "", es.getName(), "Finish"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-
- /**
- * Create a MessageEnd
- *
- * @param interaction
- * fragment
- * The Interaction fragment
- * @param callEvent
- * The call event
- * @param element
- * The element
- * @param direction
- * The message direction
- * @return A MessageOccurrenceSpecification if element is ExecutionSpecification or Lifeline. A
- * Gate if element is Interaction or CombinedFragment or InteractionUse
- */
- public static MessageEnd createMessageEnd(InteractionFragment interactionFragment, Event event, Element element, MessageDirection direction) {
- MessageEnd endMsg = null;
- if(element instanceof Lifeline) {
- endMsg = doCreateMessageOccurrence(interactionFragment, event, (Lifeline)element);
- } else if(element instanceof ExecutionSpecification) {
- Lifeline lifeline = getExecutionSpecificationLifeline((ExecutionSpecification)element);
- endMsg = doCreateMessageOccurrence(interactionFragment, event, lifeline);
- } else if(element instanceof Interaction || element instanceof CombinedFragment || element instanceof InteractionUse) {
- endMsg = doCreateGate(element, direction);
- }
- return endMsg;
- }
-
- /**
- * Create gate if element is a Interaction, a Combined Fragment or a Interaction Use
- *
- * @param element
- * The element
- * @param direction
- * The message direction
- * @return The gate
- * @throws IllegalArgumentException
- * if the element is not a right element type
- */
- public static Gate doCreateGate(Element element, MessageDirection direction) {
- Gate gate = null;
-
- if(element instanceof Interaction) {
- gate = ((Interaction)element).createFormalGate(null);
- } else if(element instanceof CombinedFragment) {
- CombinedFragment combinedFragment = (CombinedFragment)element;
- EList<Gate> cfragmentGates = combinedFragment.getCfragmentGates();
- if(cfragmentGates.isEmpty()) {
- gate = ((CombinedFragment)element).createCfragmentGate(null);
- } else {
- // remove connection feedbacks before opening dialog
- clearConnectionFeedback();
-
- Shell shell = Display.getCurrent().getActiveShell();
- ILabelProvider labelProvider = new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider);
- dialog.setTitle("Gates of the CombinedFragment has");
- dialog.setMessage(CHOOSE_GATE_DIALOG_MSG);
- dialog.setMultipleSelection(false);
-
- List<Gate> gates = new ArrayList<Gate>();
- for(Gate actualGate : cfragmentGates) {
- gates.add(actualGate);
- }
-
- dialog.setElements(gates.toArray());
- if(dialog.open() == Window.OK) {
- gate = (Gate)dialog.getFirstResult();
- } else { // cancel button
- throw new OperationCanceledException();
- }
- }
- } else if(element instanceof InteractionUse) {
- Shell shell = Display.getCurrent().getActiveShell();
- InteractionUse interactionUse = (InteractionUse)element;
-
- if(interactionUse.getRefersTo() == null) {
- MessageDialog.openError(shell, NO_REFERENCED_INTERACTION_DIALOG_TITLE, NO_REFERENCED_INTERACTION_DIALOG_MSG);
- return null;
- }
-
- ILabelProvider labelProvider = new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider);
- dialog.setTitle(CHOOSE_GATE_DIALOG_TITLE);
- dialog.setMessage(CHOOSE_GATE_DIALOG_MSG);
- dialog.setMultipleSelection(false);
-
- List<Gate> gates = new ArrayList<Gate>();
- for(Gate actualGate : ((InteractionUse)element).getActualGates()) {
- if(actualGate.getName().startsWith(direction.getName())) {
- gates.add(actualGate);
- }
- }
- dialog.setElements(gates.toArray());
- if(dialog.open() == Window.OK) {
- gate = (Gate)dialog.getFirstResult();
- }
- } else {
- throw new IllegalArgumentException(WRONG_GATE_CONTAINER_TYPE_ERROR_MSG);
- }
-
- if(gate != null) {
- ElementInitializers.init_NamedElement(gate, direction.toString().toLowerCase() + "_"); //$NON-NLS-1$
- }
-
- return gate;
- }
-
- /**
- * Creates a message and manage the creation of a message from/to a CoRegion
- *
- * @param interaction
- * the interaction containing the message.
- * @param messageSort
- * the messageSort of the message, it can be null
- * @param source
- * the source of the message, it can be null
- * @param target
- * the target of the message, it can be null
- * @param params
- * a map of params. It must at least contain the source and target container;
- * @return the created message.
- */
- public static Message doCreateMessage(Interaction interaction, MessageSort messageSort, Element source, Element target, Map<Object, Object> params) {
- InteractionFragment sourceContainer = (InteractionFragment)params.get(SequenceRequestConstant.SOURCE_MODEL_CONTAINER);
- InteractionFragment targetContainer = (InteractionFragment)params.get(SequenceRequestConstant.TARGET_MODEL_CONTAINER);
-
- Lifeline lifeline = (Lifeline)params.get(SequenceRequestConstant.LIFELINE_GRAPHICAL_CONTAINER);
- if(lifeline != null) {
- if(source instanceof CombinedFragment) {
- CombinedFragment cf = (CombinedFragment)source;
-
- if(InteractionOperatorKind.PAR_LITERAL.equals(cf.getInteractionOperator())) {
- InteractionOperand interactionOperand = getCoRegionInteractionOperand(cf);
- sourceContainer = interactionOperand;
- targetContainer = interactionOperand;
- source = lifeline;
- if(target instanceof Lifeline) {
- addCoveredLifelineToCombinedFragment((Lifeline)target, cf);
- }
- }
- } else if(target instanceof CombinedFragment) {
- CombinedFragment cf = (CombinedFragment)target;
- if(InteractionOperatorKind.PAR_LITERAL.equals(cf.getInteractionOperator())) {
- InteractionOperand interactionOperand = getCoRegionInteractionOperand(cf);
- sourceContainer = interactionOperand;
- targetContainer = interactionOperand;
- target = lifeline;
- if(source instanceof Lifeline) {
- addCoveredLifelineToCombinedFragment((Lifeline)source, cf);
- }
- }
- }
- }
- return doCreateMessage(interaction, messageSort, source, target, sourceContainer, targetContainer);
- }
-
- private static void addCoveredLifelineToCombinedFragment(Lifeline coveredLifeline, CombinedFragment cf) {
- cf.getCovereds().add(coveredLifeline);
-
- for(InteractionOperand io : cf.getOperands()) {
- io.getCovereds().add(coveredLifeline);
- }
- }
-
- /**
- * Get the interactionOperand where the occurrenceSpecification will be created
- */
- public static InteractionOperand getCoRegionInteractionOperand(CombinedFragment cf) {
- InteractionOperand interactionOperand = null;
-
- // Search in the existing operands if there are any operand without fragments.
- for(InteractionOperand existingOperand : cf.getOperands()) {
- if(existingOperand.getFragments().isEmpty()) {
- interactionOperand = existingOperand;
- break;
- }
- }
-
- // If the operand is still null, we create a new operand in the combinedFragment.
- if(interactionOperand == null) {
- interactionOperand = createCoRegionInteractionOperand(cf);
- }
- return interactionOperand;
- }
-
- private static InteractionOperand createCoRegionInteractionOperand(CombinedFragment cf) {
- InteractionOperand interactionOperand = cf.createOperand("");
- interactionOperand.getCovereds().addAll(cf.getCovereds());
- interactionOperand.setName(ElementInitializers.getNextNumberedName(cf.getOperands(), interactionOperand.eClass().getName()));
- return interactionOperand;
- }
-
- /**
- * Create a message. It also creates its message end, their corresponding events and updates the signature of the message.
- *
- * @param container
- * the interaction containing the message.
- * @param messageSort
- * the messageSort of the message, it can be null
- * @param source
- * the source of the message, it can be null
- * @param target
- * the target of the message, it can be null
- * @return the created message
- */
- public static Message doCreateMessage(Interaction container, MessageSort messageSort, Element source, Element target, InteractionFragment sourceContainer, InteractionFragment targetContainer) {
- return doCreateMessage(container, messageSort, source, target, sourceContainer, targetContainer, null, null);
- }
-
- /**
- * Create a message. It also creates its message end (if not provided), their corresponding events and updates the signature of the message.
- *
- * @param container
- * the interaction containing the message.
- * @param messageSort
- * the messageSort of the message, it can be null
- * @param source
- * the source of the message, it can be null
- * @param target
- * the target of the message, it can be null
- * @param sendMessageEnd
- * the existing Send MessageEnd of the message
- * @param receiveMessageEnd
- * the existing Receive MessageEnd of the message
- * @return the created message
- */
- public static Message doCreateMessage(Interaction container, MessageSort messageSort, Element source, Element target, InteractionFragment sourceContainer, InteractionFragment targetContainer, MessageEnd sendMessageEnd, MessageEnd receiveMessageEnd) {
-
- List<NamedElement> signatures = getSignature(container.getModel(), source, target, messageSort);
-
- // If signatures == null, means the user click on cancel button during selection --> Cancel the whole process of creation
- if(signatures == null) {
- return null;
- }
-
- NamedElement signature = null;
- if(!signatures.isEmpty()) {
- signature = signatures.get(0);
- }
-
- // Get the correct MessageSort
- messageSort = getMessageSort(signature, messageSort);
-
- // Create the message
- Message message = doCreateMessage(container, messageSort, signature);
-
- // Create the two message ends
- if(sendMessageEnd == null && source != null) {
- sendMessageEnd = createMessageEnd(sourceContainer, EventHelper.doCreateSendEvent(messageSort, container, signature), source, MessageDirection.OUT);
- }
- if(receiveMessageEnd == null && target != null) {
- receiveMessageEnd = createMessageEnd(targetContainer, EventHelper.doCreateReceiveEvent(messageSort, container, signature), target, MessageDirection.IN);
- }
-
- // Update the messages end with the message
- if(sendMessageEnd != null) {
- sendMessageEnd.setMessage(message);
- ElementInitializers.init_NamedElement(sendMessageEnd, "", message.getName(), "Send"); //$NON-NLS-1$ //$NON-NLS-2$
- // Update the message with the messages end
- message.setSendEvent(sendMessageEnd);
- }
- if(receiveMessageEnd != null) {
- receiveMessageEnd.setMessage(message);
- ElementInitializers.init_NamedElement(receiveMessageEnd, "", message.getName(), "Recv"); //$NON-NLS-1$ //$NON-NLS-2$
- // Update the message with the messages end
- message.setReceiveEvent(receiveMessageEnd);
- }
-
- return message;
- }
-
-
- /**
- * Get the messageSort of a message if it doesn't exist yet depending of the messageSignature.
- * If no messageSort exists, and if the signature is null, then return a MessageSort.ASYNCH_CALL_LITERAL
- *
- * @param signature
- * the signature of the message or null
- * @param messageSort
- * a messageSort or null
- * @return the messageSort
- */
- private static MessageSort getMessageSort(NamedElement signature, MessageSort messageSort) {
- if(messageSort == null) {
- if(signature instanceof Signal) {
- return MessageSort.ASYNCH_SIGNAL_LITERAL;
- } else {
- return MessageSort.ASYNCH_CALL_LITERAL;
- }
- }
- return messageSort;
- }
-
- /**
- * A method to validate that both source and target of a request have valid container for the creation of a message.
- *
- * @param request
- * the request
- * @return false if the container of the source or the target is null and if the two container are not equals
- */
- public static boolean hasValidContainer(IEditCommandRequest request) {
- Object srcEndContainer = request.getParameter(SequenceRequestConstant.SOURCE_MODEL_CONTAINER);
- Object tgtEndContainer = request.getParameter(SequenceRequestConstant.TARGET_MODEL_CONTAINER);
- if(srcEndContainer == null || tgtEndContainer == null) {
- return false;
- }
-
- /*
- * Message cannot cross InteractionFragment.
- * Either the two message ends are contained into the same InteractionFragment,
- * or one is a gate and the other is in the InteractionFragment containing the gate's CF,
- * or one is a gate and the other is a gate in a CF containing the first gate's CF.
- */
- // into the same InteractionFragment
- if(srcEndContainer.equals(tgtEndContainer)) {
- return true;
- }
- // one is a gate
- if(request instanceof CreateRelationshipRequest) {
- EObject src = ((CreateRelationshipRequest)request).getSource();
- EObject tgt = ((CreateRelationshipRequest)request).getTarget();
- if(!(src instanceof Lifeline)) {
- // send is a gate
- if(src instanceof InteractionOperand) {
- // consider the containing CF
- src = src.eContainer();
- }
- if(src instanceof InteractionFragment) {
- // check whether container of gate is in the target's fragment container
- if(tgtEndContainer instanceof Interaction) {
- if(((Interaction)tgtEndContainer).getFragments().contains(src)) {
- return true;
- }
- }
- if(tgtEndContainer instanceof InteractionOperand) {
- if(((InteractionOperand)tgtEndContainer).getFragments().contains(src)) {
- return true;
- }
- }
- }
- }
- if(!(tgt instanceof Lifeline)) {
- // receive is a gate
- if(tgt instanceof InteractionOperand) {
- // consider the containing CF
- tgt = tgt.eContainer();
- }
- if(tgt instanceof InteractionFragment) {
- // check whether container of gate is in the source's fragment container
- if(srcEndContainer instanceof Interaction && ((Interaction)srcEndContainer).getFragments().contains(tgt)) {
- return true;
- }
- if(srcEndContainer instanceof InteractionOperand && ((InteractionOperand)srcEndContainer).getFragments().contains(tgt)) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/DestructionOccurrenceUtil.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/DestructionOccurrenceUtil.java
deleted file mode 100644
index 0cc381e0c1a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/DestructionOccurrenceUtil.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageSort;
-
-
-public class DestructionOccurrenceUtil {
- public static void reorderDestructionOccurrence(List<InteractionFragment> reorderedFragments) {
- int size = reorderedFragments.size();
- List<InteractionFragment> destructionOccurrenceList = new ArrayList<InteractionFragment>(size);
- for(int i = 0; i < size; i++) {
- InteractionFragment o = reorderedFragments.get(i);
- if(o instanceof DestructionOccurrenceSpecification){
- destructionOccurrenceList.add(o);
- }
- }
-
- reorderedFragments.removeAll(destructionOccurrenceList);
- reorderedFragments.addAll(destructionOccurrenceList);
- }
-
- public static void constraintDestructionOccurrence(Message mess, List<InteractionFragment> constraint) {
- if(mess.getMessageSort() != MessageSort.DELETE_MESSAGE_LITERAL)
- return;
- addDestructionOccurrenceConstraint(mess.getReceiveEvent(), constraint);
- addDestructionOccurrenceConstraint(mess.getSendEvent(), constraint);
- }
-
- public static void addDestructionOccurrenceConstraint(MessageEnd end, List<InteractionFragment> constraint) {
- if(end instanceof InteractionFragment){
- InteractionFragment frag = (InteractionFragment) end;
- if(frag.getCovereds().size() > 0){
- Lifeline lifeline = ((InteractionFragment)frag).getCovereds().get(0);
- DestructionOccurrenceSpecification d = findDestructionOccurrence(lifeline);
- if(d != null)
- constraint.add(d);
- }
- }
- }
-
- public static DestructionOccurrenceSpecification findDestructionOccurrence(Lifeline lifeline) {
- EList<InteractionFragment> list = lifeline.getCoveredBys();
- for(InteractionFragment f : list)
- if(f instanceof DestructionOccurrenceSpecification){
- return (DestructionOccurrenceSpecification)f;
- }
-
- return null;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/EventHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/EventHelper.java
deleted file mode 100644
index b84370f89f1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/EventHelper.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.CallEvent;
-import org.eclipse.uml2.uml.Event;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.MessageSort;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * An utility class to create event elements.
- *
- */
-public class EventHelper {
-
- /**
- * Create an event
- *
- * @param eventContainer
- * the container
- * @return the event
- */
- public static Event doCreateEvent(Package eventContainer, EClass eClass) {
- Event event = (Event)eventContainer.createPackagedElement(null, eClass);
- ElementInitializers.init_NamedElement(event);
- return event;
- }
-
- /**
- * Create an event
- *
- * @param eventContainer
- * the container
- * @return the event
- */
- public static CallEvent doCreateCallEvent(Package eventContainer, Operation operation) {
- CallEvent event = (CallEvent)doCreateEvent(eventContainer, UMLPackage.eINSTANCE.getCallEvent());
- event.setOperation(operation);
- return event;
- }
-
-
- /**
- * Create a SendOperation event and initializes its name
- *
- * @param eventContainer
- * the container
- * @param operation
- * the operation of the event. Can't be null
- * @return the sendOperation event
- */
- // Does not exist anymore in UML 2.4
- // public static SendOperationEvent doCreateSendOperationEvent(Package eventContainer, Operation operation) {
- // SendOperationEvent sendOperationEvent = (SendOperationEvent)doCreateEvent(eventContainer, UMLPackage.eINSTANCE.getSendOperationEvent());
- // sendOperationEvent.setOperation(operation);
- // return sendOperationEvent;
- // }
-
- /**
- * Create a ReceiveOperation event and initializes its name
- *
- * @param eventContainer
- * the container
- * @param operation
- * the operation of the event. Can't be null
- * @return the receiveOperation event
- */
- // Does not exist anymore in UML 2.4
- // public static ReceiveOperationEvent doCreateReceiveOperationEvent(Package eventContainer, Operation operation) {
- // ReceiveOperationEvent receiveOperationEvent = (ReceiveOperationEvent)doCreateEvent(eventContainer, UMLPackage.eINSTANCE.getReceiveOperationEvent());
- // receiveOperationEvent.setOperation(operation);
- // return receiveOperationEvent;
- // }
-
- /**
- * Create a send signal event and initializes its name
- *
- * @param eventContainer
- * the container
- * @param signal
- * the signal of the event. Can't be null
- * @return the send signal event
- */
- // Does not exist anymore in UML 2.4
- // public static SendSignalEvent doCreateSendSignalEvent(Package eventContainer, Signal signal) {
- // SendSignalEvent sendSignalEvent = (SendSignalEvent)doCreateEvent(eventContainer, UMLPackage.eINSTANCE.getSendSignalEvent());
- // sendSignalEvent.setSignal(signal);
- // return sendSignalEvent;
- // }
-
- /**
- * Create a ReceiveSignal event and initializes its name
- *
- * @param eventContainer
- * the container
- * @param signal
- * the signal of the event. Can't be null
- * @return the ReceiveSignal event
- */
- // Does not exist anymore in UML 2.4
- // public static ReceiveSignalEvent doCreateReceiveSignalEvent(Package eventContainer, Signal signal) {
- // ReceiveSignalEvent receiveSignalEvent = (ReceiveSignalEvent)doCreateEvent(eventContainer, UMLPackage.eINSTANCE.getReceiveSignalEvent());
- // receiveSignalEvent.setSignal(signal);
- // return receiveSignalEvent;
- // }
-
- // Does not exist anymore in UML 2.4
- // /**
- // * Create a receive signal event
- // *
- // * @param eventContainer
- // * the container
- // * @return the receive signal event
- // */
- // public static CreationEvent doCreateCreationEvent(Package eventContainer) {
- // return (CreationEvent)doCreateEvent(eventContainer, UMLPackage.eINSTANCE.getCreationEvent());
- // }
- //
- // /**
- // * Create a destruction event
- // *
- // * @param eventContainer
- // * the container
- // * @return the destruction event
- // */
- // public static DestructionEvent doCreateDestructionEvent(Package eventContainer) {
- // return (DestructionEvent)doCreateEvent(eventContainer, UMLPackage.eINSTANCE.getDestructionEvent());
- // }
- //
- // /**
- // * Create an execution event
- // *
- // * @param eventContainer
- // * the container
- // * @return the executionEvent
- // */
- // public static ExecutionEvent doCreateExecutionEvent(Package eventContainer) {
- // return (ExecutionEvent)doCreateEvent(eventContainer, UMLPackage.eINSTANCE.getExecutionEvent());
- // }
-
-
- /**
- * Create a receive event in the package containing the interaction
- * If the messageSort is ASYNCH_SIGNAL, it creates a ReceiveSignalEvent
- * If the messageSort is ASYNCH_CALL or SYNCH_CALL or REPLY_LITERAL, it creates a ReceiveOperationEvent
- * If the messageSort is CREATE_MESSAGE, it creates a CreationEvent.
- * If the messageSort is DELETE_MESSAGE, it creates a DestructionEvent.
- *
- * @param messageSort
- * the messageSort
- * @param interaction
- * the interaction
- * @param signature
- * the signature of the message
- * @return the created receive event or null
- */
- public static Event doCreateReceiveEvent(MessageSort messageSort, Interaction interaction, NamedElement signature) {
- Package eventContainer = interaction.getNearestPackage();
- Event event = null;
-
- switch(messageSort) {
- case ASYNCH_SIGNAL_LITERAL:
- //event = doCreateReceiveSignalEvent(eventContainer, (Signal)signature);
- break;
- case ASYNCH_CALL_LITERAL:
- case SYNCH_CALL_LITERAL:
- case REPLY_LITERAL:
- //event = doCreateReceiveOperationEvent(eventContainer, (Operation)signature);
- break;
- case CREATE_MESSAGE_LITERAL:
- //event = doCreateCreationEvent(eventContainer);
- break;
- case DELETE_MESSAGE_LITERAL:
- //event = doCreateDestructionEvent(eventContainer);
- break;
- default:
- break;
-
- }
- return event;
- }
-
- /**
- * Create a sending event in the package containing the interaction.
- * If the messageSort is ASYNCH_SIGNAL, CREATE_MESSAGE, DELETE_MESSAGE, it creates a SendSignalEvent
- * If the messageSort is ASYNCH_CALL, SYNCH_CALL, REPLY_LITERAL, it creates a SendOperationEvent.
- *
- * @param messageSort
- * the messageSort
- * @param interaction
- * the interaction
- * @param signature
- * the signature of the message
- * @return the created send event or null
- */
- public static Event doCreateSendEvent(MessageSort messageSort, Interaction interaction, NamedElement signature) {
- Package eventContainer = interaction.getNearestPackage();
- Event event = null;
- switch(messageSort) {
- case ASYNCH_SIGNAL_LITERAL:
- case CREATE_MESSAGE_LITERAL:
- case DELETE_MESSAGE_LITERAL:
- //event = doCreateSendSignalEvent(eventContainer, (Signal)signature);
- break;
- case ASYNCH_CALL_LITERAL:
- case SYNCH_CALL_LITERAL:
- case REPLY_LITERAL:
- //event = doCreateSendOperationEvent(eventContainer, (Operation)signature);
- break;
- default:
- break;
-
- }
- return event;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/HighlightUtil.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/HighlightUtil.java
deleted file mode 100644
index ccde9d88e8e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/HighlightUtil.java
+++ /dev/null
@@ -1,272 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.LineBorder;
-import org.eclipse.draw2d.Polyline;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.swt.graphics.Color;
-
-
-public class HighlightUtil {
-
- private static class FigureState {
-
- private Color bgColor;
-
- private Color fgColor;
-
- private int lineWidth;
-
- public FigureState(Color bgColor, Color fgColor, int lineWidth) {
- this.bgColor = bgColor;
- this.fgColor = fgColor;
- this.lineWidth = lineWidth;
- }
- }
-
- public static final Color COVER_COLOR = ColorConstants.cyan;
-
- public static final Color TARGET_COLOR = ColorConstants.cyan;
-
- public static final Color SOURCE_COLOR = ColorConstants.cyan;
-
- static Map<LifelineEditPart, Rectangle> lifelines;
-
- static List<LifelineEditPart> highlightLifelines = new ArrayList<LifelineEditPart>();
-
- static Map<EditPart, FigureState> feedbackStates = new HashMap<EditPart, HighlightUtil.FigureState>();
-
- public static Map<LifelineEditPart, Rectangle> collectAllLifelines(EditPart part) {
- Map<LifelineEditPart, Rectangle> lifelines = new HashMap<LifelineEditPart, Rectangle>();
- Set<Entry<Object, EditPart>> allEditPartEntries = part.getViewer().getEditPartRegistry().entrySet();
- for(Entry<Object, EditPart> epEntry : allEditPartEntries) {
- EditPart ep = epEntry.getValue();
- if(!(ep instanceof LifelineEditPart))
- continue;
-
- LifelineEditPart lp = (LifelineEditPart)ep;
- IFigure figure = lp.getFigure();
- Rectangle childBounds = figure.getBounds().getCopy();
- figure.translateToAbsolute(childBounds);
- Rectangle centralLineBounds = new Rectangle(childBounds.x() + childBounds.width() / 2, childBounds.y(), 1, childBounds.height());
-
- lifelines.put(lp, centralLineBounds);
- }
- return lifelines;
- }
-
- public static void eraseSizeOnDropFeedback(Request request, EditPart host) {
- for(LifelineEditPart lp : highlightLifelines) {
- FigureState s = feedbackStates.get(lp);
- if(s == null)
- continue;
-
- RectangleFigure rect = lp.getPrimaryShape().getFigureLifelineNameContainerFigure();
- rect.setBackgroundColor(s.bgColor);
- rect.setFill(true);
- }
-
- lifelines = null;
- highlightLifelines = new ArrayList<LifelineEditPart>();
- }
-
- public static void showSizeOnDropFeedback(CreateRequest request, EditPart host, IFigure feedback, Rectangle bounds) {
- if(lifelines == null) {
- lifelines = collectAllLifelines(host);
- highlightLifelines = new ArrayList<LifelineEditPart>();
- }
-
- List<LifelineEditPart> addLifelines = new ArrayList<LifelineEditPart>();
- List<LifelineEditPart> removeLifelines = new ArrayList<LifelineEditPart>();
-
- Iterator<Entry<LifelineEditPart, Rectangle>> it = lifelines.entrySet().iterator();
- while(it.hasNext()) {
- Entry<LifelineEditPart, Rectangle> en = it.next();
-
- if(bounds.intersects(en.getValue())) {
- if(!highlightLifelines.contains(en.getKey()))
- addLifelines.add(en.getKey());
- } else {
- if(highlightLifelines.contains(en.getKey()))
- removeLifelines.add(en.getKey());
- }
- }
-
- highlightLifelines.removeAll(removeLifelines);
- highlightLifelines.addAll(addLifelines);
-
- // highlight lifeline inside
- for(LifelineEditPart lp : addLifelines) {
- RectangleFigure rect = lp.getPrimaryShape().getFigureLifelineNameContainerFigure();
- feedbackStates.put(lp, new FigureState(rect.getBackgroundColor(), rect.getForegroundColor(), rect.getLineWidth()));
- rect.setBackgroundColor(COVER_COLOR);
- rect.setFill(true);
- }
-
- // restore lifeline outside
- for(LifelineEditPart lp : removeLifelines) {
- FigureState s = feedbackStates.get(lp);
- if(s == null)
- continue;
-
- RectangleFigure rect = lp.getPrimaryShape().getFigureLifelineNameContainerFigure();
- rect.setBackgroundColor(s.bgColor);
- rect.setFill(true);
- }
- }
-
- private Map<Object, FigureState> figureState = new HashMap<Object, FigureState>();
-
- /**
- * Maybe this value can be managed by preferences.
- */
- private Color getHighlightBackground() {
- return null;
- }
-
- /**
- * Maybe this value can be managed by preferences.
- */
- private int getHighlightBorderWidth() {
- return 2;
- }
-
- private List<IFigure> getHighlightFigures(EditPart host) {
- List<IFigure> figures = new ArrayList<IFigure>();
- if(host instanceof LifelineEditPart) {
- LifelineEditPart part = (LifelineEditPart)host;
- figures.add(part.getPrimaryShape().getFigureLifelineNameContainerFigure());
- figures.add(part.getPrimaryShape().getFigureLifelineDotLineFigure());
- } else if(host instanceof AbstractExecutionSpecificationEditPart) {
- figures.add(((AbstractExecutionSpecificationEditPart)host).getPrimaryShape());
- } else if(host instanceof CombinedFragmentEditPart) {
- figures.add(((CombinedFragmentEditPart)host).getPrimaryShape());
- } else if(host instanceof InteractionOperandEditPart) {
- InteractionOperandEditPart op = (InteractionOperandEditPart)host;
- CombinedFragmentEditPart cep = (CombinedFragmentEditPart)op.getParent().getParent();
- figures.add(cep.getPrimaryShape());
- } else if(host instanceof CommentEditPart) {
- figures.add(((CommentEditPart)host).getPrimaryShape());
- } else if(host instanceof ConstraintEditPart) {
- figures.add(((ConstraintEditPart)host).getPrimaryShape());
- } else if(host instanceof IPapyrusEditPart) {
- figures.add(((IPapyrusEditPart)host).getPrimaryShape());
- }
- return figures;
- }
-
- /**
- * Maybe this value can be managed by preferences.
- */
- private Color getHighlightForeground() {
- return null;
- }
-
- public void highlight(EditPart host) {
- List<IFigure> highlightFigures = getHighlightFigures(host);
- if(highlightFigures.isEmpty()) {
- return;
- }
-
- Color background = getHighlightBackground();
- Color foreground = getHighlightForeground();
- int lineWidth = getHighlightBorderWidth();
- for(IFigure figure : highlightFigures) {
- saveIfNotExist(figure, figure);
- updateFigure(figure, background, foreground, lineWidth);
- }
- }
-
- protected void saveIfNotExist(Object host, IFigure fig) {
- if(!figureState.containsKey(host)) {
- int lineWidth = 1;
- Border border = fig.getBorder();
- if(border instanceof LineBorder) {
- lineWidth = ((LineBorder)border).getWidth();
- } else if(fig instanceof Shape) {
- lineWidth = ((Shape)fig).getLineWidth();
- }
- figureState.put(host, new FigureState(fig.getBackgroundColor(), fig.getForegroundColor(), lineWidth));
- }
- }
-
- public void unhighlight() {
- if(figureState == null || figureState.isEmpty()) {
- return;
- }
- Set<Entry<Object, FigureState>> entrySet = figureState.entrySet();
- for(Entry<Object, FigureState> entry : entrySet) {
- Object key = entry.getKey();
- FigureState value = entry.getValue();
- if(key instanceof IFigure) {
- IFigure fig = (IFigure)key;
- updateFigure(fig, value.bgColor, value.fgColor, value.lineWidth);
- } else if(key instanceof EditPart) {
- List<IFigure> figures = getHighlightFigures((EditPart)key);
- for(IFigure fig : figures) {
- updateFigure(fig, value.bgColor, value.fgColor, value.lineWidth);
- }
- }
- }
- figureState.clear();
- }
-
- public void unhighlight(EditPart host) {
- List<IFigure> highlightFigures = getHighlightFigures(host);
- if(highlightFigures.isEmpty()) {
- return;
- }
- for(IFigure figure : highlightFigures) {
- FigureState s = figureState.remove(figure);
- if(s == null) {
- continue;
- }
- updateFigure(figure, s.bgColor, s.fgColor, s.lineWidth);
- }
- }
-
- private void updateFigure(IFigure fig, Color bgColor, Color fgColor, int lineWidth) {
- if(fig == null) {
- return;
- }
- if(lineWidth > 0) {
- Border border = fig.getBorder();
- if(border != null && border instanceof LineBorder) {
- ((LineBorder)border).setWidth(lineWidth);
- } else if(fig instanceof Shape) {
- ((Shape)fig).setLineWidth(lineWidth);
- } else if(fig instanceof Polyline) {
- ((Polyline)fig).setLineWidth(lineWidth);
- }
- }
- if(bgColor != null) {
- fig.setBackgroundColor(bgColor);
- }
- if(fgColor != null) {
- fig.setForegroundColor(fgColor);
- }
- fig.repaint();
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperatorKindCompatibleMapping.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperatorKindCompatibleMapping.java
deleted file mode 100644
index 859b6776e16..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionOperatorKindCompatibleMapping.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.uml2.uml.InteractionOperatorKind;
-
-public class InteractionOperatorKindCompatibleMapping {
- /**
- * Set the true if the kind of InteractionOperator supports multi operand
- */
- private static final Map<InteractionOperatorKind, Boolean> map = new HashMap<InteractionOperatorKind, Boolean>();
-
- static {
- map.put(InteractionOperatorKind.SEQ_LITERAL, true);
- map.put(InteractionOperatorKind.ALT_LITERAL, true);
- map.put(InteractionOperatorKind.OPT_LITERAL, false);
- map.put(InteractionOperatorKind.BREAK_LITERAL, false);
- map.put(InteractionOperatorKind.PAR_LITERAL, true);
- map.put(InteractionOperatorKind.STRICT_LITERAL, true);
- map.put(InteractionOperatorKind.LOOP_LITERAL, false);
- map.put(InteractionOperatorKind.CRITICAL_LITERAL, true);
- map.put(InteractionOperatorKind.NEG_LITERAL, false);
- map.put(InteractionOperatorKind.ASSERT_LITERAL, true);
- map.put(InteractionOperatorKind.IGNORE_LITERAL, true);
- map.put(InteractionOperatorKind.CONSIDER_LITERAL, true);
- }
-
- /**
- * Check if the InteractionOperator supports multi operand
- *
- * @param kind
- * @return
- */
- public static boolean supportMultiOperand(InteractionOperatorKind kind) {
- Boolean multiOperandSupport = map.get(kind);
- return multiOperandSupport == null ? false : multiOperandSupport;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionUseUtil.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionUseUtil.java
deleted file mode 100644
index 44278c7d059..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/InteractionUseUtil.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
-import org.eclipse.uml2.uml.Interaction;
-
-
-public class InteractionUseUtil {
-
- public static Diagram findDiagram(View view, Interaction refInteraction) {
- Diagram diagram = view.getDiagram();
- EList<EObject> list = diagram.eResource().getContents();
- for(EObject o : list) {
- if(o instanceof Diagram) {
- Diagram ref = (Diagram)o;
- if(refInteraction.equals(ref.getElement())) {
- return ref;
- }
- }
- }
-
- return null;
- }
-
- public static void openDiagram(Diagram diag) {
- IPageManager pageMngr;
- try {
- pageMngr = ServiceUtilsForEObject.getInstance().getIPageManager(diag);
- } catch (Exception e) {
- return;
- }
- if(pageMngr != null) {
- if(pageMngr.allPages().contains(diag)) {
- /**
- * Close the diagram if it was already open
- */
- if(pageMngr.isOpen(diag)) {
- pageMngr.selectPage(diag);
- } else {
- pageMngr.openPage(diag);
- }
- }
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineCoveredByUpdater.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineCoveredByUpdater.java
deleted file mode 100644
index 98a310bc186..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineCoveredByUpdater.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * This class updates the property CoveredBy of Lifeline when a Lifeline gets created, moved/resize and also the resize of moving of each CombinedFragment
- *
- * @author yyang
- *
- */
-public class LifelineCoveredByUpdater {
- protected GraphicalEditPart context;
- protected Map<LifelineEditPart, Rectangle> lifelines = new HashMap<LifelineEditPart, Rectangle>();
- protected HashMap<InteractionFragmentEditPart, Rectangle> interactionFragments = new HashMap<InteractionFragmentEditPart, Rectangle>();
-
- protected List<InteractionFragment> coveredByLifelinesToAdd = new ArrayList<InteractionFragment>();
- protected List<InteractionFragment> coveredByLifelinesToRemove = new ArrayList<InteractionFragment>();
-
- protected TransactionalEditingDomain editingDomain;
-
- public LifelineCoveredByUpdater() {
- }
-
- protected void init() {
- editingDomain = this.context.getEditingDomain();
- GraphicalEditPart parent = context;
- while (true) {
- EditPart editPart = parent.getParent();
- if (editPart instanceof GraphicalEditPart) {
- parent = (GraphicalEditPart) editPart;
- } else {
- break;
- }
- }
- childrenCollect(parent);
- }
-
- private void childrenCollect(GraphicalEditPart editPart) {
- if (editPart instanceof LifelineEditPart) {
- IFigure figure = editPart.getFigure();
- Rectangle childBounds = figure.getBounds().getCopy();
- figure.translateToAbsolute(childBounds);
- Rectangle centralLineBounds = new Rectangle(
- childBounds.x() + childBounds.width() / 2,
- childBounds.y(), 1, childBounds.height());
-
- lifelines.put((LifelineEditPart)editPart, centralLineBounds);
- }
- if (editPart instanceof InteractionFragmentEditPart) {
- IFigure figure = editPart.getFigure();
- Rectangle childBounds = figure.getBounds().getCopy();
- figure.translateToAbsolute(childBounds);
- interactionFragments.put((InteractionFragmentEditPart)editPart, childBounds);
- }
- for (Object child : editPart.getChildren()) {
- if (child instanceof GraphicalEditPart) {
- childrenCollect((GraphicalEditPart)child);
- }
- }
- }
-
- public void update(GraphicalEditPart context) {
- this.context = context;
- this.init();
-
- for (Map.Entry<LifelineEditPart, Rectangle> entry : lifelines.entrySet()) {
- LifelineEditPart editPart = entry.getKey();
- Rectangle childBounds = entry.getValue();
- updateLifeline(editPart, childBounds);
- }
- }
-
- public void updateLifeline(LifelineEditPart lifelineEditpart, Rectangle rect) {
- Lifeline lifeline = (Lifeline) lifelineEditpart.resolveSemanticElement();
- EList<InteractionFragment> coveredByLifelines = lifeline
- .getCoveredBys();
-
- coveredByLifelinesToAdd.clear();
- coveredByLifelinesToRemove.clear();
-
- for (Map.Entry<InteractionFragmentEditPart, Rectangle> entry : interactionFragments.entrySet()) {
- InteractionFragmentEditPart editPart = entry.getKey();
- Rectangle childBounds = entry.getValue();
- InteractionFragment interactionFragment = (InteractionFragment) editPart
- .resolveSemanticElement();
- if (rect.intersects(childBounds)) {
- if (!coveredByLifelines.contains(interactionFragment)) {
- coveredByLifelinesToAdd.add(interactionFragment);
- }
- } else if (coveredByLifelines.contains(interactionFragment)) {
- coveredByLifelinesToRemove.add(interactionFragment);
- }
- }
-
- if (!coveredByLifelinesToAdd.isEmpty()) {
- CommandHelper.executeCommandWithoutHistory(editingDomain,
- AddCommand.create(editingDomain, lifeline,
- UMLPackage.eINSTANCE.getLifeline_CoveredBy(),
- coveredByLifelinesToAdd), true);
- }
- if (!coveredByLifelinesToRemove.isEmpty()) {
- CommandHelper.executeCommandWithoutHistory(editingDomain,
- RemoveCommand.create(editingDomain, lifeline,
- UMLPackage.eINSTANCE.getLifeline_CoveredBy(),
- coveredByLifelinesToRemove), true);
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineLabelHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineLabelHelper.java
deleted file mode 100644
index f2910a79850..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineLabelHelper.java
+++ /dev/null
@@ -1,170 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.StereotypedElementLabelHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.preferences.LifelinePreferencePage;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Type;
-
-
-public class LifelineLabelHelper extends StereotypedElementLabelHelper {
-
- /**
- * singelton instance
- */
- private static LifelineLabelHelper labelHelper;
-
- /**
- * Returns the singleton instance of this class
- *
- * @return the singleton instance.
- */
- public static LifelineLabelHelper getInstance() {
- if(labelHelper == null) {
- labelHelper = new LifelineLabelHelper();
- }
- return labelHelper;
- }
-
- /** Map for masks */
- protected final Map<Integer, String> masks = new HashMap<Integer, String>(7);
-
- /**
- * Creates a new Operation label helper.
- */
- protected LifelineLabelHelper() {
- // initialize the map
- masks.put(LifelinePreferencePage.SHOW_REPRESENT_NAME, "Show represent name");
- masks.put(LifelinePreferencePage.SHOW_REPRESENT_TYPE, "Show represent type");
- masks.put(LifelinePreferencePage.SHOW_UNDEFINED_TYPE, "Always show undefined type");
- masks.put(LifelinePreferencePage.SHOW_LIFELINE_NAME, "Always show lifeline name");
- }
-
-
- /**
- * Returns the mask name given the value of the mask
- *
- * @return the mask name or <code>null</code> if no masks has been found
- */
- public String getMaskLabel(int value) {
- return masks.get(value);
- }
-
- /**
- * Returns the collection of mask names
- *
- * @return the collection of mask names
- */
- public Collection<String> getMaskLabels() {
- return masks.values();
- }
-
- /**
- * Returns the map of masks used to display
- *
- * @return the map of masks used to display
- */
- public Map<Integer, String> getMasks() {
- return masks;
- }
-
- /**
- * Returns the collection of mask values
- *
- * @return the collection of mask values
- */
- public Set<Integer> getMaskValues() {
- return masks.keySet();
- }
-
- /**
- * {@inheritDoc}
- */
- public Lifeline getUMLElement(GraphicalEditPart editPart) {
- return (Lifeline)((View)editPart.getModel()).getElement();
- }
-
- protected String elementLabel(GraphicalEditPart editPart) {
- if(editPart instanceof LifelineNameEditPart)
- editPart = (GraphicalEditPart)editPart.getParent();
- int displayValue = LifelinePreferencePage.DEFAULT_LABEL_DISPLAY;
-
- IMaskManagedLabelEditPolicy policy = (IMaskManagedLabelEditPolicy)editPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(policy != null) {
- displayValue = policy.getCurrentDisplayValue();
- }
- return getCustomLabel(getUMLElement(editPart), displayValue);
- }
-
- private static final String UNAMED = "<Unnamed>";
- private static final String UNDEFINED = "<Undefined>";
-
- //https://bugs.eclipse.org/bugs/show_bug.cgi?id=383722
- private String getCustomLabel(Lifeline lifeline, int displayValue) {
- StringBuilder sb = new StringBuilder();
- appendName(lifeline, displayValue, sb);
- boolean displayType = isCheck(displayValue , LifelinePreferencePage.SHOW_REPRESENT_TYPE );
- if( lifeline.getRepresents() == null || isCheck(displayValue , LifelinePreferencePage.SHOW_LIFELINE_NAME ) ){
- displayType = false;
- }
- if(displayType){
- // handle represent type label
- appendType(lifeline, displayValue, sb);
- }
- return sb.toString();
- }
-
-
- protected void appendName(Lifeline lifeline, int displayValue, StringBuilder sb) {
- ConnectableElement element = lifeline.getRepresents();
- String lifelineName = lifeline.getName();
- if( element == null || isCheck(displayValue , LifelinePreferencePage.SHOW_LIFELINE_NAME ) ){
- appendString(sb, lifelineName, UNAMED);
- return;
- }else{
- // represents is not null
- if(isCheck(displayValue , LifelinePreferencePage.SHOW_REPRESENT_NAME )){
- appendString(sb, element.getName(), UNAMED);
- }
- // if neither <1> or <2> are checked, show lifeline name (or <unnamed> when the lifeline has no name)
- else if(!isCheck(displayValue , LifelinePreferencePage.SHOW_REPRESENT_TYPE ))
- appendString(sb, lifelineName, UNAMED);
- }
- }
-
- protected void appendType(Lifeline lifeline, int displayValue, StringBuilder sb) {
- ConnectableElement element = lifeline.getRepresents();
- if(element == null)
- return;
-
- Type type = element.getType();
- if(isCheck(displayValue , LifelinePreferencePage.SHOW_REPRESENT_TYPE )){
- if(type == null ){
- if(isCheck(displayValue , LifelinePreferencePage.SHOW_UNDEFINED_TYPE ))
- sb.append(":").append(UNDEFINED);
- }else{
- appendString(sb.append(":") , type.getName(), UNAMED);
- }
- }
- }
-
- private static boolean isCheck(int value, int mask){
- return (value & mask) != 0;
- }
-
- private void appendString(StringBuilder sb, String str, String defaultValue) {
- if(str != null)
- sb.append(str);
- else
- sb.append(defaultValue);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageCreateHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageCreateHelper.java
deleted file mode 100644
index e28f20055ff..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineMessageCreateHelper.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-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.Rectangle;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.DropRequest;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ComponentEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.impl.ShapeImpl;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.anchors.LifelineAnchor;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-
-public class LifelineMessageCreateHelper {
-
- public static class ComponentEditPolicyEx extends ComponentEditPolicy {
-
- @Override
- protected Command createDeleteViewCommand(GroupRequest deleteRequest) {
- Command command = super.createDeleteViewCommand(deleteRequest);
- if(command != null && getHost() instanceof LifelineEditPart)
- command = restoreLifelineOnDelete(command, (LifelineEditPart)getHost());
- return command;
- }
- }
-
- public static ConnectionAnchor getCreateMessageAnchor(LifelineEditPart part, Request request, Point location) {
- IFigure fig = part.getPrimaryShape().getFigureLifelineNameContainerFigure();
- fig.translateToRelative(location);
- if(fig.containsPoint(location)) {// move to header
- return new LifelineAnchor(part.getPrimaryShape().getFigureLifelineNameContainerFigure());
- }
- // move to dash line
- return getTargetConnectionAnchor(part, request);
- }
-
- static ConnectionAnchor getTargetConnectionAnchor(LifelineEditPart part, Request request) {
- if (request instanceof ReconnectRequest) {
- if (((DropRequest) request).getLocation() == null) {
- return part.getNodeFigure().getTargetConnectionAnchorAt(null);
- }
- Point pt = ((DropRequest) request).getLocation().getCopy();
- return part.getNodeFigure().getTargetConnectionAnchorAt(pt);
- }
- else if (request instanceof DropRequest){
- return part.getNodeFigure().getTargetConnectionAnchorAt(
- ((DropRequest) request).getLocation());
- }
- return part.getNodeFigure().getTargetConnectionAnchorAt(null);
- }
-
- //when a create message is deleted, move its target lifelines up
- public static Command restoreLifelineOnMessageDelete(Command commands, EditPart editPart){
- if(editPart instanceof Message4EditPart) {
- Message4EditPart part = (Message4EditPart)editPart;
- if(part.getTarget() instanceof LifelineEditPart && LifelineMessageCreateHelper.getIncomingMessageCreate(part.getTarget()).size() == 1){
- LifelineEditPart target = (LifelineEditPart)part.getTarget();
- if(target.getModel() instanceof Shape){
- Shape view = (ShapeImpl) target.getModel();
- if(view.getLayoutConstraint() instanceof Bounds){
- Bounds bounds = (Bounds) view.getLayoutConstraint();
- ICommand boundsCommand = new SetBoundsCommand(
- target.getEditingDomain(),
- DiagramUIMessages.SetLocationCommand_Label_Resize,
- new EObjectAdapter(view), new Point(bounds.getX(),SequenceUtil.LIFELINE_VERTICAL_OFFSET));
- commands = commands.chain(new ICommandProxy(boundsCommand));
- int dy = SequenceUtil.LIFELINE_VERTICAL_OFFSET - bounds.getY();
- commands = moveCascadeLifeline(target, commands, dy);
- }
- }
- }
- }
- return commands;
- }
-
- // when a lifleine is deleted, move its created lifelines up
- public static Command restoreLifelineOnDelete(Command command, LifelineEditPart part) {
- List list = part.getSourceConnections();
- if(list != null && list.size() > 0) {
- for(Object l : list)
- if(l instanceof Message4EditPart) {
- EditPart target = ((Message4EditPart)l).getTarget();
- if(target instanceof LifelineEditPart && getIncomingMessageCreate(target).size() == 1) {
- LifelineEditPart lp = (LifelineEditPart)target;
- Rectangle bounds = lp.getPrimaryShape().getBounds();
- Point location = new Point(bounds.x, SequenceUtil.LIFELINE_VERTICAL_OFFSET);
- int dy = location.y - bounds.y;
- ICommand boundsCommand = new SetBoundsCommand(lp.getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize, new EObjectAdapter(lp.getNotationView()), location);
- command = command.chain(new ICommandProxy(boundsCommand));
- command = moveCascadeLifeline(lp, command, dy);
- }
- }
- }
- return command;
- }
-
- public static boolean hasMessageCreate(GraphicalEditPart sourceEditPart, EditPart targetEditPart) {
- List list = sourceEditPart.getSourceConnections();
- for(Object o : list)
- if(o instanceof Message4EditPart && targetEditPart.equals(((Message4EditPart)o).getTarget())){
- return true;
- }
- return false;
- }
-
- public static boolean hasIncomingMessageCreate(EditPart target) {
- return getIncomingMessageCreate(target).size() > 0;
- }
-
- public static List getIncomingMessageCreate(EditPart target) {
- List create = new ArrayList();
- if(target instanceof LifelineEditPart) {
- List list = ((LifelineEditPart)target).getTargetConnections();
- if(list != null && list.size() > 0) {
- for(Object l : list)
- if(l instanceof Message4EditPart) {
- create.add(l);
- }
- }
- }
- return create;
- }
-
- public static boolean canReconnectMessageCreate(ReconnectRequest request){
- Message4EditPart connPart = (Message4EditPart)request.getConnectionEditPart();
- if(request.isMovingStartAnchor()){ // reconnect source
- if( hasMessageCreate( (GraphicalEditPart)request.getTarget(), (GraphicalEditPart)connPart.getTarget()))
- return false;
- }else{ // reconnect target
- if( hasMessageCreate((GraphicalEditPart)connPart.getSource(), request.getTarget()))
- return false;
- }
- return true;
- }
-
- public static Command reconnectMessageCreateTarget(ReconnectRequest request, Command command) {
- LifelineEditPart oldTarget = (LifelineEditPart)request.getConnectionEditPart().getTarget();
- LifelineEditPart source = (LifelineEditPart)request.getConnectionEditPart().getSource();
- LifelineEditPart newTarget = (LifelineEditPart)request.getTarget();
- // move up the original connection target lifeline, it has only one create message, which will be removed
- if(getIncomingMessageCreate(oldTarget).size() == 1) {
- Rectangle bounds = oldTarget.getPrimaryShape().getBounds();
- Point location = new Point(bounds.x, SequenceUtil.LIFELINE_VERTICAL_OFFSET);
- int dy = location.y - bounds.y;
- ICommand boundsCommand = new SetBoundsCommand(oldTarget.getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize, new EObjectAdapter(oldTarget.getNotationView()), location);
- command = command.chain(new ICommandProxy(boundsCommand));
- command = moveCascadeLifeline(oldTarget, command, dy);
- }
-
- //move down the new connection target lifeline
- command = moveLifelineDown(command, newTarget, request.getLocation().getCopy());
- return command;
- }
-
- public static Command moveLifelineDown(Command command, LifelineEditPart part, Point sourcePointCopy) {
- IFigure fig = part.getFigure();
- Rectangle bounds = fig.getBounds().getCopy();
- fig.translateToAbsolute(bounds);
- int height = part.getPrimaryShape().getFigureLifelineNameContainerFigure().getBounds().height;
- Point location = new Point(bounds.x, Math.max(bounds.y, sourcePointCopy.y() - height / 2));
-
- View targetView = part.getNotationView();
- if(location.y != bounds.y) {
- int dy = location.y - bounds.y;
- fig.translateToRelative(location);
- fig.translateToParent(location);
-
- ICommand boundsCommand = new SetBoundsCommand(part.getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize, new EObjectAdapter(targetView), location);
- command = command.chain(new ICommandProxy(boundsCommand));
- command = moveCascadeLifeline(part, command, dy);
- }
-
- return command;
- }
-
- // move all lifelines which has incoming create link from part
- public static Command moveCascadeLifeline(LifelineEditPart part, Command command, int dy) {
- List list = part.getSourceConnections();
- if(list != null && list.size() > 0) {
- for(Object l : list)
- if(l instanceof Message4EditPart) {
- EditPart target = ((Message4EditPart)l).getTarget();
- if(target instanceof LifelineEditPart) {
- LifelineEditPart lp = (LifelineEditPart)target;
- Rectangle bounds = lp.getFigure().getBounds().getCopy();
- View targetView = lp.getNotationView();
- Point location = bounds.getLocation().getCopy().translate(0, dy);
- Command boundsCommand = new ICommandProxy(new SetBoundsCommand(part.getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize, new EObjectAdapter(targetView), location));
- // Take care of the order of commands, to make sure target is always bellow the source.
- if(dy < 0){ // move up
- command = command == null? boundsCommand: command.chain(boundsCommand);
- command = moveCascadeLifeline(lp, command, dy);
- }else{ // move down
- command = moveCascadeLifeline(lp, command, dy);
- command = command == null? boundsCommand: command.chain(boundsCommand);
- }
- }
- }
- }
- return command;
- }
-
- public static boolean canMoveLifelineVertical(LifelineEditPart child, Rectangle newBounds) {
- int halfHeight = child.getPrimaryShape().getFigureLifelineNameContainerFigure().getBounds().height / 2;
- // check outgoing links
- List list = child.getSourceConnections();
- if(list != null && list.size() > 0) {
- for(Object l : list)
- if(l instanceof Message4EditPart && ((Message4EditPart)l).getTarget() instanceof LifelineEditPart) {
- LifelineEditPart lowPart = (LifelineEditPart)((Message4EditPart)l).getTarget();
- Rectangle outBounds = lowPart.getFigure().getBounds();
- if(outBounds.y - newBounds.y < halfHeight)
- return false;
- }
- }
- // check incoming links
- list = child.getTargetConnections();
- if(list != null && list.size() > 0) {
- for(Object l : list)
- if(l instanceof Message4EditPart && ((Message4EditPart)l).getSource() instanceof LifelineEditPart) {
- LifelineEditPart highPart = (LifelineEditPart)((Message4EditPart)l).getSource();
- Rectangle inBounds = highPart.getFigure().getBounds();
- if(newBounds.y - inBounds.y < halfHeight)
- return false;
-
- if(newBounds.y > inBounds.getBottom().y - halfHeight)
- return false;
- }
- }
-
- return true;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineModelChildrenHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineModelChildrenHelper.java
deleted file mode 100644
index 6e4b1b9be65..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineModelChildrenHelper.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-
-
-public class LifelineModelChildrenHelper {
-
- /**
- * Try to fixed the bug about display ExecutionSpecifications(ES).
- *
- * At some times, the child ES would be displayed under the parent ES.
- *
- * Fixed to sort them with bounds in model before creating.
- */
- public static List<View> getModelChildren(View lifeline) {
- if(lifeline == null) {
- return Collections.emptyList();
- }
- @SuppressWarnings("unchecked")
- List<View> children = new ArrayList<View>(lifeline.getVisibleChildren());
- sortChildren(children);
- return children;
- }
-
- private static void sortChildren(List<View> children) {
- Collections.sort(children, new Comparator<Object>() {
-
- public int compare(Object o1, Object o2) {
- if(!(o1 instanceof View && o2 instanceof View)) {
- return 0;
- }
- View v1 = (View)o1;
- View v2 = (View)o2;
- EObject e1 = ViewUtil.resolveSemanticElement(v1);
- EObject e2 = ViewUtil.resolveSemanticElement(v2);
- if(!(e1 instanceof ExecutionSpecification && e2 instanceof ExecutionSpecification)) {
- return 0;
- }
- Rectangle r1 = getViewBounds(v1);
- Rectangle r2 = getViewBounds(v2);
- if(r1 == null || r2 == null) {
- return 0;
- }
- if(r1.width <= 0) {
- r1.width = 16;
- }
- if(r2.width <= 0) {
- r2.width = 16;
- }
-
- if((r1.x < r2.x) || r1.right() < r2.right()) {
- return -1;
- }
- return 1;
- }
- });
- }
-
- private static Rectangle getViewBounds(View view) {
- if(view == null) {
- return null;
- }
- Integer x = getFeatureValue(view, NotationPackage.eINSTANCE.getLocation_X());
- Integer y = getFeatureValue(view, NotationPackage.eINSTANCE.getLocation_Y());
- Integer width = getFeatureValue(view, NotationPackage.eINSTANCE.getSize_Width());
- Integer height = getFeatureValue(view, NotationPackage.eINSTANCE.getSize_Height());
- if(x == null && y == null && width == null && height == null) {
- return null;
- }
- return new Rectangle(x == null ? 0 : x.intValue(), y == null ? 0 : y.intValue(), width == null ? -1 : width.intValue(), height == null ? -1 : height.intValue());
- }
-
- private static Integer getFeatureValue(View view, EStructuralFeature feature) {
- if(view == null || feature == null) {
- return null;
- }
- return (Integer)ViewUtil.getPropertyValue(view, feature, feature.getEContainingClass());
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineResizeHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineResizeHelper.java
deleted file mode 100644
index a7728f520b2..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineResizeHelper.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Soyatec - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-
-
-public class LifelineResizeHelper {
-
- private static final String MANUAL_LABEL_SIZE = "manual.label.size";
- private static final String CUSTOM_EXTENSION_INFO = "CustomExtensionInfo";
-
- public static boolean isManualSize(LifelineEditPart lp){
- View view = lp.getNotationView();
- EAnnotation oldAnnotation = view.getEAnnotation(CUSTOM_EXTENSION_INFO);
- if(oldAnnotation != null) {
- String val = oldAnnotation.getDetails().get(MANUAL_LABEL_SIZE);
- return "true".equalsIgnoreCase(val);
- }
- return false;
- }
-
- public static ICommand createManualLabelSizeCommand(TransactionalEditingDomain domain, IAdaptable adapter){
- return new ManualLabelSizeCommand(domain, adapter, CUSTOM_EXTENSION_INFO);
- }
-
- public static ICommand createManualLabelSizeCommand(LifelineEditPart lifelineEP){
- return new ManualLabelSizeCommand(lifelineEP.getEditingDomain(), lifelineEP.getNotationView(), CUSTOM_EXTENSION_INFO);
- }
-
- public static class ManualLabelSizeCommand extends AbstractTransactionalCommand {
-
- public EModelElement getObject() {
- if(object != null)
- return object;
- if(adapter != null){
- return (View)adapter.getAdapter(View.class);
- }
- return null;
- }
-
- /** The object. */
- private EModelElement object;
-
- /** The e annotation name. */
- private String eAnnotationName;
-
- private IAdaptable adapter;
-
- public ManualLabelSizeCommand(TransactionalEditingDomain domain, EModelElement object, String eannotationName) {
- super(domain,"manual size", null);
- this.object = object;
- this.eAnnotationName = eannotationName;
- }
-
- public ManualLabelSizeCommand(TransactionalEditingDomain domain, IAdaptable adapter, String eannotationName) {
- super(domain,"manual size", null);
- this.adapter = adapter;
- this.eAnnotationName = eannotationName;
- }
-
- protected EAnnotation createEAnnotation() {
- EAnnotation eannotation = EcoreFactory.eINSTANCE.createEAnnotation();
- eannotation.setSource(eAnnotationName);
- return eannotation;
- }
-
- protected void attachEannotation(EAnnotation annotation, EModelElement object) {
- object.getEAnnotations().add(annotation);
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- EAnnotation oldAnnotation = getObject().getEAnnotation(eAnnotationName);
- if(oldAnnotation == null) {
- oldAnnotation = createEAnnotation();
- attachEannotation(oldAnnotation, getObject());
- }
- oldAnnotation.getDetails().put(MANUAL_LABEL_SIZE, "true");
- return CommandResult.newOKCommandResult();
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LoopOperatorUtil.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LoopOperatorUtil.java
deleted file mode 100644
index f29e528dc37..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LoopOperatorUtil.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import org.eclipse.papyrus.uml.service.types.utils.InteractionConstraintUtil;
-import org.eclipse.uml2.uml.InteractionConstraint;
-
-/**
- * Loop operand could have iteration bounds which may include a lower and an upper number of iterations of the loop. Textual syntax of the loop is:
- * loop-operand ::= loop [ '(' min-int [ ',' max-int ] ')' ]
- * min-int ::= non-negative-integer
- * max-int ::= positive-integer | '*'
- *
- * 1. If loop has no bounds specified, it means potentially infinite loop with zero as lower bound and infinite upper bound..
- * 2. If only min-int is specified, it means that upper bound is equal to the lower bound, and loop will be executed exactly the specified
- * number of times.
- * 3. If max-int is specified, it should be greater than or equal to min-int. Loop will iterate minimum the min-int number of times and at
- * most the max-int number of times.
- *
- * @author Jin Liu (jin.liu@soyatec.com)
- */
-public class LoopOperatorUtil {
-
- public static String getLoopCondition(InteractionConstraint guard) {
- if(guard == null) {
- return null;
- }
- Integer minint = InteractionConstraintUtil.getMinintValue(guard);
- Integer maxint = InteractionConstraintUtil.getMaxintValue(guard);
-
- if(minint == null && maxint == null) {
- return "";
- }
- if(minint != null && maxint == null && minint.intValue() == 0) {
- maxint = Integer.MAX_VALUE;
- }
- if(minint == null) {
- minint = Integer.valueOf(0);
- }
- StringBuffer buf = new StringBuffer("(");
- buf.append(minint.intValue());
- if(maxint != null) {
- if(maxint.intValue() != minint.intValue()) {
- buf.append(", ");
- if(Integer.MAX_VALUE == maxint) {
- buf.append("*");
- } else {
- buf.append(maxint);
- }
- }
- }
- buf.append(")");
- return new String(buf);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/MessageStyleElementFactory.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/MessageStyleElementFactory.java
deleted file mode 100644
index 80f89be9a51..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/MessageStyleElementFactory.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.Style;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
-import org.eclipse.papyrus.uml.tools.databinding.PapyrusObservableValue;
-import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
-import org.eclipse.papyrus.views.properties.modelelement.AbstractModelElement;
-import org.eclipse.papyrus.views.properties.modelelement.ModelElement;
-import org.eclipse.papyrus.views.properties.modelelement.ModelElementFactory;
-
-
-public class MessageStyleElementFactory implements ModelElementFactory {
-
- public ModelElement createFromSource(Object sourceElement, DataContextElement context) {
- View view = NotationHelper.findView(sourceElement);
- if(view != null && view instanceof Edge) {
- return new MessageStyleModelElement((Edge)view, context);
- }
- return null;
- }
-
- static class MessageStyleModelElement extends AbstractModelElement {
-
- protected DataContextElement context;
-
- private Edge source;
-
- public MessageStyleModelElement(Edge source, DataContextElement context) {
- this.context = context;
- this.source = source;
- }
-
- @Override
- protected IObservable doGetObservable(String propertyPath) {
- EditingDomain domain = AdapterFactoryEditingDomain.getEditingDomainFor(source);
- Style style = null;
- if(context.getName().equals("LineStyle")) {
- style = source.getStyle(NotationPackage.Literals.LINE_STYLE);
- } else if(context.getName().equals("FontStyle")) {
- style = source.getStyle(NotationPackage.Literals.FONT_STYLE);
- }
- if(style != null) {
- EStructuralFeature feature = style.eClass().getEStructuralFeature(propertyPath);
- return new PapyrusObservableValue(style, feature, domain);
- }
- return null;
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/NotificationHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/NotificationHelper.java
deleted file mode 100644
index 116a4cdaf9a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/NotificationHelper.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
-
-public class NotificationHelper {
-
- private UIAdapterImpl modelListener;
-
- private List<Notifier> listeners = new ArrayList<Notifier>();
-
- public NotificationHelper(UIAdapterImpl modelListener) {
- this.modelListener = modelListener;
- }
-
- /**
- * Add listener on a element
- *
- * @param element
- * The object to listen
- */
- public void listenObject(Notifier element) {
- // Only listen the object if it isn't yet listened
- if(element != null && !element.eAdapters().contains(modelListener)) {
- element.eAdapters().add(modelListener);
- listeners.add(element);
- }
- }
-
- /**
- * Remove listener on a element
- *
- * @param element
- * The object to unlisten
- */
- public void unlistenObject(Notifier element) {
- // Only listen the object if it isn't yet listened
- if(element != null && element.eAdapters().contains(modelListener)) {
- element.eAdapters().remove(modelListener);
- }
- listeners.remove(element);
- }
-
- /**
- * Remove all listeners
- */
- public void unlistenAll() {
- if(listeners.size() > 0) {
- for(Notifier listener : listeners) {
- if(listener != null && listener.eAdapters().contains(modelListener)) {
- listener.eAdapters().remove(modelListener);
- }
- }
- listeners.clear();
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationMoveHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationMoveHelper.java
deleted file mode 100644
index c08af5a6d40..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationMoveHelper.java
+++ /dev/null
@@ -1,1126 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-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.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-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.ConnectionEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-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.INodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.IdentityAnchor;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.impl.ConnectorImpl;
-import org.eclipse.papyrus.uml.diagram.common.helper.InteractionFragmentHelper;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ObservationLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.uml2.common.util.CacheAdapter;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.GeneralOrdering;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.IntervalConstraint;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.TimeObservation;
-
-/**
- * This Helper must be used for performing move/reconnect operations which modify the location of an OccurrenceSpecification.
- *
- * @author vhemery
- */
-public class OccurrenceSpecificationMoveHelper {
-
- /**
- * Get the complete command to move or reconnect all edit parts attached to one or two occurrence specification(s).
- *
- * @param movedOccurrenceSpecification1
- * first moved occurrence specification
- * @param movedOccurrenceSpecification2
- * second moved occurrence specification (or null)
- * @param yLocation1
- * y location where first occurrence specification is moved
- * @param yLocation2
- * y location where second occurrence specification is moved (or -1)
- * @param lifelinePart
- * lifeline edit part containing the moved element
- * @param notToMoveEditParts
- * list of edit parts which must not be moved in the created command
- * @return command to move all edit parts linked to the occurrence specifications or null
- */
- public static Command getMoveOccurrenceSpecificationsCommand(OccurrenceSpecification movedOccurrenceSpecification1, OccurrenceSpecification movedOccurrenceSpecification2, int yLocation1, int yLocation2, LifelineEditPart lifelinePart, List<EditPart> notToMoveEditParts) {
- // the global command which shall be completed and returned
- CompoundCommand globalCmd = new CompoundCommand();
- // move the corresponding execution specification if necessary
- Command command = getMoveExecutionSpecificationCommand(movedOccurrenceSpecification1, movedOccurrenceSpecification2, yLocation1, yLocation2, lifelinePart, notToMoveEditParts);
- if(command != null) {
- globalCmd.add(command);
- }
- // reconnect the corresponding message(s) if necessary
- if(movedOccurrenceSpecification1 instanceof MessageOccurrenceSpecification) {
- command = getReconnectMessageCommand(movedOccurrenceSpecification1, yLocation1, lifelinePart, notToMoveEditParts);
- if(command != null) {
- globalCmd.add(command);
- }
- }
- if(movedOccurrenceSpecification2 instanceof MessageOccurrenceSpecification) {
- command = getReconnectMessageCommand(movedOccurrenceSpecification2, yLocation2, lifelinePart, notToMoveEditParts);
- if(command != null) {
- globalCmd.add(command);
- }
- }
- // move the corresponding time/duration constraints/observations if necessary
- command = getMoveTimeElementsCommand(movedOccurrenceSpecification1, movedOccurrenceSpecification2, yLocation1, yLocation2, lifelinePart, notToMoveEditParts);
- if(command != null) {
- globalCmd.add(command);
- }
- // reconnect the corresponding general ordering(s) if necessary
- command = getReconnectGeneralOrderingCommand(movedOccurrenceSpecification1, yLocation1, lifelinePart, notToMoveEditParts);
- if(command != null) {
- globalCmd.add(command);
- }
- if(movedOccurrenceSpecification2 != null) {
- command = getReconnectGeneralOrderingCommand(movedOccurrenceSpecification2, yLocation2, lifelinePart, notToMoveEditParts);
- if(command != null) {
- globalCmd.add(command);
- }
- }
- // return null rather than an empty non executable command
- if(globalCmd.isEmpty()) {
- return null;
- }
- return globalCmd;
- }
-
- /**
- * Get the command to reconnect general ordering attached to a moved occurrence specification
- *
- * @param movedOccurrenceSpecification
- * moving occurrence specification
- * @param yLocation
- * y location where occurrence specification is moved
- * @param lifelinePart
- * lifeline edit part containing the moved element
- * @param notToMoveEditParts
- * list of edit parts which must not be moved in the created command
- * @return command to reconnect general ordering edit parts linked to the occurrence specification or null
- */
- private static Command getReconnectGeneralOrderingCommand(OccurrenceSpecification movedOccurrenceSpecification, int yLocation, LifelineEditPart lifelinePart, List<EditPart> notToMoveEditParts) {
- // the global command which shall be completed and returned
- CompoundCommand command = new CompoundCommand();
- Point referencePoint = getReferencePoint(lifelinePart, movedOccurrenceSpecification, yLocation);
- EditPart childToReconnectTo = SequenceUtil.findPartToReconnectTo(lifelinePart, referencePoint);
- // if referencePoint is on a moved part, it must be translated with the location delta of this part
- if(!notToMoveEditParts.isEmpty() && childToReconnectTo != lifelinePart) {
- Point oldLoc = SequenceUtil.findLocationOfEvent(lifelinePart, movedOccurrenceSpecification);
- referencePoint.y = oldLoc.y;
- }
- // reconnect general ordering from the event
- for(GeneralOrdering go : movedOccurrenceSpecification.getToAfters()) {
- Collection<Setting> settings = CacheAdapter.INSTANCE.getNonNavigableInverseReferences(go);
- for(Setting ref : settings) {
- if(NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
- View view = (View)ref.getEObject();
- EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelinePart);
- // the general ordering part must start or finish on the lifeline (with the event)
- if(part instanceof ConnectionEditPart && !notToMoveEditParts.contains(part)) {
- Request reconnectRequest = makeReconnectRequest((ConnectionEditPart)part, true, referencePoint, childToReconnectTo);
- Command reconnect = childToReconnectTo.getCommand(reconnectRequest);
- if(reconnect.canExecute()) {
- command.add(reconnect);
- }
- }
- }
- }
- }
- // reconnect general ordering to the event
- for(GeneralOrdering go : movedOccurrenceSpecification.getToBefores()) {
- Collection<Setting> settings = CacheAdapter.INSTANCE.getNonNavigableInverseReferences(go);
- for(Setting ref : settings) {
- if(NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
- View view = (View)ref.getEObject();
- EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelinePart);
- // the general ordering part must start or finish on the lifeline (with the event)
- if(part instanceof ConnectionEditPart && !notToMoveEditParts.contains(part)) {
- Request reconnectRequest = makeReconnectRequest((ConnectionEditPart)part, false, referencePoint, childToReconnectTo);
- Command reconnect = childToReconnectTo.getCommand(reconnectRequest);
- if(reconnect.canExecute()) {
- command.add(reconnect);
- }
- }
- }
- }
- }
- // return null rather than an empty non executable command
- if(command.isEmpty()) {
- return null;
- }
- return command;
- }
-
- /**
- * Get the command to reconnect message attached to a moved occurrence specification
- *
- * @param movedOccurrenceSpecification
- * moving occurrence specification
- * @param yLocation
- * y location where occurrence specification is moved
- * @param lifelinePart
- * lifeline edit part containing the moved element
- * @param notToMoveEditParts
- * list of edit parts which must not be moved in the created command
- * @return command to reconnect message edit part linked to the occurrence specification or null
- */
- private static Command getReconnectMessageCommand(OccurrenceSpecification movedOccurrenceSpecification, int yLocation, LifelineEditPart lifelinePart, List<EditPart> notToMoveEditParts) {
- // the global command which shall be completed and returned
- CompoundCommand command = new CompoundCommand();
- if(movedOccurrenceSpecification instanceof MessageOccurrenceSpecification) {
- Point referencePoint = getReferencePoint(lifelinePart, movedOccurrenceSpecification, yLocation);
- EditPart childToReconnectTo = SequenceUtil.findPartToReconnectTo(lifelinePart, referencePoint);
- // reconnect message from the event
- Message message = ((MessageOccurrenceSpecification)movedOccurrenceSpecification).getMessage();
- if(message != null && movedOccurrenceSpecification.equals(message.getSendEvent())) {
- Collection<Setting> settings = CacheAdapter.INSTANCE.getNonNavigableInverseReferences(message);
- for(Setting ref : settings) {
- if(NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
- View view = (View)ref.getEObject();
- EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelinePart);
- // the message part must start or finish on the lifeline (with the event)
- if(part instanceof ConnectionEditPart && !notToMoveEditParts.contains(part)) {
- Request reconnectRequest = makeReconnectRequest((ConnectionEditPart)part, true, referencePoint, childToReconnectTo);
- Command reconnect = childToReconnectTo.getCommand(reconnectRequest);
- command.add(reconnect);
- // update enclosing interaction fragment
- Command updateIFrag = SequenceUtil.createUpdateEnclosingInteractionCommand((MessageOccurrenceSpecification)movedOccurrenceSpecification, referencePoint, lifelinePart);
- if(updateIFrag != null && updateIFrag.canExecute()) {
- command.add(updateIFrag);
- }
- }
- }
- }
- }
- // reconnect message to the event
- if(message != null && movedOccurrenceSpecification.equals(message.getReceiveEvent())) {
- Collection<Setting> settings = CacheAdapter.INSTANCE.getNonNavigableInverseReferences(message);
- for(Setting ref : settings) {
- if(NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
- View view = (View)ref.getEObject();
- EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelinePart);
- // the message part must start or finish on the lifeline (with the event)
- if(part instanceof ConnectionEditPart && !notToMoveEditParts.contains(part)) {
- Request reconnectRequest = makeReconnectRequest((ConnectionEditPart)part, false, referencePoint, childToReconnectTo);
- Command reconnect = childToReconnectTo.getCommand(reconnectRequest);
- command.add(reconnect);
- // update enclosing interaction fragment
- Command updateIFrag = SequenceUtil.createUpdateEnclosingInteractionCommand((MessageOccurrenceSpecification)movedOccurrenceSpecification, referencePoint, lifelinePart);
- if(updateIFrag != null && updateIFrag.canExecute()) {
- command.add(updateIFrag);
- }
- }
- }
- }
- }
- }
-
- // return null rather than an empty non executable command
- if(command.isEmpty()) {
- return null;
- }
- return command;
- }
-
- /**
- * Get the command to move time/duration observations/constraints attached to a moved occurrence specification
- *
- * @param movedOccurrenceSpecification1
- * first moved occurrence specification
- * @param movedOccurrenceSpecification2
- * second moved occurrence specification (or null)
- * @param yLocation1
- * y location where first occurrence specification is moved
- * @param yLocation2
- * y location where second occurrence specification is moved (or -1)
- * @param lifelinePart
- * lifeline edit part containing the moved element
- * @param notToMoveEditParts
- * list of edit parts which must not be moved in the created command
- * @return command to move time edit parts linked to the occurrence specification or null
- */
- private static Command getMoveTimeElementsCommand(OccurrenceSpecification movedOccurrenceSpecification1, OccurrenceSpecification movedOccurrenceSpecification2, int yLocation1, int yLocation2, LifelineEditPart lifelinePart, List<EditPart> notToMoveEditParts) {
- // the global command which shall be completed and returned
- CompoundCommand globalCmd = new CompoundCommand();
- IFigure lifelineFigure = lifelinePart.getFigure();
- // relocate each linked time element contained within the lifeline part
- for(Object lifelineChild : lifelinePart.getChildren()) {
- if(lifelineChild instanceof IBorderItemEditPart && !notToMoveEditParts.contains(lifelineChild)) {
- final IBorderItemEditPart timePart = (IBorderItemEditPart)lifelineChild;
- Command cmd = getMoveSingleTimeRelatedElementCommand(timePart, movedOccurrenceSpecification1, movedOccurrenceSpecification2, yLocation1, yLocation2, lifelinePart);
- if(cmd != null) {
- globalCmd.add(cmd);
- }
- }
- }
-
- // relocate each observation linked time element
- for(Object targetConnection : lifelinePart.getTargetConnections()){
- if(targetConnection instanceof ObservationLinkEditPart){
- Command cmd = getMoveSingleTimeRelatedElementCommand((ObservationLinkEditPart)targetConnection, movedOccurrenceSpecification1, movedOccurrenceSpecification2, yLocation1, yLocation2, lifelinePart);
- if(cmd != null) {
- globalCmd.add(cmd);
- }
- }
- }
-
- // refresh layout commands :
- // one before the commands for the undo and one after for classic execution
- if(!globalCmd.isEmpty() && lifelineFigure instanceof BorderedNodeFigure) {
- Command relayout = getReLayoutCmd((BorderedNodeFigure)lifelineFigure, false);
- Command relayoutUndo = getReLayoutCmd((BorderedNodeFigure)lifelineFigure, true);
- if(relayout != null && relayoutUndo != null) {
- CompoundCommand commandWithRelayout = new CompoundCommand();
- commandWithRelayout.add(relayoutUndo);
- commandWithRelayout.add(globalCmd);
- commandWithRelayout.add(relayout);
- return commandWithRelayout;
- }
- }
- // return null rather than an empty non executable command
- if(globalCmd.isEmpty()) {
- return null;
- }
- return globalCmd;
- }
-
- private static Command getMoveSingleTimeRelatedElementCommand(
- final ObservationLinkEditPart targetConnection,
- final OccurrenceSpecification movedOccurrenceSpecification1,
- final OccurrenceSpecification movedOccurrenceSpecification2,
- final int yLocation1, final int yLocation2,final LifelineEditPart lifelinePart) {
-
- AbstractTransactionalCommand updateTargetAnchorCommand = new AbstractTransactionalCommand(((IGraphicalEditPart) targetConnection).getEditingDomain(),"update target anchor",null) {
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
-
- // both bounds may have changed
- Point referencePoint1 = getReferencePoint(lifelinePart, movedOccurrenceSpecification1, yLocation1);
- Point referencePoint2 = getReferencePoint(lifelinePart, movedOccurrenceSpecification2, yLocation2);
-
- int position1 = PositionConstants.NONE;
- int position2 = PositionConstants.NONE;
- TimeObservationLabelEditPart tolEP = (TimeObservationLabelEditPart)targetConnection.getSource();
- if(tolEP == null){
- return CommandResult.newCancelledCommandResult();
- }
-
- if(movedOccurrenceSpecification1 != null) {
- position1 = SequenceUtil.positionWhereEventIsLinkedToPart(movedOccurrenceSpecification1, tolEP);
- }
- if(movedOccurrenceSpecification2 != null) {
- position2 = SequenceUtil.positionWhereEventIsLinkedToPart(movedOccurrenceSpecification2, tolEP);
- }
- ConnectionAnchor targetAnchor = null;
- if(position1 == PositionConstants.CENTER){
- targetAnchor = lifelinePart.getNodeFigure().getSourceConnectionAnchorAt(referencePoint1);
- }else if(position2 == PositionConstants.CENTER){
- targetAnchor = lifelinePart.getNodeFigure().getSourceConnectionAnchorAt(referencePoint2);
- }
-
- if(targetAnchor!= null){
- String newTargetTerminal = lifelinePart.mapConnectionAnchorToTerminal(targetAnchor);
- ConnectorImpl c = (ConnectorImpl)targetConnection.getModel();
- if (newTargetTerminal != null) {
- if (newTargetTerminal.length() == 0)
- c.setTargetAnchor(null);
- else {
- IdentityAnchor a = (IdentityAnchor) c.getTargetAnchor();
- if (a == null)
- a = NotationFactory.eINSTANCE.createIdentityAnchor();
- a.setId(newTargetTerminal);
- c.setTargetAnchor(a);
- }
- }
-
- }
-
- return CommandResult.newOKCommandResult();
- }
- };
-
-
- // return the resize command
- ICommandProxy resize = new ICommandProxy(updateTargetAnchorCommand);
- return resize;
- }
-
- /**
- * Get a command to move the time related element's edit part
- *
- * @param timePart
- * time related element's edit part to move
- * @param movedOccurrenceSpecification1
- * first moved occurrence specification
- * @param movedOccurrenceSpecification2
- * second moved occurrence specification (or null)
- * @param yLocation1
- * y location where first occurrence specification is moved
- * @param yLocation2
- * y location where second occurrence specification is moved (or -1)
- * @param lifelinePart
- * lifeline edit part containing the moved element
- * @return
- */
- private static Command getMoveSingleTimeRelatedElementCommand(IBorderItemEditPart timePart, OccurrenceSpecification movedOccurrenceSpecification1, OccurrenceSpecification movedOccurrenceSpecification2, int yLocation1, int yLocation2, LifelineEditPart lifelinePart) {
- IFigure lifelineFigure = lifelinePart.getFigure();
- // get positions where edit part is attached to events
- int position1 = PositionConstants.NONE;
- int position2 = PositionConstants.NONE;
- if(movedOccurrenceSpecification1 != null) {
- position1 = SequenceUtil.positionWhereEventIsLinkedToPart(movedOccurrenceSpecification1, timePart);
- }
- if(movedOccurrenceSpecification2 != null) {
- position2 = SequenceUtil.positionWhereEventIsLinkedToPart(movedOccurrenceSpecification2, timePart);
- }
- // move necessary bounds
- Rectangle newBounds = null;
- if(position1 != PositionConstants.NONE && position2 != PositionConstants.NONE) {
- // both bounds may have changed
- Point referencePoint1 = getReferencePoint(lifelinePart, movedOccurrenceSpecification1, yLocation1);
- Point referencePoint2 = getReferencePoint(lifelinePart, movedOccurrenceSpecification2, yLocation2);
- makeRelativeToLifeline(referencePoint1, lifelinePart, false);
- makeRelativeToLifeline(referencePoint2, lifelinePart, false);
- // Get old bounds information by consulting old figure
- int oldY = timePart.getFigure().getBounds().getLocation().y - lifelineFigure.getBounds().getLocation().y;
- int oldHeight = timePart.getFigure().getSize().height;
- // Compute new bounds of the time element
- if(position1 == PositionConstants.CENTER || position2 == PositionConstants.CENTER) {
- // should not happen, except if both events are merged at the same location
- newBounds = new Rectangle(referencePoint1.x, referencePoint1.y - oldHeight / 2, -1, oldHeight);
- } else {
- int top = oldY;
- int bottom = oldY + oldHeight;
- // bound is based on two events. Recompute it according to moved event(s).
- if(position1 == PositionConstants.TOP) {
- top = referencePoint1.y;
- } else if(position1 == PositionConstants.BOTTOM) {
- bottom = referencePoint1.y;
- }
- if(position2 == PositionConstants.TOP) {
- top = referencePoint2.y;
- } else if(position2 == PositionConstants.BOTTOM) {
- bottom = referencePoint2.y;
- }
- // top and bottom may have been inverted during the move.
- // restore x position, fix time duration always move to east
- int viewX = (Integer) ViewUtil.getPropertyValue((View) timePart.getModel(), NotationPackage.eINSTANCE
- .getLocation_X(), NotationPackage.eINSTANCE.getLocation_X().getEContainingClass());
-
- newBounds = new Rectangle(viewX, Math.min(top, bottom), -1, Math.abs(bottom - top));
-// newBounds = new Rectangle(referencePoint1.x, Math.min(top, bottom), -1, Math.abs(bottom - top));
- }
- } else if(position1 != PositionConstants.NONE) {
- Point referencePoint1 = getReferencePoint(lifelinePart, movedOccurrenceSpecification1, yLocation1);
- makeRelativeToLifeline(referencePoint1, lifelinePart, false);
- // Get old bounds information by consulting old figure
- int oldY = timePart.getFigure().getBounds().getLocation().y - lifelineFigure.getBounds().getLocation().y;
- int oldHeight = timePart.getFigure().getSize().height;
- // Compute new bounds of the time element
- if(position1 == PositionConstants.CENTER) {
- newBounds = new Rectangle(referencePoint1.x, referencePoint1.y - oldHeight / 2, -1, oldHeight);
- } else {
- int top = oldY;
- int bottom = oldY + oldHeight;
- // bound is based on two events. Recompute it according to moved event(s).
- if(position1 == PositionConstants.TOP) {
- top = referencePoint1.y;
- } else if(position1 == PositionConstants.BOTTOM) {
- bottom = referencePoint1.y;
- }
- // top and bottom may have been inverted during the move.
- newBounds = new Rectangle(referencePoint1.x, Math.min(top, bottom), -1, Math.abs(bottom - top));
- }
- } else if(position2 != PositionConstants.NONE) {
- Point referencePoint2 = getReferencePoint(lifelinePart, movedOccurrenceSpecification2, yLocation2);
- makeRelativeToLifeline(referencePoint2, lifelinePart, false);
- // Get old bounds information by consulting old figure
- int oldY = timePart.getFigure().getBounds().getLocation().y - lifelineFigure.getBounds().getLocation().y;
- int oldHeight = timePart.getFigure().getSize().height;
- // Compute new bounds of the time element
- if(position2 == PositionConstants.CENTER) {
- newBounds = new Rectangle(referencePoint2.x, referencePoint2.y - oldHeight / 2, -1, oldHeight);
- } else {
- int top = oldY;
- int bottom = oldY + oldHeight;
- // bound is based on two events. Recompute it according to moved event(s).
- if(position2 == PositionConstants.TOP) {
- top = referencePoint2.y;
- } else if(position2 == PositionConstants.BOTTOM) {
- bottom = referencePoint2.y;
- }
- // top and bottom may have been inverted during the move.
- newBounds = new Rectangle(referencePoint2.x, Math.min(top, bottom), -1, Math.abs(bottom - top));
- }
- }
- if(newBounds != null) {
- TransactionalEditingDomain editingDomain = timePart.getEditingDomain();
- // return the resize command
- ICommandProxy resize = new ICommandProxy(new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, new EObjectAdapter((View)timePart.getModel()), newBounds));
- return resize;
- }
- return null;
- }
-
- /**
- * Make an absolute point relative to a lifeline figure.
- *
- * @param absolutePoint
- * the absolute point to translate
- * @param lifelinePart
- * the containing lifeline edit part
- */
- private static void makeRelativeToLifeline(Point absolutePoint, LifelineEditPart lifelinePart, boolean relativeToContentPane) {
- IFigure figure;
- if(relativeToContentPane) {
- figure = lifelinePart.getContentPane();
- } else {
- figure = lifelinePart.getFigure();
- }
- figure.translateToRelative(absolutePoint);
- absolutePoint.translate(figure.getBounds().getLocation().getNegated());
- }
-
- /**
- * Get the command to move execution specification(s) attached to moved occurrence specification(s)
- *
- * @param movedOccurrenceSpecification1
- * first moved occurrence specification
- * @param movedOccurrenceSpecification2
- * second moved occurrence specification (or null)
- * @param yLocation1
- * y location where first occurrence specification is moved
- * @param yLocation2
- * y location where second occurrence specification is moved (or -1)
- * @param lifelinePart
- * lifeline edit part containing the moved element
- * @param notToMoveEditParts
- * list of edit parts which must not be moved in the created command
- * @return command to move execution specification edit part linked to the occurrence specification or null
- */
- private static Command getMoveExecutionSpecificationCommand(OccurrenceSpecification movedOccurrenceSpecification1, OccurrenceSpecification movedOccurrenceSpecification2, int yLocation1, int yLocation2, LifelineEditPart lifelinePart, List<EditPart> notToMoveEditParts) {
- // the global command which shall be completed and returned
- CompoundCommand globalCmd = new CompoundCommand();
- // execution(s) linked to the event must be resized
- EditPart node1 = null;
- if(movedOccurrenceSpecification1 != null) {
- node1 = SequenceUtil.getLinkedEditPart(lifelinePart, movedOccurrenceSpecification1);
- }
- EditPart node2 = null;
- if(movedOccurrenceSpecification2 != null) {
- node2 = SequenceUtil.getLinkedEditPart(lifelinePart, movedOccurrenceSpecification2);
- }
- if(node1 instanceof GraphicalEditPart && !notToMoveEditParts.contains(node1)) {
- Command cmd = getMoveSingleExecutionSpecificationCommand((GraphicalEditPart)node1, movedOccurrenceSpecification1, movedOccurrenceSpecification2, yLocation1, yLocation2, lifelinePart);
- if(cmd != null) {
- globalCmd.add(cmd);
- }
- }
- if(node2 != node1 && node2 instanceof GraphicalEditPart && !notToMoveEditParts.contains(node2)) {
- Command cmd = getMoveSingleExecutionSpecificationCommand((GraphicalEditPart)node2, movedOccurrenceSpecification2, null, yLocation2, -1, lifelinePart);
- if(cmd != null) {
- globalCmd.add(cmd);
- }
- }
- // return null rather than an empty non executable command
- if(globalCmd.isEmpty()) {
- return null;
- }
- return globalCmd;
- }
-
- /**
- * Get the command to move an execution specification attached to moved occurrence specification(s)
- *
- * @param executionSpecificationPart
- * the execution specification edit part to move
- * @param movedOccurrenceSpecification1
- * first moved occurrence specification
- * @param movedOccurrenceSpecification2
- * second moved occurrence specification (or null)
- * @param yLocation1
- * y location where first occurrence specification is moved
- * @param yLocation2
- * y location where second occurrence specification is moved (or -1)
- * @param lifelinePart
- * lifeline edit part containing the moved element
- * @return command to move the execution specification edit part or null
- */
- private static Command getMoveSingleExecutionSpecificationCommand(GraphicalEditPart executionSpecificationPart, OccurrenceSpecification movedOccurrenceSpecification1, OccurrenceSpecification movedOccurrenceSpecification2, int yLocation1, int yLocation2, LifelineEditPart lifelinePart) {
- // execution linked to the event must be resized
- EObject execution = executionSpecificationPart.resolveSemanticElement();
- if(execution instanceof ExecutionSpecification) {
- // finish or start events of the execution have been moved
- // get positions where execution edit part is attached to events
- int position1 = PositionConstants.NONE;
- int position2 = PositionConstants.NONE;
- OccurrenceSpecification start = ((ExecutionSpecification)execution).getStart();
- OccurrenceSpecification finish = ((ExecutionSpecification)execution).getFinish();
- if(start != null && start.equals(movedOccurrenceSpecification1)) {
- position1 = PositionConstants.TOP;
- } else if(finish != null && finish.equals(movedOccurrenceSpecification1)) {
- position1 = PositionConstants.BOTTOM;
- }
- if(start != null && start.equals(movedOccurrenceSpecification2)) {
- position2 = PositionConstants.TOP;
- } else if(finish != null && finish.equals(movedOccurrenceSpecification2)) {
- position2 = PositionConstants.BOTTOM;
- }
- // move necessary bounds
- Rectangle newBounds = null;
- int heighDelta = 0;
- if(position1 != PositionConstants.NONE && position2 != PositionConstants.NONE) {
- // both bounds have changed
- Point referencePoint1 = getReferencePoint(lifelinePart, movedOccurrenceSpecification1, yLocation1);
- Point referencePoint2 = getReferencePoint(lifelinePart, movedOccurrenceSpecification2, yLocation2);
- makeRelativeToLifeline(referencePoint1, lifelinePart, true);
- makeRelativeToLifeline(referencePoint2, lifelinePart, true);
- // Get old bounds information by consulting old figure
- Rectangle esBounds = SequenceUtil.getAbsoluteBounds(executionSpecificationPart);
- Point esLoc = esBounds.getLocation();
- makeRelativeToLifeline(esLoc, lifelinePart, true);
- esBounds.setLocation(esLoc);
- int oldX = esBounds.x;
- int oldY = esBounds.y;
- int oldWidth = esBounds.width;
- int oldHeight = esBounds.height;
- // Compute new bounds of the time element
- int top = oldY;
- int bottom = oldY + oldHeight;
- // bound is based on two events. Recompute it according to moved event(s).
- if(position1 == PositionConstants.TOP) {
- top = referencePoint1.y;
- } else if(position1 == PositionConstants.BOTTOM) {
- bottom = referencePoint1.y;
- }
- if(position2 == PositionConstants.TOP) {
- top = referencePoint2.y;
- } else if(position2 == PositionConstants.BOTTOM) {
- bottom = referencePoint2.y;
- }
- // top and bottom may have been inverted during the move.
- newBounds = new Rectangle(oldX, Math.min(top, bottom), oldWidth, Math.abs(bottom - top));
- } else if(position1 != PositionConstants.NONE) {
- Point referencePoint1 = getReferencePoint(lifelinePart, movedOccurrenceSpecification1, yLocation1);
- makeRelativeToLifeline(referencePoint1, lifelinePart, true);
- // Get old bounds information by consulting old figure
- Rectangle esBounds = SequenceUtil.getAbsoluteBounds(executionSpecificationPart);
- Point esLoc = esBounds.getLocation();
- makeRelativeToLifeline(esLoc, lifelinePart, true);
- esBounds.setLocation(esLoc);
- int oldX = esBounds.x;
- int oldY = esBounds.y;
- int oldWidth = esBounds.width;
- int oldHeight = esBounds.height;
- // Compute new bounds of the time element
- int top = oldY;
- int bottom = oldY + oldHeight;
- // bound is based on two events. Recompute it according to moved event(s).
- if(position1 == PositionConstants.TOP) {
- top = referencePoint1.y;
- } else if(position1 == PositionConstants.BOTTOM) {
- bottom = referencePoint1.y;
- }
- // top and bottom may have been inverted during the move.
- newBounds = new Rectangle(oldX, Math.min(top, bottom), oldWidth, Math.abs(bottom - top));
- } else if(position2 != PositionConstants.NONE) {
- Point referencePoint2 = getReferencePoint(lifelinePart, movedOccurrenceSpecification2, yLocation2);
- makeRelativeToLifeline(referencePoint2, lifelinePart, true);
- // Get old bounds information by consulting old figure
- Rectangle esBounds = SequenceUtil.getAbsoluteBounds(executionSpecificationPart);
- Point esLoc = esBounds.getLocation();
- makeRelativeToLifeline(esLoc, lifelinePart, true);
- esBounds.setLocation(esLoc);
- int oldX = esBounds.x;
- int oldY = esBounds.y;
- int oldWidth = esBounds.width;
- int oldHeight = esBounds.height;
- // Compute new bounds of the time element
- int top = oldY;
- int bottom = oldY + oldHeight;
- // bound is based on two events. Recompute it according to moved event(s).
- if(position2 == PositionConstants.TOP) {
- top = referencePoint2.y;
- } else if(position2 == PositionConstants.BOTTOM) {
- bottom = referencePoint2.y;
- }
- // top and bottom may have been inverted during the move.
- newBounds = new Rectangle(oldX, Math.min(top, bottom), oldWidth, Math.abs(bottom - top));
- }
- if(newBounds != null) {
- // adjust bounds for execution specification
- newBounds.height -= heighDelta;
- TransactionalEditingDomain editingDomain = executionSpecificationPart.getEditingDomain();
- // return the resize command
- ICommandProxy resize = new ICommandProxy(new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, new EObjectAdapter((View)executionSpecificationPart.getModel()), newBounds));
- return resize;
- }
- }
- return null;
- }
-
- /**
- * Get the reference point to reconnect or resize edit parts at the given y location
- *
- * @param lifelinePart
- * lifeline edit part containing the moved element
- * @param movedOccurrenceSpecification
- * the moving occurrence specification which a reference point is searched for
- * @param yLocation
- * y location
- * @return reference point on the lifeline
- */
- private static Point getReferencePoint(LifelineEditPart lifelinePart, OccurrenceSpecification movedOccurrenceSpecification, int yLocation) {
- Point referencePoint = SequenceUtil.findLocationOfEvent(lifelinePart, movedOccurrenceSpecification);
- if(referencePoint == null) {
- referencePoint = lifelinePart.getFigure().getBounds().getCenter().getCopy();
- }
- referencePoint.y = yLocation;
- return referencePoint;
- }
-
- /**
- * Chain the commands to move associated parts when a connection end is reconnected.
- *
- * @param command
- * existing reconnection command
- * @param request
- * the reconnection request
- * @param connectableNode
- * the node edit part connected to the moved connection
- * @return the completed command
- */
- public static Command completeReconnectConnectionCommand(Command command, ReconnectRequest request, INodeEditPart connectableNode) {
- if(chainEffectIsDisabled(request)) {
- return command;
- }
- CompoundCommand globalCmd = new CompoundCommand();
- globalCmd.add(command);
- List<EditPart> notToMoveEditParts = new ArrayList<EditPart>(1);
- notToMoveEditParts.add(request.getConnectionEditPart());
- // move time related elements linked with the event
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(connectableNode);
- MessageEnd event = getMessageEndFromReconnectMessage(request);
- if(event instanceof OccurrenceSpecification) {
- Command cmd = getMoveOccurrenceSpecificationsCommand((OccurrenceSpecification)event, null, request.getLocation().y, -1, lifelinePart, notToMoveEditParts);
- if(cmd != null) {
- globalCmd.add(cmd);
- }
- }
- OccurrenceSpecification event2 = getOccurrenceSpecificationFromReconnectGeneralOrdering(request);
- if(event2 instanceof OccurrenceSpecification) {
- Command cmd = getMoveOccurrenceSpecificationsCommand((OccurrenceSpecification)event2, null, request.getLocation().y, -1, lifelinePart, notToMoveEditParts);
- if(cmd != null) {
- globalCmd.add(cmd);
- }
- }
- return globalCmd;
- }
-
- /**
- * Check if moving chain effect has been disabled to avoid an infinite loop.
- *
- * @param request
- * the request wich initiated the move
- * @return true if no additional command must be performed.
- */
- private static boolean chainEffectIsDisabled(Request request) {
- Object doNotToMoveEditParts = request.getExtendedData().get(SequenceRequestConstant.DO_NOT_MOVE_EDIT_PARTS);
- return Boolean.TRUE.equals(doNotToMoveEditParts);
- }
-
- /**
- * Complete a command to move time/duration constraints/observation which are linked to the moved edit part
- *
- * @param compoundCmd
- * existing command to complete
- * @param executionSpecificationEP
- * the moved edit part representing an execution specification
- * @param newBounds
- * the new part's bounds (relative to the figure's parent)
- * @param request
- * the change bounds request which originated this move
- * @return the updated parameter compoundCmd for convenience
- */
- public static CompoundCommand completeMoveExecutionSpecificationCommand(CompoundCommand compoundCmd, ShapeNodeEditPart executionSpecificationEP, Rectangle newBounds, ChangeBoundsRequest request) {
- if(chainEffectIsDisabled(request)) {
- return compoundCmd;
- }
- // Move events delimiting the ExecutionSpecification
- EObject execSpec = executionSpecificationEP.resolveSemanticElement();
- if(execSpec instanceof ExecutionSpecification) {
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(executionSpecificationEP);
- // first, get absolute bounds
- newBounds = newBounds.getCopy();
- IFigure parentFig = executionSpecificationEP.getFigure().getParent();
- parentFig.translateToAbsolute(newBounds);
- newBounds.translate(parentFig.getBounds().getLocation());
-
- // move start and finish events
- OccurrenceSpecification start = ((ExecutionSpecification)execSpec).getStart();
- int startY = newBounds.getTop().y;
- OccurrenceSpecification finish = ((ExecutionSpecification)execSpec).getFinish();
- int finishY = newBounds.getBottom().y;
- List<EditPart> notToMoveEditParts = new ArrayList<EditPart>(1);
- notToMoveEditParts.add(executionSpecificationEP);
- Command cmd = getMoveOccurrenceSpecificationsCommand(start, finish, startY, finishY, lifelinePart, notToMoveEditParts);
- if(cmd != null) {
- compoundCmd.add(cmd);
- }
-
- if(request.getSizeDelta().height == 0) {
- // move time elements for events between start and finish
- InteractionFragment nextOccSpec = InteractionFragmentHelper.findNextFragment(start, start.eContainer());
- while(nextOccSpec != null && nextOccSpec != finish) {
- Point occSpecLocation = SequenceUtil.findLocationOfEvent(lifelinePart, nextOccSpec);
- if(nextOccSpec instanceof OccurrenceSpecification && occSpecLocation != null) {
- int occSpecY = occSpecLocation.y + request.getMoveDelta().y;
- cmd = getMoveTimeElementsCommand((OccurrenceSpecification)nextOccSpec, null, occSpecY, -1, lifelinePart, notToMoveEditParts);
- if(cmd != null) {
- compoundCmd.add(cmd);
- }
- }
- nextOccSpec = InteractionFragmentHelper.findNextFragment(nextOccSpec, start.eContainer());
- }
- }
- }
- return compoundCmd;
- }
-
- /**
- * Prepare a request which is supposed to move a time/duration constraints/observation edit part.
- * The request will be updated if some operations are forbidden.
- *
- * @param request
- * the move request
- * @param movedTimePart
- * the moved time/duration constraints/observation edit part.
- */
- public static void prepareTimeRelatedElementMoveRequest(ChangeBoundsRequest request, IBorderItemEditPart movedTimePart) {
- // Erase the y move if element can not be moved on y axe
- if(!canTimeElementPartBeYMoved(movedTimePart)) {
- request.getMoveDelta().y = 0;
- }
- }
-
- /**
- * Complete the command to move an edit part representing a time/duration constraints/observation.
- *
- * @param moveCommand
- * the move command to complete with chaining
- * @param request
- * the request which initiated the move
- * @param hostFigure
- * figure which is being moved
- * @param hostEditPart
- * edit part which is being moved
- * @return the complete command.
- */
- public static Command completeMoveTimeRelatedElementCommand(Command moveCommand, ChangeBoundsRequest request, EditPart hostEditPart, IFigure hostFigure) {
- if(chainEffectIsDisabled(request)) {
- return moveCommand;
- }
- Rectangle bounds = request.getTransformedRectangle(hostFigure.getBounds());
- hostFigure.getParent().translateToAbsolute(bounds);
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(hostEditPart);
- if(lifelinePart != null && hostEditPart instanceof IBorderItemEditPart) {
- IBorderItemEditPart timeElementEditPart = (IBorderItemEditPart)hostEditPart;
- EObject timeElement = timeElementEditPart.resolveSemanticElement();
- OccurrenceSpecification occSpec1 = null;
- int yLocation1 = -1;
- OccurrenceSpecification occSpec2 = null;
- int yLocation2 = -1;
- // find occurrence specifications of the time element
- if(timeElement instanceof TimeConstraint) {
- Iterator<Element> it = ((TimeConstraint)timeElement).getConstrainedElements().iterator();
- while(it.hasNext() && occSpec1 == null) {
- Element elem = it.next();
- if(elem instanceof OccurrenceSpecification) {
- int position1 = whereEventIsLinked((OccurrenceSpecification)elem, timeElementEditPart);
- if(position1 != PositionConstants.NONE) {
- occSpec1 = (OccurrenceSpecification)elem;
- yLocation1 = getLocation(bounds, position1).y;
- }
- }
- }
- } else if(timeElement instanceof TimeObservation) {
- NamedElement event = ((TimeObservation)timeElement).getEvent();
- if(event instanceof OccurrenceSpecification) {
- int position1 = whereEventIsLinked((OccurrenceSpecification)event, timeElementEditPart);
- if(position1 != PositionConstants.NONE) {
- occSpec1 = (OccurrenceSpecification)event;
- yLocation1 = getLocation(bounds, position1).y;
- }
- }
- } else if(timeElement instanceof DurationConstraint) {
- Iterator<Element> it = ((DurationConstraint)timeElement).getConstrainedElements().iterator();
- while(it.hasNext() && (occSpec1 == null || occSpec2 == null)) {
- Element elem = it.next();
- if(elem instanceof OccurrenceSpecification && occSpec1 != null) {
- int position2 = whereEventIsLinked((OccurrenceSpecification)elem, timeElementEditPart);
- if(position2 != PositionConstants.NONE) {
- occSpec2 = (OccurrenceSpecification)elem;
- yLocation2 = getLocation(bounds, position2).y;
- }
- } else if(elem instanceof OccurrenceSpecification) {
- int position1 = whereEventIsLinked((OccurrenceSpecification)elem, timeElementEditPart);
- if(position1 != PositionConstants.NONE) {
- occSpec1 = (OccurrenceSpecification)elem;
- yLocation1 = getLocation(bounds, position1).y;
- }
- }
- }
- }
- if(occSpec1 != null) {
- List<EditPart> notToMoveEditParts = Collections.singletonList(hostEditPart);
- Command cmd = getMoveOccurrenceSpecificationsCommand(occSpec1, occSpec2, yLocation1, yLocation2, lifelinePart, notToMoveEditParts);
- if(cmd != null) {
- return moveCommand.chain(cmd);
- }
- }
- }
- return null;
- }
-
- /**
- * Make the request to reconnect the connection
- *
- * @param connection
- * connection part
- * @param isSource
- * true if the source must be reconnect, false for target
- * @param location
- * the location where to reconnect
- * @param partToReconnectTo
- * the part which the connection must be reconnected to (or null if unknown or of no importance)
- * @return the reconnection request
- */
- @SuppressWarnings("unchecked")
- private static ReconnectRequest makeReconnectRequest(ConnectionEditPart connection, boolean isSource, Point location, EditPart partToReconnectTo) {
- // Obtain the target edit part
- EditPart targetEP = partToReconnectTo;
- String type;
- if(isSource) {
- type = RequestConstants.REQ_RECONNECT_SOURCE;
- if(targetEP == null) {
- targetEP = connection.getSource();
- }
- } else {
- type = RequestConstants.REQ_RECONNECT_TARGET;
- if(targetEP == null) {
- targetEP = connection.getTarget();
- }
- }
-
- // Create and set the properties of the request
- ReconnectRequest reconnReq = new ReconnectRequest();
- reconnReq.setConnectionEditPart(connection);
- reconnReq.setLocation(location);
- reconnReq.setTargetEditPart(targetEP);
- reconnReq.setType(type);
- // add a parameter to bypass the move impact to avoid infinite loop
- reconnReq.getExtendedData().put(SequenceRequestConstant.DO_NOT_MOVE_EDIT_PARTS, true);
-
- // Return the request
- return reconnReq;
- }
-
- /**
- * Get the location on the bounds
- *
- * @param bounds
- * the rectangle bounds
- * @param position
- * one of {@link PositionConstants#TOP}, {@link PositionConstants#CENTER}, {@link PositionConstants#BOTTOM}
- * @return the point at the given position or null if position is incorrect
- */
- private static Point getLocation(Rectangle bounds, int position) {
- if(position == PositionConstants.TOP) {
- return bounds.getTop();
- } else if(position == PositionConstants.CENTER) {
- return bounds.getCenter();
- } else if(position == PositionConstants.BOTTOM) {
- return bounds.getBottom();
- }
- return null;
- }
-
- /**
- * The position of the host where the event is linked
- *
- * @param event
- * the occurrence specification
- * @param hostEditPart
- * the host edit part which is linked to the occurrence specification
- * @return one of {@link PositionConstants#TOP}, {@link PositionConstants#CENTER}, {@link PositionConstants#BOTTOM},
- * {@link PositionConstants#NONE}
- */
- private static int whereEventIsLinked(OccurrenceSpecification event, EditPart hostEditPart) {
- if(hostEditPart instanceof IBorderItemEditPart) {
- return SequenceUtil.positionWhereEventIsLinkedToPart(event, (IBorderItemEditPart)hostEditPart);
- }
- return PositionConstants.NONE;
- }
-
- /**
- * Get the occurrence specification which correspond to the moved general ordering end
- *
- * @param request
- * the general odering reconnection request
- * @return moved OccurrenceSpecification or null
- */
- private static OccurrenceSpecification getOccurrenceSpecificationFromReconnectGeneralOrdering(ReconnectRequest request) {
- if(request.getConnectionEditPart() instanceof ConnectionEditPart) {
- EObject generalOrdering = ((ConnectionEditPart)request.getConnectionEditPart()).resolveSemanticElement();
- if(generalOrdering instanceof GeneralOrdering) {
- if(RequestConstants.REQ_RECONNECT_SOURCE.equals(request.getType())) {
- return ((GeneralOrdering)generalOrdering).getBefore();
- } else if(RequestConstants.REQ_RECONNECT_TARGET.equals(request.getType())) {
- return ((GeneralOrdering)generalOrdering).getAfter();
- }
- }
- }
- return null;
- }
-
- /**
- * Get the message end which correspond to the moved message end
- *
- * @param request
- * the message reconnection request
- * @return moved MessageEnd or null
- */
- private static MessageEnd getMessageEndFromReconnectMessage(ReconnectRequest request) {
- if(request.getConnectionEditPart() instanceof ConnectionEditPart) {
- EObject message = ((ConnectionEditPart)request.getConnectionEditPart()).resolveSemanticElement();
- if(message instanceof Message) {
- if(RequestConstants.REQ_RECONNECT_SOURCE.equals(request.getType())) {
- return ((Message)message).getSendEvent();
- } else if(RequestConstants.REQ_RECONNECT_TARGET.equals(request.getType())) {
- return ((Message)message).getReceiveEvent();
- }
- }
- }
- return null;
- }
-
- /**
- * Know whether this time element part can be moved within the lifeline or not.
- * Parts linked with a destruction event can not be moved since the destruction event is always at the end.
- *
- * @param timeElementPart
- * the part representing a time/duration constraint/observation
- * @return true if the part can be moved
- */
- public static boolean canTimeElementPartBeYMoved(IBorderItemEditPart timeElementPart) {
- EObject timeElement = timeElementPart.resolveSemanticElement();
- List<? extends Element> occurrences = Collections.emptyList();
- if(timeElement instanceof TimeObservation) {
- NamedElement occurence = ((TimeObservation)timeElement).getEvent();
- occurrences = Collections.singletonList(occurence);
- } else if(timeElement instanceof TimeConstraint || timeElement instanceof DurationConstraint) {
- occurrences = ((IntervalConstraint)timeElement).getConstrainedElements();
- }
- // check whether one of the time occurrences correspond to a DestructionEvent
- for(Element occurrence : occurrences) {
- if(occurrence instanceof DestructionOccurrenceSpecification) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Get a command which refreshes the bordered layout of the node.
- *
- * @param node
- * the node figure with bordered items (including time-related parts)
- * @param onUndo
- * if true the relayout will be done on undo only, if false it will be done on classic execute only
- * @return the refresh command
- */
- private static Command getReLayoutCmd(BorderedNodeFigure node, boolean onUndo) {
- // relayout the border container figure so that time elements are refreshed
- final IFigure container = node.getBorderItemContainer();
-
- if(onUndo) {
- return new Command() {
-
- @Override
- public void undo() {
- container.getLayoutManager().layout(container);
- }
- };
- } else {
- return new Command() {
-
- @Override
- public void execute() {
- container.getLayoutManager().layout(container);
- }
- };
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperandBoundsComputeHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperandBoundsComputeHelper.java
deleted file mode 100644
index f52c251d9f0..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperandBoundsComputeHelper.java
+++ /dev/null
@@ -1,837 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-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.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-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.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-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.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-
-public class OperandBoundsComputeHelper {
-
- /**
- * Default height of Interaction Operand
- */
- public static final int DEFAULT_INTERACTION_OPERAND_HEIGHT = 61;
-
- public static final int MIN_INTERACTION_OPERAND_HEIGHT = 10;
- /**
- * Default width of Interaction Operand
- */
- public static final int DEFAULT_INTERACTION_OPERAND_WIDTH = 210;
- /**
- * Border width of CombinedFragmentFigure
- */
- public static final int COMBINED_FRAGMENT_FIGURE_BORDER = 1;
-
- /**
- * Find first Interaction Operand EditpPart of CombinedFragmentCombinedFragmentCompartmentEditPart
- * @param compartEP
- * @return InteractionOperandEditPart
- */
- public static InteractionOperandEditPart findFirstIOEP(
- CombinedFragmentCombinedFragmentCompartmentEditPart compartEP) {
- InteractionOperandEditPart firstIOEP = null;
- List children = compartEP.getChildren();
- for (int i = 0; i < children.size(); i++) {
- if (children.get(i) instanceof InteractionOperandEditPart) {
- firstIOEP = (InteractionOperandEditPart) children.get(i);
- break;
- }
- }
- return firstIOEP;
- }
-
- /**
- * Find Last Interaction Operand EditpPart of CombinedFragmentCombinedFragmentCompartmentEditPart
- * @param compartEP
- * @return InteractionOperandEditPart
- */
- public static InteractionOperandEditPart findLastIOEP(
- CombinedFragmentCombinedFragmentCompartmentEditPart compartEP) {
- InteractionOperandEditPart lastIOEP = null;
- List children = compartEP.getChildren();
- for (int i = children.size() - 1; i >= 0; i--) {
- if (children.get(i) instanceof InteractionOperandEditPart) {
- lastIOEP = (InteractionOperandEditPart) children.get(i);
- break;
- }
- }
- return lastIOEP;
- }
-
- /**
- * Find Previous Interaction Operand EditpPart of current given InteractionOperandEditPart
- * @param compartEP
- * @param currentIOEP
- * @return InteractionOperandEditPart
- */
- public static InteractionOperandEditPart findPreviousIOEP(
- CombinedFragmentCombinedFragmentCompartmentEditPart compartEP,
- InteractionOperandEditPart currentIOEP) {
- InteractionOperandEditPart previousIOEP = null;
- List children = compartEP.getChildren();
- for (int i = 0; i < children.size() - 1; i++) {
- if (children.get(i) instanceof InteractionOperandEditPart) {
- if (children.get(i) == currentIOEP) {
- break;
- } else {
- previousIOEP = (InteractionOperandEditPart) children.get(i);
- }
- }
- }
- return previousIOEP;
- }
-
- /**
- * Find Latter Interaction Operand EditpPart of current given InteractionOperandEditPart
- * @param compartEP
- * @param currentIOEP
- * @return InteractionOperandEditPart
- */
- public static InteractionOperandEditPart findLatterIOEP(
- CombinedFragmentCombinedFragmentCompartmentEditPart compartEP,
- InteractionOperandEditPart currentIOEP) {
- InteractionOperandEditPart latterIOEP = null;
- List children = compartEP.getChildren();
- for (int i = children.size() - 1; i > 0; i--) {
- if (children.get(i) instanceof InteractionOperandEditPart) {
- if (children.get(i) == currentIOEP) {
- break;
- } else {
- latterIOEP = (InteractionOperandEditPart) children.get(i);
- }
- }
- }
- return latterIOEP;
- }
-
- /**
- * Update EditPart bounds using new rect
- * @param parent
- * @param rect
- */
- public static void updateEditPartBounds(GraphicalEditPart editpart,
- final Rectangle rect) {
- if (editpart.getModel() instanceof Node) {
- Node node = (Node) editpart.getModel();
- if (node.getLayoutConstraint() instanceof Bounds) {
- Bounds bounds = (Bounds) node.getLayoutConstraint();
- updateBounds(bounds, rect, editpart.getEditingDomain());
- }
- }
- }
-
- /**
- * Update EditPart bounds using new rect
- * @param parent
- * @param rect
- */
- public static ICommand createUpdateEditPartBoundsCommand(
- final GraphicalEditPart editpart, final Rectangle rect) {
- ICommand cmd = new AbstractTransactionalCommand(
- editpart.getEditingDomain(),
- "Update Operand Bounds", null) {
- @Override
- protected CommandResult doExecuteWithResult(
- IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- if (editpart.getModel() instanceof Node) {
- Node node = (Node) editpart.getModel();
- if (node.getLayoutConstraint() instanceof Bounds) {
- Bounds bounds = (Bounds) node.getLayoutConstraint();
- fillBounds(bounds, rect);
- }
- }
- return CommandResult.newOKCommandResult();
- }
- };
- return cmd;
- }
-
- /**
- * Create command for updating Interaction Operand EditpPart bounds after the CombinedFragment to be created.
- * @param editPart
- * @param request
- * @return ICommand
- */
- public static ICommand createUpdateCFAndIOBoundsForCFCreationCommand(final EditPart editPart, final CreateViewRequest request) {
- if (!(editPart instanceof GraphicalEditPart)) {
- return null;
- }
- GraphicalEditPart graphicalEditPart= (GraphicalEditPart)editPart;
- ICommand cmd = new AbstractTransactionalCommand(graphicalEditPart.getEditingDomain(),"Create update operand bounds command",null) {
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- OperandBoundsComputeHelper.updateCFAndIOBoundsForCFCreation(
- (GraphicalEditPart) editPart, request);
- return CommandResult.newOKCommandResult();
- }
- };
- return cmd;
- }
-
- /**
- * Update Interaction Operand EditpPart bounds after the CombinedFragment to be created.
- * @param parent
- * @param request
- * @param selectionRect
- */
- private static void updateCFAndIOBoundsForCFCreation(GraphicalEditPart parent, CreateViewRequest request) {
- Object subEditPart = null;
- if (parent instanceof InteractionInteractionCompartmentEditPart) {
- InteractionInteractionCompartmentEditPart interactionInteractionCompartmentEditPart = (InteractionInteractionCompartmentEditPart) parent;
- subEditPart = interactionInteractionCompartmentEditPart
- .getChildren().get(
- interactionInteractionCompartmentEditPart
- .getChildren().size() - 1);
-
- }else if (parent instanceof InteractionOperandEditPart) {
- InteractionOperandEditPart interactionOperandEditPart = (InteractionOperandEditPart) parent;
- subEditPart = interactionOperandEditPart
- .getChildren().get(
- interactionOperandEditPart
- .getChildren().size() - 1);
- }
- if (subEditPart != null
- && subEditPart instanceof CombinedFragmentEditPart) {
- CombinedFragmentEditPart combinedFragmentEditPart = (CombinedFragmentEditPart) subEditPart;
- // set bounds for CombinedFragmentEditPart
- Rectangle cfEPAbsoluteRect = null;
- int labelContainerHeight = computeCombinedFragementHeaderHeight(combinedFragmentEditPart);
- Shape cfEPShape = (Shape) combinedFragmentEditPart.getModel();
- if (cfEPShape.getLayoutConstraint() instanceof Bounds) {
- if(request.getSize() == null){
- Dimension cfEPDefaultSize = new Dimension();
- cfEPDefaultSize.setWidth(DEFAULT_INTERACTION_OPERAND_WIDTH+COMBINED_FRAGMENT_FIGURE_BORDER*2);
- cfEPDefaultSize.setHeight(DEFAULT_INTERACTION_OPERAND_HEIGHT+labelContainerHeight+COMBINED_FRAGMENT_FIGURE_BORDER*2);
- cfEPAbsoluteRect = new Rectangle(request.getLocation(),cfEPDefaultSize);
- }else{
- cfEPAbsoluteRect = new Rectangle(request.getLocation(),request.getSize());
- }
- Rectangle cfEPRelativeRect = cfEPAbsoluteRect.getCopy();
- combinedFragmentEditPart.getFigure().translateToRelative(cfEPRelativeRect);
- Bounds cfEPBounds = (Bounds) cfEPShape.getLayoutConstraint();
- fillBounds(cfEPBounds,cfEPRelativeRect);
- }
-
- // set bounds for new added Operand
- InteractionOperandEditPart lastOperand = OperandBoundsComputeHelper
- .findLastIOEP((CombinedFragmentCombinedFragmentCompartmentEditPart) combinedFragmentEditPart.getChildBySemanticHint(UMLVisualIDRegistry
- .getType(CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID)));
- Shape shape = (Shape) lastOperand.getModel();
- if (shape.getLayoutConstraint() instanceof Bounds) {
- Bounds bounds = (Bounds) shape.getLayoutConstraint();
- Rectangle rect = new Rectangle(bounds.getX(), bounds.getY(),
- cfEPAbsoluteRect.width()-COMBINED_FRAGMENT_FIGURE_BORDER*2, cfEPAbsoluteRect.height()
- - labelContainerHeight-COMBINED_FRAGMENT_FIGURE_BORDER*2);
- fillBounds(bounds,rect);
- }
- }
- }
-
- /**
- * Create command for updating Interaction Operand EditpPart bounds after CombinedFragment to be resized.
- * @param compoundCmd
- * @param request
- * @param combinedFragmentEditPart
- * @return Command
- */
- public static Command createUpdateIOBoundsForCFResizeCommand(
- CompoundCommand compoundCmd, final ChangeBoundsRequest request,
- CombinedFragmentEditPart combinedFragmentEditPart) {
- if (combinedFragmentEditPart.getChildren().size() > 0
- && combinedFragmentEditPart.getChildren().get(0) instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
- CombinedFragmentCombinedFragmentCompartmentEditPart compartment = (CombinedFragmentCombinedFragmentCompartmentEditPart) combinedFragmentEditPart
- .getChildren().get(0);
- CombinedFragment cf = (CombinedFragment) ((CombinedFragmentEditPart) combinedFragmentEditPart)
- .resolveSemanticElement();
- InteractionOperandEditPart targetIOEP = null;
- if ((request.getResizeDirection() & PositionConstants.NORTH) != 0) {
- targetIOEP = findFirstIOEP(compartment);
- } else if ((request.getResizeDirection() & PositionConstants.SOUTH) != 0) {
- targetIOEP = findLastIOEP(compartment);
- }
- updateIOBoundsForCFResize(
- request,
- compoundCmd,
- compartment.getChildren(),
- cf,
- targetIOEP != null ? (InteractionOperand) targetIOEP
- .resolveSemanticElement() : null,
- request.getSizeDelta(), request.getResizeDirection());
- }
- return compoundCmd;
- }
-
- /**
- * Update Interaction Operand EditpPart bounds after CombinedFragment to be resized.
- * @param request
- * @param compoundCmd
- * @param combinedFragmentChildrenEditParts
- * @param cf
- * @param targetOperand
- * @param sizeDelta
- * @param direction
- */
- private static void updateIOBoundsForCFResize(final ChangeBoundsRequest request,
- CompoundCommand compoundCmd,
- List<EditPart> combinedFragmentChildrenEditParts,
- CombinedFragment cf, InteractionOperand targetOperand,
- final Dimension sizeDelta, int direction) {
- InteractionOperandEditPart targetOperandEditPart = findTargetOperandEditPart(
- cf, targetOperand, combinedFragmentChildrenEditParts);
- for (EditPart ep : combinedFragmentChildrenEditParts) {
- if (ep instanceof InteractionOperandEditPart) {
- InteractionOperandEditPart ioEP = (InteractionOperandEditPart) ep;
- Object ioEPModel = ioEP.getModel();
- if (ioEPModel instanceof Shape) {
- Shape ioEPShape = (Shape) ioEPModel;
- if (ioEPShape.getLayoutConstraint() instanceof Bounds) {
- final Bounds ioEPOriginalBounds = (Bounds) ioEPShape
- .getLayoutConstraint();
- ICommand cmd = new UpdateIOBoundsForCFResizeCommand(
- ioEP.getEditingDomain(),
- "Update operand bounds interaction command",
- ioEPOriginalBounds, request, sizeDelta,
- ioEP == targetOperandEditPart, direction);
- compoundCmd.add(new ICommandProxy(cmd));
- }
- }
- }
- }
-
- }
-
- /**
- * Update bounds using new rect
- * @param bounds
- * @param rect
- * @param transactionalEditingDomain
- */
- public static void updateBounds(final Bounds bounds, final Rectangle rect,
- TransactionalEditingDomain transactionalEditingDomain) {
- if (bounds != null) {
- final Rectangle originalBounds = new Rectangle();
- originalBounds.setX(bounds.getX());
- originalBounds.setY(bounds.getY());
- originalBounds.setWidth(bounds.getWidth());
- originalBounds.setHeight(bounds.getHeight());
- AbstractCommand cmd = new AbstractCommand() {
- public boolean canExecute() {
- return true;
- }
-
- public void execute() {
- exec(rect);
- }
-
- public void redo() {
- execute();
- }
-
- public void undo(){
- exec(originalBounds);
- }
-
- public void exec(Rectangle rect){
- fillBounds(bounds,rect);
- }
-
- public boolean canUndo() {
- return true;
- }
- };
- CommandHelper.executeCommandWithoutHistory(
- transactionalEditingDomain, cmd,true);
- }
- }
-
- /**
- * Get InteractionOperandEditPart from its model object InteractionOperand.
- * @param cf
- * @param targetOperand
- * @param combinedFragmentChildrenEditParts
- * @return InteractionOperandEditPart
- */
- public static InteractionOperandEditPart findTargetOperandEditPart(CombinedFragment cf,
- InteractionOperand targetOperand,
- List<EditPart> combinedFragmentChildrenEditParts) {
- if(targetOperand == null)
- return null;
- for(EditPart ep : combinedFragmentChildrenEditParts) {
- if(ep instanceof InteractionOperandEditPart) {
- InteractionOperandEditPart ioEP = (InteractionOperandEditPart)ep;
- InteractionOperand io = (InteractionOperand)ioEP.resolveSemanticElement();
- if(cf.getOperands().contains(io)) {
- if(targetOperand.equals(io)) {
- return ioEP;
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Get graphical edit part bounds
- * @param editPart
- * @return
- */
- public static Bounds getEditPartBounds(GraphicalEditPart editPart){
- if (editPart.getModel() instanceof Node) {
- Node node = (Node) editPart.getModel();
- if (node.getLayoutConstraint() instanceof Bounds) {
- Bounds bounds = (Bounds) node.getLayoutConstraint();
- return bounds;
- }
- }
- return null;
- }
-
- /**
- * Fill data from Bounds to Rectangle
- * @param source
- * @return Rectangle
- */
- public static Rectangle fillRectangle(Bounds source) {
- if (source == null) {
- return null;
- }
- Rectangle target = new Rectangle();
- target.setX(source.getX());
- target.setY(source.getY());
- target.setWidth(source.getWidth());
- target.setHeight(source.getHeight());
- return target;
- }
-
- /**
- * Fill data from Rectangle to Bounds
- * @param bounds
- * @param source
- * @return Bounds
- */
- public static Bounds fillBounds(Bounds bounds,Rectangle source) {
- if (bounds == null || source == null) {
- return null;
- }
- bounds.setX(source.x());
- bounds.setY(source.y());
- bounds.setWidth(source.width());
- bounds.setHeight(source.height());
- return bounds;
- }
-
- /**
- * Get interaction operand bounds
- * @param operandEP
- * @return Bounds
- */
- public static Bounds getInteractionOperandEPBounds(GraphicalEditPart operandEP){
- Object lastChildModel = operandEP.getModel();
- if (lastChildModel instanceof Shape) {
- Shape lastOperandShape = (Shape) lastChildModel;
- if (lastOperandShape.getLayoutConstraint() instanceof Bounds) {
- return (Bounds)lastOperandShape.getLayoutConstraint();
- }
- }
- return null;
- }
-
- /**
- * Create interaction operand resize command
- * @param currentIOEP
- * @param heightDelta
- * @param compartEP
- * @param direction
- * @return
- */
- public static Command createIOEPResizeCommand(
- InteractionOperandEditPart currentIOEP, int heightDelta,
- CombinedFragmentCombinedFragmentCompartmentEditPart compartEP,
- int direction) {
- Bounds currentIOEPBounds = OperandBoundsComputeHelper
- .getEditPartBounds(currentIOEP);
- if (currentIOEPBounds == null) {
- return null;
- }
- InteractionOperandEditPart targetIOEP = null;
- if ((direction & PositionConstants.NORTH) != 0) {
- targetIOEP = OperandBoundsComputeHelper.findPreviousIOEP(compartEP,
- currentIOEP);
- } else if ((direction & PositionConstants.SOUTH) != 0) {
- targetIOEP = OperandBoundsComputeHelper.findLatterIOEP(compartEP,
- currentIOEP);
- }
-
- CompositeCommand compositeCommand = new CompositeCommand(
- "Resize Operand");
- // if last operand
- if(targetIOEP == null){
- if (heightDelta < 0) {
- if (currentIOEPBounds.getHeight() - Math.abs(heightDelta) < OperandBoundsComputeHelper.MIN_INTERACTION_OPERAND_HEIGHT) {
- return null;
- }
- }
- Rectangle currentIOEPRect = OperandBoundsComputeHelper
- .fillRectangle(currentIOEPBounds);
- currentIOEPRect.setHeight(currentIOEPBounds.getHeight() + heightDelta);
- ICommand currentIOEPCommand = OperandBoundsComputeHelper
- .createUpdateEditPartBoundsCommand(currentIOEP, currentIOEPRect);
- compositeCommand.add(currentIOEPCommand);
- // auto update CombinedFragmentEditPart bounds after resize the last operand
- if(compartEP.getParent() instanceof CombinedFragmentEditPart){
- CombinedFragmentEditPart parent = (CombinedFragmentEditPart) compartEP.getParent();
- if (parent.getModel() instanceof Node) {
- Node node = (Node) parent.getModel();
- if (node.getLayoutConstraint() instanceof Bounds) {
- Bounds containerBounds = (Bounds) node
- .getLayoutConstraint();
- Dimension preferredSize = parent.getFigure().getPreferredSize();
- int width = containerBounds.getWidth()!=-1? containerBounds.getWidth() : preferredSize.width();
- int height = containerBounds.getHeight()!=-1? containerBounds.getHeight() : preferredSize.height();
- height = height + heightDelta;
- Rectangle containerRect = new Rectangle(containerBounds.getX(),containerBounds.getY(),width,height);
- compositeCommand.add(OperandBoundsComputeHelper.createUpdateEditPartBoundsCommand(parent, containerRect));
- }
- }
- }
- }else{
- Bounds targetIOEPBounds = OperandBoundsComputeHelper
- .getEditPartBounds(targetIOEP);
- if (targetIOEPBounds == null) {
- return null;
- }
- if (heightDelta > 0) {
- if (targetIOEPBounds.getHeight() - heightDelta < OperandBoundsComputeHelper.MIN_INTERACTION_OPERAND_HEIGHT) {
- return null;
- }
- } else {
- if (currentIOEPBounds.getHeight() - Math.abs(heightDelta) < OperandBoundsComputeHelper.MIN_INTERACTION_OPERAND_HEIGHT) {
- return null;
- }
- }
- Rectangle targetIOEPRect = OperandBoundsComputeHelper
- .fillRectangle(targetIOEPBounds);
- Rectangle currentIOEPRect = OperandBoundsComputeHelper
- .fillRectangle(currentIOEPBounds);
- targetIOEPRect.setHeight(targetIOEPBounds.getHeight() - heightDelta);
- currentIOEPRect.setHeight(currentIOEPBounds.getHeight() + heightDelta);
- if ((direction & PositionConstants.NORTH) != 0) {
- currentIOEPRect.setY(currentIOEPRect.y() - heightDelta);
- }else if ((direction & PositionConstants.SOUTH) != 0) {
- targetIOEPRect.setY(targetIOEPRect.y() + heightDelta);
- }
-
- ICommand previousIOEPCommand = OperandBoundsComputeHelper
- .createUpdateEditPartBoundsCommand(targetIOEP, targetIOEPRect);
- ICommand currentIOEPCommand = OperandBoundsComputeHelper
- .createUpdateEditPartBoundsCommand(currentIOEP, currentIOEPRect);
-
- compositeCommand.add(previousIOEPCommand);
- compositeCommand.add(currentIOEPCommand);
- }
-
- return new ICommandProxy(compositeCommand);
- }
-
- /**
- * Compute CombinedFragement's header height
- * @param combinedFragmentEditPart
- * @return int
- */
- public static int computeCombinedFragementHeaderHeight(
- CombinedFragmentEditPart combinedFragmentEditPart) {
- int headerHeight = 0;
- IFigure labelContainer = combinedFragmentEditPart.getPrimaryShape().getHeaderLabel().getParent();
- if(labelContainer!=null){
- headerHeight = labelContainer.getPreferredSize().height();
- }
- return headerHeight;
- }
-
- /**
- * Check if operation resizing on CombinedFragment is allowed
- * @param request
- * @param child
- * @return boolean
- */
- public static boolean checkRedistrictOnCFResize(ChangeBoundsRequest request,
- EditPart child) {
- if(child instanceof CombinedFragmentEditPart){
- if ((request.getResizeDirection() & PositionConstants.NORTH_SOUTH) != 0) {
- CombinedFragmentEditPart combinedFragmentEditPart = (CombinedFragmentEditPart)child;
- if (combinedFragmentEditPart.getChildren().size() > 0
- && combinedFragmentEditPart.getChildren()
- .get(0) instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
- CombinedFragmentCombinedFragmentCompartmentEditPart compartment = (CombinedFragmentCombinedFragmentCompartmentEditPart) combinedFragmentEditPart
- .getChildren().get(0);
- List<EditPart> combinedFragmentChildrenEditParts = compartment
- .getChildren();
- CombinedFragment cf = (CombinedFragment) ((CombinedFragmentEditPart) combinedFragmentEditPart)
- .resolveSemanticElement();
- InteractionOperand targetOperand = null;
- if ((request.getResizeDirection() & PositionConstants.NORTH) != 0) {
- targetOperand = cf.getOperands().get(0);
- } else if ((request.getResizeDirection() & PositionConstants.SOUTH) != 0) {
- targetOperand = cf.getOperands().get(
- cf.getOperands().size() - 1);
- }
- InteractionOperandEditPart targetOperandEditPart = OperandBoundsComputeHelper.findTargetOperandEditPart(
- cf, targetOperand, combinedFragmentChildrenEditParts);
- int heightDelta = request.getSizeDelta().height();
- if(targetOperandEditPart!=null && heightDelta<0){
- int height = targetOperandEditPart.getFigure().getBounds().height();
- if(height-Math.abs(heightDelta) < OperandBoundsComputeHelper.MIN_INTERACTION_OPERAND_HEIGHT){
- return false;
- }
- }
- }
- }
- }
- return true;
- }
-
- /**
- * Add command for updating adjacent interaction operand bounds after deleting a interaction operand
- * @param editPart
- * @param cmd
- */
- public static void addUpdateBoundsCommandForOperandDelelete(EditPart editPart,ICompositeCommand cmd) {
- if(editPart instanceof InteractionOperandEditPart){
- if(editPart.getParent() instanceof CombinedFragmentCombinedFragmentCompartmentEditPart){
- CombinedFragmentCombinedFragmentCompartmentEditPart compartment = (CombinedFragmentCombinedFragmentCompartmentEditPart)editPart.getParent();
- if(compartment.getParent() instanceof CombinedFragmentEditPart){
- List<EditPart> combinedFragmentChildrenEditParts = compartment
- .getChildren();
- InteractionOperandEditPart previousIOEP = null;
- InteractionOperandEditPart latterIOEP = null;
- boolean isFirstOperand = false;
-
- InteractionOperandEditPart currentioEP = (InteractionOperandEditPart)editPart;
- final Rectangle currentioEPBounds = currentioEP.getFigure().getBounds();
-
- for(int i = 0;i<combinedFragmentChildrenEditParts.size();i++) {
- EditPart ep = combinedFragmentChildrenEditParts.get(i);
- if(ep instanceof InteractionOperandEditPart) {
- InteractionOperandEditPart ioEP = (InteractionOperandEditPart)ep;
- if(currentioEP == ioEP){
- if(previousIOEP!=null){
- Object previousIOEPModel = previousIOEP.getModel();
- if (previousIOEPModel instanceof Shape) {
- Shape previousIOEPShape = (Shape) previousIOEPModel;
- if (previousIOEPShape.getLayoutConstraint() instanceof Bounds) {
- final Bounds previousIOEPOriginalBounds = (Bounds) previousIOEPShape.getLayoutConstraint();
- ICommand command = new AbstractTransactionalCommand(previousIOEP.getEditingDomain(),"Merge operand bounds command",null){
- @Override
- protected CommandResult doExecuteWithResult(
- IProgressMonitor monitor,
- IAdaptable info)
- throws ExecutionException {
- previousIOEPOriginalBounds.setHeight(previousIOEPOriginalBounds.getHeight() + currentioEPBounds.height());
- return CommandResult.newOKCommandResult();
- }
- };
- cmd.add(command);
- }
- }
- break;
- }else{
- isFirstOperand = true;
- continue;
- }
- }else{
- previousIOEP = ioEP;
- }
- if(isFirstOperand){
- latterIOEP = ioEP;
- break;
- }
- }
- }
- if(isFirstOperand && latterIOEP!=null){
- Object latterIOEPModel = latterIOEP.getModel();
- if (latterIOEPModel instanceof Shape) {
- Shape latterIOEPShape = (Shape) latterIOEPModel;
- if (latterIOEPShape.getLayoutConstraint() instanceof Bounds) {
- final Bounds latterIOEPOriginalBounds = (Bounds) latterIOEPShape.getLayoutConstraint();
- ICommand command = new AbstractTransactionalCommand(previousIOEP.getEditingDomain(),"Merge operand bounds command",null){
- @Override
- protected CommandResult doExecuteWithResult(
- IProgressMonitor monitor,
- IAdaptable info)
- throws ExecutionException {
- latterIOEPOriginalBounds.setY(0);
- latterIOEPOriginalBounds.setHeight(latterIOEPOriginalBounds.getHeight() + currentioEPBounds.height());
- return CommandResult.newOKCommandResult();
- }
- };
- cmd.add(command);
- }
- }
- }
- }
- }
- }
-
- }
-
- /**
- * Add update InteractionOperand bounds command after IO is created
- * @param compartment
- * @param request
- * @param command
- */
- public static void addUpdateBoundsForIOCreationCommand(
- CombinedFragmentCombinedFragmentCompartmentEditPart compartment, ViewDescriptor viewDescriptor,
- CompositeCommand command) {
- List children = compartment.getChildren();
- if (children != null && children.size() > 0) {
- InteractionOperandEditPart lastOperandEP = OperandBoundsComputeHelper.findLastIOEP(compartment);
- // update bounds
- if (lastOperandEP != null) {
- Bounds lastOperandBounds = OperandBoundsComputeHelper.getInteractionOperandEPBounds(lastOperandEP);
- if (lastOperandBounds!= null) {
- Rectangle rect = new Rectangle(
- lastOperandBounds.getX(),
- lastOperandBounds.getY()+lastOperandBounds.getHeight(), lastOperandBounds.getWidth(), OperandBoundsComputeHelper.DEFAULT_INTERACTION_OPERAND_HEIGHT);
- // auto update CombinedFragmentEditPart bounds after added new operand
- if(compartment.getParent() instanceof CombinedFragmentEditPart){
- CombinedFragmentEditPart parent = (CombinedFragmentEditPart) compartment
- .getParent();
- if (parent.getModel() instanceof Node) {
- Node node = (Node) parent.getModel();
- if (node.getLayoutConstraint() instanceof Bounds) {
- Bounds containerBounds = (Bounds) node.getLayoutConstraint();
- Dimension preferredSize = parent.getFigure().getPreferredSize();
- int width = containerBounds.getWidth()!=-1? containerBounds.getWidth() : preferredSize.width();
- int height = containerBounds.getHeight()!=-1? containerBounds.getHeight() : preferredSize.height();
- height = height + OperandBoundsComputeHelper.DEFAULT_INTERACTION_OPERAND_HEIGHT;
- View shapeView = (View) parent.getModel();
- ICommand setParentBoundsCmd = new SetBoundsCommand(compartment.getEditingDomain(),
- DiagramUIMessages.SetLocationCommand_Label_Resize,
- new EObjectAdapter(shapeView), new Rectangle(containerBounds.getX(),containerBounds.getY(),width,height));
- command.add(setParentBoundsCmd);
- }
- }
- }
- command.add(new SetBoundsCommand(compartment.getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize, viewDescriptor, rect));
- }
- }
- }else{ // first add operand
- if(compartment.getParent() instanceof CombinedFragmentEditPart){
- CombinedFragmentEditPart parent = (CombinedFragmentEditPart) compartment
- .getParent();
- if (parent.getModel() instanceof Node) {
- Node node = (Node) parent.getModel();
- if (node.getLayoutConstraint() instanceof Bounds) {
- Bounds containerBounds = (Bounds) node.getLayoutConstraint();
- Dimension preferredSize = parent.getFigure().getPreferredSize();
- int width = containerBounds.getWidth()!=-1? containerBounds.getWidth() : preferredSize.width();
- int height = containerBounds.getHeight()!=-1? containerBounds.getHeight() : preferredSize.height();
- height = height - computeCombinedFragementHeaderHeight(parent);
- command.add(new SetBoundsCommand(compartment.getEditingDomain(), DiagramUIMessages.SetLocationCommand_Label_Resize, viewDescriptor, new Rectangle(0,0,width-COMBINED_FRAGMENT_FIGURE_BORDER*2,height-COMBINED_FRAGMENT_FIGURE_BORDER*2)));
- }
- }
- }
- }
- }
-
- /**
- * Check if it is a combined fragment.
- *
- * @param hint
- * the semantic hint
- * @return
- */
- public static boolean isDerivedCombinedFragment(String hint) {
- if(((IHintedType)UMLElementTypes.CombinedFragment_3004).getSemanticHint().equals(hint)) {
- return true;
- }
- if(((IHintedType)UMLElementTypes.ConsiderIgnoreFragment_3007).getSemanticHint().equals(hint)) {
- return true;
- }
- return false;
- }
-
- /**
- * Command class for updating Interaction Operand EditpPart bounds after CombinedFragment to be resized.
- *
- */
- private static final class UpdateIOBoundsForCFResizeCommand extends
- AbstractTransactionalCommand {
- private final Bounds ioEPOriginalBounds;
- private final ChangeBoundsRequest request;
- private final Dimension sizeDelta;
- private boolean updateHeight = false;
- private int direction;
-
- private UpdateIOBoundsForCFResizeCommand(TransactionalEditingDomain domain,
- String label, Bounds ioEPOriginalBounds,
- ChangeBoundsRequest request, Dimension sizeDelta,
- boolean updateHeight, int direction) {
- super(domain, label, null);
- this.ioEPOriginalBounds = ioEPOriginalBounds;
- this.request = request;
- this.sizeDelta = sizeDelta;
- this.updateHeight = updateHeight;
- this.direction = direction;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- if (updateHeight) {
- ioEPOriginalBounds.setHeight(ioEPOriginalBounds.getHeight()
- + sizeDelta.height());
- } else if ((direction & PositionConstants.NORTH) != 0) {
- ioEPOriginalBounds.setY(ioEPOriginalBounds.getY()
- + sizeDelta.height());
- }
- if ((request.getResizeDirection() & PositionConstants.EAST_WEST) != 0) {
- ioEPOriginalBounds.setWidth(ioEPOriginalBounds.getWidth()
- + sizeDelta.width());
- }
-
- return CommandResult.newOKCommandResult();
- }
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/PreferencesModelElementFactory.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/PreferencesModelElementFactory.java
deleted file mode 100644
index 298a508db92..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/PreferencesModelElementFactory.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
-import org.eclipse.papyrus.views.properties.modelelement.ModelElement;
-import org.eclipse.papyrus.views.properties.modelelement.ModelElementFactory;
-import org.eclipse.papyrus.views.properties.modelelement.PreferencesModelElement;
-
-
-public class PreferencesModelElementFactory implements ModelElementFactory {
-
- public ModelElement createFromSource(Object sourceElement, DataContextElement context) {
- return new PreferencesModelElement(context);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/ReconnectMessageHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/ReconnectMessageHelper.java
deleted file mode 100644
index 5eeb317ca74..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/ReconnectMessageHelper.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.Gate;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.InteractionOperatorKind;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.MessageSort;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * An helper class to reconnect message.
- * TODO : finish the implementation of this class
- */
-public class ReconnectMessageHelper {
-
- /**
- * Update Message :
- * - Update its signature
- *
- * @param message
- */
- public static void updateMessage(Message message) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * Update the message end :
- *
- * @param messageEnd
- * @param oldElement
- * @param newElement
- */
- public static void updateMessageEnd(MessageEnd messageEnd, Element oldElement, Element newElement) {
- if(messageEnd instanceof MessageOccurrenceSpecification) {
- updateMos((MessageOccurrenceSpecification)messageEnd, oldElement, newElement);
- } else if(messageEnd instanceof Gate) {
- updateGate((Gate)messageEnd, oldElement, newElement);
- }
- }
-
- public static void updateGate(Gate messageEnd, Element oldElement, Element newElement) {
- // TODO Auto-generated method stub
-
- }
-
- public static void updateMos(MessageOccurrenceSpecification messageEnd, Element oldElement, Element newElement) {
- if(newElement instanceof Lifeline && !(oldElement instanceof CombinedFragment && InteractionOperatorKind.PAR_LITERAL.equals(((CombinedFragment)oldElement).getInteractionOperator()))) {
- updateOccurenceSpecification(messageEnd, (Lifeline)newElement);
- } else if(newElement instanceof ExecutionSpecification && !(oldElement instanceof CombinedFragment && InteractionOperatorKind.PAR_LITERAL.equals(((CombinedFragment)oldElement).getInteractionOperator()))) {
- Lifeline lifeline = CommandHelper.getExecutionSpecificationLifeline((ExecutionSpecification)newElement);
- if(lifeline != null) {
- updateOccurenceSpecification(messageEnd, lifeline);
- }
- } else if(newElement instanceof CombinedFragment && InteractionOperatorKind.PAR_LITERAL.equals(((CombinedFragment)newElement).getInteractionOperator())) {
- // handle reorient on coregion
- CombinedFragment cf = (CombinedFragment)newElement;
- InteractionOperand io = CommandHelper.getCoRegionInteractionOperand(cf);
- messageEnd.setEnclosingOperand(io);
-
- // try to find and put in the operand the other mos of the message
- MessageEnd messageEnd2 = findSecondMessageEnd(messageEnd);
-
- if(messageEnd2 instanceof MessageOccurrenceSpecification) {
- ((MessageOccurrenceSpecification)messageEnd2).setEnclosingOperand(io);
- }
- // update interaction operands covered lifelines
- updateCoveredLifelinesOfCoregionOperand(cf);
- } else if(oldElement instanceof CombinedFragment && InteractionOperatorKind.PAR_LITERAL.equals(((CombinedFragment)oldElement).getInteractionOperator())) {
- // handle reorient from coregion
- CombinedFragment cf = (CombinedFragment)oldElement;
- Element backInteraction = cf.getOwner();
-
- SequenceUtil.setEnclosingInteraction(messageEnd, backInteraction, true);
-
- MessageEnd messageEnd2 = findSecondMessageEnd(messageEnd);
- if(messageEnd2 instanceof MessageOccurrenceSpecification) {
- SequenceUtil.setEnclosingInteraction((MessageOccurrenceSpecification)messageEnd2, backInteraction, true);
- }
- // update interaction operands covered lifelines
- updateCoveredLifelinesOfCoregionOperand(cf);
- }
- }
-
- public static MessageEnd findSecondMessageEnd(MessageEnd messageEnd) {
- Message msg = messageEnd.getMessage();
-
- MessageEnd messageEnd2 = null;
- if(msg != null) {
- if(messageEnd.equals(msg.getSendEvent())) {
- messageEnd2 = msg.getReceiveEvent();
- } else {
- messageEnd2 = msg.getSendEvent();
- }
- }
- return messageEnd2;
- }
-
-
- /**
- * OccurrenceSpecification cover a unique lifeline.
- *
- * @param os
- * the occurrence specification to update
- * @param newLifeline
- * the new lifeline covered by the OS
- */
- public static void updateOccurenceSpecification(OccurrenceSpecification os, Lifeline newLifeline) {
-
- // An occurrence specification covers a unique lifeline
- os.getCovereds().clear();
- os.getCovereds().add(newLifeline);
- }
-
- /**
- * Update the list of lifelines covered by the Interaction Operands of a coregion.
- * These are the lifelines covered by all contained Message Occurrence Specifications.
- *
- * @param coregion
- * the coregion to update operands
- */
- public static void updateCoveredLifelinesOfCoregionOperand(CombinedFragment coregion) {
- coregion.getCovereds().clear();
- for(InteractionOperand operand : coregion.getOperands()) {
- operand.getCovereds().clear();
- for(InteractionFragment fragment : operand.getFragments()) {
- if(fragment instanceof MessageOccurrenceSpecification) {
- operand.getCovereds().addAll(fragment.getCovereds());
- coregion.getCovereds().addAll(fragment.getCovereds());
- }
- }
- }
- }
-
- /**
- * It seems that OCL constraints can not hold everything about reconnecting messages.
- *
- * @param message
- * @param newTarget
- */
- public static boolean canReorientTarget(Message message, Element newTarget) {
- if(message == null || newTarget == null) {
- return false;
- }
- MessageSort messageSort = message.getMessageSort();
- if(MessageSort.SYNCH_CALL_LITERAL == messageSort) {
- return newTarget instanceof ExecutionSpecification;
- }
- return true;
- }
-
- public static boolean canReorientSource(Message message, Element newSource) {
- if(message == null || newSource == null) {
- return false;
- }
- MessageSort messageSort = message.getMessageSort();
- if(MessageSort.SYNCH_CALL_LITERAL == messageSort) {
- return newSource instanceof ExecutionSpecification;
- }
- return true;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SelectOrCreateDialog.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SelectOrCreateDialog.java
deleted file mode 100644
index 3d68a6f0024..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SelectOrCreateDialog.java
+++ /dev/null
@@ -1,647 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.eclipse.ui.forms.FormDialog;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Reception;
-import org.eclipse.uml2.uml.Signal;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * This class provides a generic dialog to select or create an element.
- */
-public class SelectOrCreateDialog extends FormDialog {
-
- private EObject selectedElement = null;
-
- private EClass selectedType = null;
-
- private String selectedName = null;
-
- private EObject selectedParent = null;
-
- private Collection<EObject> existingElements;
-
- private LinkedHashMap<EClass, List<EObject>> mapTypesPossibleParents;
-
- private Button nothingRadio;
-
- private Button selectionRadio;
-
- private Text selectionText;
-
- private Button selectionButton;
-
- private Button creationRadio;
-
- private Text creationNameText;
-
- private ComboViewer typeComboViewer = null;
-
- private Combo creationTypeCombo = null;
-
- private Button creationParentButton;
-
- private Text creationParentText;
-
- private String title;
-
- private ILabelProvider typeLabelProvider;
-
- private ILabelProvider elementLabelProvider;
-
- private final TransactionalEditingDomain transactionalEditingDomain;
-
- private Button filterSignalButton;
-
- private List<Type> types;
-
- /**
- *
- * @param shell
- * parent shell
- * @param title
- * The title of the dialog
- * @param typeLabelProvider
- * The label provider to generate type label
- * @param elementLabelProvider
- * The label provider to generate elements label
- * @param transactionalEditingDomain
- * The domain where to create the element if necessary.
- * @param existingElements
- * The list of existing elements that can be selected.
- * @param mapTypesPossibleParents
- * The map of possible types for the element
- * and the possible parents where the element
- * can be created.
- * @param types
- */
- public SelectOrCreateDialog(Shell shell, String title, ILabelProvider typeLabelProvider, ILabelProvider elementLabelProvider, TransactionalEditingDomain transactionalEditingDomain, Collection<EObject> existingElements, LinkedHashMap<EClass, List<EObject>> mapTypesPossibleParents, List<Type> types) {
- super(shell);
- this.typeLabelProvider = typeLabelProvider;
- this.elementLabelProvider = elementLabelProvider;
- this.existingElements = existingElements;
- this.mapTypesPossibleParents = mapTypesPossibleParents;
- this.title = title;
- this.transactionalEditingDomain = transactionalEditingDomain;
- this.types = types;
- }
-
- /**
- * Adds buttons to this dialog's button bar.
- *
- * @param parent
- * the button bar composite
- */
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- super.createButtonsForButtonBar(parent);
- refreshOkButton();
- }
-
- /**
- * Create the form to :
- *
- * - ask the user to select or create an element.
- *
- * - decide whether the action is synchronous.
- *
- * @see org.eclipse.ui.forms.FormDialog#createFormContent(org.eclipse.ui.forms.IManagedForm)
- */
- @Override
- protected void createFormContent(IManagedForm pForm) {
- ScrolledForm scrolledForm = pForm.getForm();
- scrolledForm.setText(title);
-
- FormToolkit toolkit = pForm.getToolkit();
- Composite parent = scrolledForm.getBody();
- parent.setLayout(new GridLayout());
-
- // Create the selection section
- createSelectionSection(scrolledForm.getBody(), toolkit);
- // Create the creation section
- createCreationSection(scrolledForm.getBody(), toolkit);
-
-
- // Create the nothing section
- createNothingSection(scrolledForm.getBody(), toolkit);
-
-
- refreshSectionsEnable(selectionRadio);
- hookListeners();
-
- // name is set after listeners, since we count on listener to update it properly
- setName(null);
-
- scrolledForm.reflow(true);
- }
-
- private void createNothingSection(Composite pParent, FormToolkit pToolkit) {
- // create the section
- Section lSection = pToolkit.createSection(pParent, Section.EXPANDED | Section.TITLE_BAR);
- lSection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
-
- ScrolledForm lInsideScrolledForm = pToolkit.createScrolledForm(lSection);
- lInsideScrolledForm.setExpandHorizontal(true);
- lInsideScrolledForm.setExpandVertical(true);
- Composite lBody = lInsideScrolledForm.getBody();
-
- lBody.setLayout(new GridLayout(1, false));
-
- // content of the section
- nothingRadio = pToolkit.createButton(lBody, Messages.SelectOrCreateDialog_NothingLabel, SWT.RADIO);
- nothingRadio.setSelection(true);
- nothingRadio.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
-
- lInsideScrolledForm.reflow(true);
- lSection.setClient(lInsideScrolledForm);
- }
-
- /**
- * Create the section to ask the user to select or create an element.
- *
- * @param pParent
- * the section's parent widget
- * @param pToolkit
- * the form toolkit
- */
- private void createSelectionSection(Composite pParent, FormToolkit pToolkit) {
- // create the section
- Section lSection = pToolkit.createSection(pParent, Section.EXPANDED | Section.TITLE_BAR);
- lSection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
-
- ScrolledForm lInsideScrolledForm = pToolkit.createScrolledForm(lSection);
- lInsideScrolledForm.setExpandHorizontal(true);
- lInsideScrolledForm.setExpandVertical(true);
- Composite lBody = lInsideScrolledForm.getBody();
-
- lBody.setLayout(new GridLayout(3, false));
-
- // content of the section
- selectionRadio = pToolkit.createButton(lBody, Messages.SelectOrCreateDialog_SelectLabel, SWT.RADIO);
- selectionRadio.setSelection(true);
- selectionRadio.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
-
- selectionText = pToolkit.createText(lBody, "", SWT.BORDER | SWT.READ_ONLY); //$NON-NLS-1$
- selectionText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
- selectionButton = pToolkit.createButton(lBody, "...", SWT.FLAT); //$NON-NLS-1$
-
- // find the first non null eobject and use its associated image
- if(existingElements != null) {
- Iterator<EObject> it = existingElements.iterator();
- while(it.hasNext()) {
- EObject next = it.next();
- if(next != null) {
- selectionButton.setImage(UMLElementTypes.getImage(next.eClass()));
- break;
- }
- }
- }
-
- selectionButton.setLayoutData(new GridData(SWT.NONE));
-
- filterSignalButton = pToolkit.createButton(lBody, "filter out all signals which are not receivable", SWT.CHECK);
-
- lInsideScrolledForm.reflow(true);
- lSection.setClient(lInsideScrolledForm);
- }
-
- /**
- * Create the section to ask the user to select or create an element.
- *
- * @param pParent
- * the section's parent widget
- * @param pToolkit
- * the form toolkit
- */
- private void createCreationSection(Composite pParent, FormToolkit pToolkit) {
- // create the section
- Section lSection = pToolkit.createSection(pParent, Section.EXPANDED | Section.TITLE_BAR);
- lSection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
-
- ScrolledForm lInsideScrolledForm = pToolkit.createScrolledForm(lSection);
- lInsideScrolledForm.setExpandHorizontal(true);
- lInsideScrolledForm.setExpandVertical(true);
- Composite lBody = lInsideScrolledForm.getBody();
-
- lBody.setLayout(new GridLayout(3, false));
-
- // content of the section
- creationRadio = pToolkit.createButton(lBody, Messages.SelectOrCreateDialog_CreateLabel, SWT.RADIO);
- creationRadio.setSelection(false);
- creationRadio.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
-
- EClass defaultType = null;
- Set<EClass> possibleTypes = mapTypesPossibleParents.keySet();
-
- // only create the type selection buttons if more than one type
- // is possible
- if(possibleTypes.size() == 1) {
- defaultType = (EClass)possibleTypes.toArray()[0];
- } else {
- pToolkit.createLabel(lBody, Messages.SelectOrCreateDialog_TypeLabel, SWT.NONE);
- creationTypeCombo = new Combo(lBody, SWT.DROP_DOWN | SWT.READ_ONLY);
- typeComboViewer = new ComboViewer(creationTypeCombo);
- pToolkit.adapt(creationTypeCombo);
- creationTypeCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
- typeComboViewer.setLabelProvider(typeLabelProvider);
- typeComboViewer.add(possibleTypes.toArray());
- if(possibleTypes.size() > 1) {
- // initialize selection
- defaultType = (EClass)possibleTypes.toArray()[0];
- typeComboViewer.setSelection(new StructuredSelection(defaultType));
- }
- }
-
- pToolkit.createLabel(lBody, Messages.SelectOrCreateDialog_NameLabel, SWT.NONE);
- creationNameText = pToolkit.createText(lBody, "", SWT.BORDER); //$NON-NLS-1$
- creationNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
-
- pToolkit.createLabel(lBody, Messages.SelectOrCreateDialog_OwnerLabel + ":", SWT.NONE); //$NON-NLS-1$
- creationParentText = pToolkit.createText(lBody, elementLabelProvider.getText(selectedParent), SWT.BORDER | SWT.READ_ONLY);
- creationParentText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- creationParentButton = pToolkit.createButton(lBody, "...", SWT.FLAT); //$NON-NLS-1$
- creationParentButton.setLayoutData(new GridData(SWT.NONE));
-
- setType(defaultType);
-
- lInsideScrolledForm.reflow(true);
- lSection.setClient(lInsideScrolledForm);
- }
-
- /**
- * Add listeners to widgets
- */
- private void hookListeners() {
- // listener to choose active section
- SelectionListener radioListener = new SelectionAdapter() {
-
- /**
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- refreshSectionsEnable(e.getSource());
- refreshOkButton();
- }
- };
- selectionRadio.addSelectionListener(radioListener);
- creationRadio.addSelectionListener(radioListener);
- nothingRadio.addSelectionListener(radioListener);
-
- // listener to select existing element
- SelectionListener selectBtnListener = new SelectionAdapter() {
-
- /**
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleSelectElement();
- }
- };
- selectionButton.addSelectionListener(selectBtnListener);
-
- if(creationTypeCombo != null && typeComboViewer != null) {
- // listener to select invocation type
- ModifyListener lTypeListener = new ModifyListener() {
-
- /**
- * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
- */
- public void modifyText(ModifyEvent e) {
- ISelection sel = typeComboViewer.getSelection();
- if(sel instanceof StructuredSelection) {
- Object type = ((StructuredSelection)sel).getFirstElement();
- if(type instanceof EClass) {
- setType((EClass)type);
- } else {
- setType(null);
- }
- // reset name
- setName(null);
- }
- }
- };
- creationTypeCombo.addModifyListener(lTypeListener);
- }
-
- // listener to invocation element name
- ModifyListener lNameListener = new ModifyListener() {
-
- /**
- * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
- */
- public void modifyText(ModifyEvent e) {
- selectedName = creationNameText.getText();
- refreshOkButton();
- }
- };
- creationNameText.addModifyListener(lNameListener);
-
- // listener to select new element parent
- SelectionListener selectParentBtnListener = new SelectionAdapter() {
-
- /**
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleSelectParent();
- }
- };
- creationParentButton.addSelectionListener(selectParentBtnListener);
- }
-
- /**
- * Refresh the OK button activation
- */
- private void refreshOkButton() {
- Button okButton = getButton(IDialogConstants.OK_ID);
- if(okButton != null && !okButton.isDisposed()) {
- if(selectionRadio.getSelection()) {
- okButton.setEnabled(selectedElement != null);
- } else if(nothingRadio.getSelection()) {
- okButton.setEnabled(true);
- } else {
- okButton.setEnabled(selectedType != null && selectedParent != null && selectedName != null && !"".equals(selectedName)); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Add the created element to its selected parent
- */
- protected void addElementInParent(EObject selectedParent, EObject createdElement) {
- // Let the command find the relation on its own.
- Command addCmd = AddCommand.create(transactionalEditingDomain, selectedParent, null, Collections.singleton(createdElement));
- if(addCmd.canExecute()) {
- addCmd.execute();
- }
- }
-
- /**
- * Set correctly the element, by creating it if needed.
- * Then, notifies that the ok button of this dialog has been pressed.
- *
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- *
- */
- @Override
- protected void okPressed() {
- // create element if needed
- if(creationRadio.getSelection()) {
- selectedElement = UMLFactory.eINSTANCE.create(selectedType);
- if(selectedElement instanceof NamedElement) {
- ((NamedElement)selectedElement).setName(selectedName);
- }
- addElementInParent(selectedParent, selectedElement);
- } else if(nothingRadio.getSelection()) {
- selectedElement = null;
- }
- super.okPressed();
- }
-
- /**
- * Open the dialog to choose the existing element to select
- *
- */
- private void handleSelectElement() {
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), elementLabelProvider);
- dialog.setMessage(Messages.SelectOrCreateDialog_SelectLabel);
- dialog.setMultipleSelection(false);
- dialog.setElements(filterElements(existingElements));
- if(dialog.open() == Window.OK) {
- setElementSelection((EObject)dialog.getFirstResult());
- }
- }
-
- private Set<Signal> getAllSignals(List<Type> types){
- Set<Signal> accept = new HashSet<Signal>();
- Set<Classifier> collected = new HashSet<Classifier>();
- for(Type t: types)
- if(t instanceof Classifier){
- Classifier c = (Classifier)t;
- collectSignals(c, accept, collected);
- }
-
- return accept;
- }
-
- protected void collectSignals(Classifier c, Set<Signal> accept, Set<Classifier> collected) {
- if(collected.contains(c))
- return;
- collected.add(c);
- if(c instanceof org.eclipse.uml2.uml.Class){
- EList<Reception> receptions = ((org.eclipse.uml2.uml.Class)c).getOwnedReceptions();
- for(Reception r : receptions)
- accept.add(r.getSignal());
- }
-
- EList<Property> attrs = c.getAllAttributes();
- for(Property p : attrs)
- if(p.getType() instanceof Signal){
- accept.add((Signal)p.getType());
- }else if(p.getType() instanceof Classifier){
- collectSignals((Classifier)p.getType(), accept, collected);
- }
- }
-
- private Object[] filterElements(Collection<EObject> elements) {
- if(!filterSignalButton.getSelection() || types == null || types.isEmpty())
- return elements.toArray(new EObject[elements.size()]);
-
- Set<Signal> accept = getAllSignals(types);
-
- List<EObject> result = new ArrayList<EObject>();
- for(EObject o:elements)
- if(!(o instanceof Signal))
- result.add(o);
- else if( accept.contains(o))
- result.add(o);
- return result.toArray(new EObject[result.size()]);
- }
-
- /**
- * Open the dialog to choose the parent of element to create
- *
- */
- private void handleSelectParent() {
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), elementLabelProvider);
- dialog.setMessage(Messages.SelectOrCreateDialog_OwnerLabel);
- dialog.setMultipleSelection(false);
- List<EObject> possibleParents = mapTypesPossibleParents.get(selectedType);
- if(possibleParents != null) {
- dialog.setElements(possibleParents.toArray());
- }
- if(dialog.open() == Window.OK) {
- setParent((EObject)dialog.getFirstResult());
- }
- }
-
- /**
- * Define the object in which element will be created (if creation mode is chosen)
- *
- * @param parent
- * the selected parent
- */
- private void setParent(EObject parent) {
- selectedParent = parent;
- if(selectedParent instanceof NamedElement) {
- creationParentText.setText(elementLabelProvider.getText(selectedParent));
- creationParentButton.setImage(UMLElementTypes.getImage(parent.eClass()));
- } else {
- creationParentText.setText(""); //$NON-NLS-1$
- }
- refreshOkButton();
- }
-
- /**
- * Define the name of the object that will be created by the action
- *
- * @param name
- * the name of the element
- */
- private void setName(String name) {
- selectedName = name;
- if(name != null) {
- creationNameText.setText(name);
- } else {
- creationNameText.setText(""); //$NON-NLS-1$
- }
- refreshOkButton();
- }
-
- /**
- * Define the type of the object that will be created by the action
- *
- * @param type
- * the type of the element
- */
- private void setType(EClass type) {
- selectedType = type;
- List<EObject> possibleParents = mapTypesPossibleParents.get(type);
- if(possibleParents != null && possibleParents.size() > 0) {
- setParent(possibleParents.get(0));
- } else {
- setParent(null);
- }
- refreshOkButton();
- }
-
- /**
- * Define the object that will be returned by the action (if selection mode is chosen)
- *
- * @param element
- * the selected element
- */
- private void setElementSelection(EObject element) {
- selectedElement = element;
- if(selectedElement instanceof NamedElement) {
- selectionText.setText(elementLabelProvider.getText(selectedElement));
- } else {
- selectionText.setText(""); //$NON-NLS-1$
- }
- refreshOkButton();
- }
-
- /**
- * Refresh the enabled and disabled elements in various sections
- *
- */
- private void refreshSectionsEnable(Object radioObject) {
- boolean nothingSelected = false;
- boolean selectionSelected = false;
- boolean creationSelected = false;
- if(selectionRadio.equals(radioObject)) {
- selectionSelected = true;
- } else if(creationRadio.equals(radioObject)) {
- creationSelected = true;
- } else {
- nothingSelected = true;
- }
-
- // Selection widgets
- selectionRadio.setSelection(selectionSelected);
- selectionText.setEnabled(selectionSelected);
- selectionButton.setEnabled(selectionSelected);
-
- // Creation widgets
- creationRadio.setSelection(creationSelected);
- if(creationTypeCombo != null) {
- creationTypeCombo.setEnabled(creationSelected);
- }
- creationNameText.setEnabled(creationSelected);
- creationParentText.setEnabled(creationSelected);
- creationParentButton.setEnabled(creationSelected);
-
- // Nothing widgets
- nothingRadio.setSelection(nothingSelected);
- }
-
- /**
- * Get the object that have been selected or created.
- *
- * @return the object to use.
- */
- public EObject getSelected() {
- return selectedElement;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceDeleteHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceDeleteHelper.java
deleted file mode 100644
index 11be8bbe97e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceDeleteHelper.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-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.draw2d.PositionConstants;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-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.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ObservationLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.TimeObservation;
-
-/**
- * An Helper to get deleting command for the sequence diagram elements.
- */
-
-public class SequenceDeleteHelper {
-
- /**
- * Complete an ICommand which destroys an DestructionEvent element to also destroy dependent time/duration constraint/observation linked with
- * these ends
- *
- * @param deleteViewsCmd
- * the command to complete
- * @param editingDomain
- * the editing domain
- * @param destructionEventPart
- * the execution specification edit part on which the request is called
- * @return the deletion command deleteViewsCmd for convenience
- */
- public static CompoundCommand completeDeleteDestructionOccurenceViewCommand(CompoundCommand deleteViewsCmd, TransactionalEditingDomain editingDomain, EditPart destructionEventPart) {
- if(destructionEventPart instanceof IGraphicalEditPart) {
- EObject obj = ((IGraphicalEditPart)destructionEventPart).resolveSemanticElement();
-
- if(obj instanceof DestructionOccurrenceSpecification) {
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(destructionEventPart);
- if(lifelinePart != null) {
- for(Object lifelineChild : lifelinePart.getChildren()) {
- if(lifelineChild instanceof IBorderItemEditPart) {
- final IBorderItemEditPart timePart = (IBorderItemEditPart)lifelineChild;
- //At most one destruction event. Only parts linked to it can not move for now.
- boolean isNotLinked = OccurrenceSpecificationMoveHelper.canTimeElementPartBeYMoved(timePart);
- if(!isNotLinked) {
- // time part is linked, delete the view
- Command deleteTimeViewCommand = new ICommandProxy(new DeleteCommand(editingDomain, (View)timePart.getModel()));
- deleteViewsCmd.add(deleteTimeViewCommand);
- }
- }
- }
- }
- }
- }
- return deleteViewsCmd;
- }
-
- /**
- * Complete an ICommand which destroys an ExecutionSpecification element to also destroy dependent finish and start events and time/duration
- * constraint/observation linked with these ends
- *
- * @param deleteViewsCmd
- * the command to complete
- * @param editingDomain
- * the editing domain
- * @param executionPart
- * the execution specification edit part on which the request is called
- * @return the deletion command deleteViewsCmd for convenience
- */
- public static CompoundCommand completeDeleteMessageViewCommand(CompoundCommand deleteViewsCmd, TransactionalEditingDomain editingDomain, EditPart messagePart) {
- if(messagePart instanceof IGraphicalEditPart) {
- EObject obj = ((IGraphicalEditPart)messagePart).resolveSemanticElement();
- if(obj instanceof Message) {
- Message message = (Message)obj;
- LifelineEditPart srcLifelinePart = SequenceUtil.getParentLifelinePart(((ConnectionNodeEditPart)messagePart).getSource());
- MessageEnd send = message.getSendEvent();
- addDeleteRelatedTimePartsToCommand(deleteViewsCmd, editingDomain, srcLifelinePart, send);
-
- LifelineEditPart tgtLifelinePart = SequenceUtil.getParentLifelinePart(((ConnectionNodeEditPart)messagePart).getTarget());
- MessageEnd receive = message.getReceiveEvent();
- addDeleteRelatedTimePartsToCommand(deleteViewsCmd, editingDomain, tgtLifelinePart, receive);
-
- // also delete time observation links which are related to message end
- if (send instanceof OccurrenceSpecification) {
- addDeleteRelatedTimeObservationLinkCommand(deleteViewsCmd, editingDomain,(OccurrenceSpecification) send, srcLifelinePart,false);
- }
- if (receive instanceof OccurrenceSpecification) {
- addDeleteRelatedTimeObservationLinkCommand(deleteViewsCmd, editingDomain,(OccurrenceSpecification) receive, tgtLifelinePart,false);
- }
- }
- }
- return deleteViewsCmd;
- }
-
- private static void addDeleteRelatedTimePartsToCommand(CompoundCommand deleteViewsCmd, TransactionalEditingDomain editingDomain, LifelineEditPart lifelineEP, MessageEnd messageEnd) {
- if(lifelineEP != null && messageEnd instanceof OccurrenceSpecification) {
- for(Object lifelineChild : lifelineEP.getChildren()) {
- if(lifelineChild instanceof IBorderItemEditPart) {
- final IBorderItemEditPart timePart = (IBorderItemEditPart)lifelineChild;
- int positionForEvent = SequenceUtil.positionWhereEventIsLinkedToPart((OccurrenceSpecification)messageEnd, timePart);
- if(positionForEvent != PositionConstants.NONE) {
- // time part is linked, delete the view
- Command deleteTimeViewCommand = new ICommandProxy(new DeleteCommand(editingDomain, (View)timePart.getModel()));
- deleteViewsCmd.add(deleteTimeViewCommand);
- }
- }
- }
- }
- }
-
- /**
- * Complete an ICommand which destroys an ExecutionSpecification element to also destroy dependent finish and start events and time/duration
- * constraint/observation linked with these ends
- *
- * @param deleteViewsCmd
- * the command to complete
- * @param editingDomain
- * the editing domain
- * @param executionPart
- * the execution specification edit part on which the request is called
- * @return the deletion command deleteViewsCmd for convenience
- */
- public static CompoundCommand completeDeleteExecutionSpecificationViewCommand(CompoundCommand deleteViewsCmd, TransactionalEditingDomain editingDomain, EditPart executionPart) {
- if(executionPart instanceof IGraphicalEditPart) {
- EObject obj = ((IGraphicalEditPart)executionPart).resolveSemanticElement();
-
- if(obj instanceof ExecutionSpecification) {
- ExecutionSpecification execution = (ExecutionSpecification)obj;
- LifelineEditPart lifelinePart = SequenceUtil.getParentLifelinePart(executionPart);
- if(lifelinePart != null) {
- for(Object lifelineChild : lifelinePart.getChildren()) {
- if(lifelineChild instanceof IBorderItemEditPart) {
- final IBorderItemEditPart timePart = (IBorderItemEditPart)lifelineChild;
- OccurrenceSpecification start = execution.getStart();
- OccurrenceSpecification finish = execution.getStart();
- int positionForStart = SequenceUtil.positionWhereEventIsLinkedToPart(start, timePart);
- int positionForFinish = SequenceUtil.positionWhereEventIsLinkedToPart(finish, timePart);
- if(positionForStart != PositionConstants.NONE || positionForFinish != PositionConstants.NONE) {
- // time part is linked, delete the view
- Command deleteTimeViewCommand = new ICommandProxy(new DeleteCommand(editingDomain, (View)timePart.getModel()));
- deleteViewsCmd.add(deleteTimeViewCommand);
- }
- }
- }
-
- // delete each observation linked time element
- for(Object targetConnection : lifelinePart.getTargetConnections()){
- if(targetConnection instanceof ObservationLinkEditPart){
- ObservationLinkEditPart observationLinkEditPart = (ObservationLinkEditPart)targetConnection;
- TimeObservationLabelEditPart source = (TimeObservationLabelEditPart)observationLinkEditPart.getSource();
- OccurrenceSpecification start = execution.getStart();
- OccurrenceSpecification finish = execution.getFinish();
- int positionForStart = SequenceUtil.positionWhereEventIsLinkedToPart(start, source);
- int positionForFinish = SequenceUtil.positionWhereEventIsLinkedToPart(finish, source);
- if(positionForStart != PositionConstants.NONE) {
- // time part is linked, delete the view
- //Command deleteTimeViewCommand = new ICommandProxy(new DeleteCommand(editingDomain, (View)source.getModel()));
- //deleteViewsCmd.add(deleteTimeViewCommand);
- addDeleteRelatedTimeObservationLinkCommand(deleteViewsCmd,
- editingDomain, start, lifelinePart,false);
- }
- if(positionForFinish != PositionConstants.NONE) {
- addDeleteRelatedTimeObservationLinkCommand(deleteViewsCmd,
- editingDomain, finish, lifelinePart,false);
- }
- }
- }
- }
- }
- }
- return deleteViewsCmd;
- }
-
- /**
- * Delete the views associated with a list of elements.
- *
- * @param cmd
- * the CompositeTransactionalCommand
- * @param element
- * the list of model elements
- * @param editingDomain
- * the editing domain to use.
- */
- public static void deleteView(CompositeTransactionalCommand cmd, List<Element> elements, TransactionalEditingDomain editingDomain) {
- for(Element element : elements) {
- deleteView(cmd, element, editingDomain);
- }
- }
-
- /**
- * Delete the views associated with an element.
- *
- * @param cmd
- * the CompositeTransactionalCommand
- * @param element
- * the model element referenced by the views
- * @param editingDomain
- * the editing domain to use.
- */
- public static void deleteView(CompositeTransactionalCommand cmd, Element element, TransactionalEditingDomain editingDomain) {
- // Destroy its views
- @SuppressWarnings("rawtypes")
- List views = DiagramEditPartsUtil.getEObjectViews(element);
- for(Object object : views) {
- if(object instanceof View) {
- cmd.add(new DeleteCommand(editingDomain, (View)object));
- }
- }
- }
-
- /**
- * Add complete delete message command
- * @param req
- * @param editPart
- * @return Command
- */
- public static Command completeDeleteMessageCommand(DestroyElementRequest req,EditPart editPart) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils
- .getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
- if (deleteCommand != null) {
- CompositeCommand command = new CompositeCommand(
- deleteCommand.getLabel());
- command.add(deleteCommand);
- Message message = (Message) selectedEObject;
- MessageEnd receiveEvent = message.getReceiveEvent();
- if (receiveEvent != null) {
- DestroyElementRequest myReq = new DestroyElementRequest(
- req.getEditingDomain(), receiveEvent, false);
- command.add(new DestroyElementCommand(myReq));
- }
- MessageEnd sendEvent = message.getSendEvent();
- if (sendEvent != null) {
- DestroyElementRequest myReq = new DestroyElementRequest(
- req.getEditingDomain(), sendEvent, false);
- command.add(new DestroyElementCommand(myReq));
- }
-
- addDeleteMessageRelatedTimeObservationLinkCommand(req.getEditingDomain(), editPart, command,
- receiveEvent,true);
- addDeleteMessageRelatedTimeObservationLinkCommand(req.getEditingDomain(), editPart, command,
- sendEvent,true);
-
- return new ICommandProxy(command);
- }
- }
-
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * Add delete message related time observation link command
- * @param editingDomain
- * @param editPart
- * @param command
- * @param messageEnd
- * @param deleteRelatedEvent
- */
- public static void addDeleteMessageRelatedTimeObservationLinkCommand(
- TransactionalEditingDomain editingDomain, EditPart editPart,
- CompositeCommand command, MessageEnd messageEnd,boolean deleteRelatedEvent) {
- //Bug fix: messageEnd maybe a Gate instance.
- if(messageEnd != null && messageEnd instanceof OccurrenceSpecification){
- OccurrenceSpecification occurrenceSpecification = (OccurrenceSpecification) messageEnd;
- EList<Lifeline> receiveCovereds = occurrenceSpecification.getCovereds();
- CompoundCommand CompoundCommand = new CompoundCommand();
- CompoundCommand.add(new ICommandProxy(command));
- LifelineEditPart srcLifelinePart = (LifelineEditPart) SequenceUtil.getEditPart(editPart,receiveCovereds.get(0), LifelineEditPart.class);
- addDeleteRelatedTimeObservationLinkCommand(CompoundCommand, editingDomain, occurrenceSpecification, srcLifelinePart,deleteRelatedEvent);
- }
- }
-
- /**
- * Add command for deleting time observation link which related to occurence specification
- * @param deleteViewsCmd
- * @param editingDomain
- * @param os
- * @param srcLifelinePart
- * @param deleteRelatedEvent
- */
- private static void addDeleteRelatedTimeObservationLinkCommand(
- CompoundCommand deleteViewsCmd,
- TransactionalEditingDomain editingDomain, OccurrenceSpecification os,
- LifelineEditPart srcLifelinePart,boolean deleteRelatedEvent) {
- List<OccurrenceSpecification> oss = new ArrayList<OccurrenceSpecification>();
- oss.add(os);
- addDeleteRelatedTimeObservationLinkCommand(deleteViewsCmd, editingDomain,srcLifelinePart, oss,deleteRelatedEvent);
- }
-
- /**
- * Add command for deleting time observation link which related to occurence specification
- * @param deleteViewsCmd
- * @param editingDomain
- * @param srcLifelinePart
- * @param oss
- * @param deleteRelatedEvent
- */
- public static void addDeleteRelatedTimeObservationLinkCommand(
- CompoundCommand deleteViewsCmd,
- TransactionalEditingDomain editingDomain,LifelineEditPart srcLifelinePart,List<OccurrenceSpecification> oss,boolean deleteRelatedEvent) {
- List<TimeObservationLabelEditPart> timeObservationEditParts = SequenceUtil.findOccurenceSpecificationRelatedTimeObservationPart(srcLifelinePart,oss);
- for (final TimeObservationLabelEditPart timeObservationEditPart : timeObservationEditParts) {
- View view = (View) timeObservationEditPart.getModel();
- EList sourceEdges = view.getSourceEdges();
- for (Object sourceEdge : sourceEdges) {
- Command deleteTimeViewCommand = new ICommandProxy(
- new DeleteCommand(editingDomain, (View) sourceEdge));
- deleteViewsCmd.add(deleteTimeViewCommand);
- }
- if(deleteRelatedEvent){
- deleteViewsCmd.add(new ICommandProxy(new AbstractTransactionalCommand(editingDomain,"Remove TimeObservation related event",null){
- @Override
- protected CommandResult doExecuteWithResult(
- IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- TimeObservation timeObservation = (TimeObservation)(timeObservationEditPart.resolveSemanticElement());
- timeObservation.setEvent(null);
- return CommandResult.newOKCommandResult();
- }
- }));
- }
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceLinkMappingHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceLinkMappingHelper.java
deleted file mode 100644
index 0e239e232aa..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceLinkMappingHelper.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-
-import org.eclipse.papyrus.uml.diagram.common.helper.ILinkMappingHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.LinkMappingHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.LinkMappingHelper.CommonSourceUMLSwitch;
-import org.eclipse.papyrus.uml.diagram.common.helper.LinkMappingHelper.CommonTargetUMLSwitch;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Gate;
-import org.eclipse.uml2.uml.GeneralOrdering;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * A link mapping helper used for dNd.
- *
- * See {@link CustomDiagramDragDropEditPolicy}
- */
-public class SequenceLinkMappingHelper implements ILinkMappingHelper {
-
- /**
- * SingletonHolder is loaded at the first execution of getInstance() method
- */
- private static class SingletonHolder {
-
- private final static SequenceLinkMappingHelper instance = new SequenceLinkMappingHelper();
- }
-
- /**
- * Gets the single instance of ClassLinkMappingHelper.
- *
- * @return single instance of ClassLinkMappingHelper
- */
- public static SequenceLinkMappingHelper getInstance() {
- return SingletonHolder.instance;
- }
-
- /**
- * private constructor
- */
- private SequenceLinkMappingHelper() {
- // do nothing
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<?> getSource(Element link) {
- return LinkMappingHelper.getSource(link, new CommonSourceUMLSwitch() {
-
- public java.util.Collection<?> caseMessage(org.eclipse.uml2.uml.Message object) {
- if(object.getSendEvent() != null) {
- MessageEnd messageEnd = object.getSendEvent();
- if(messageEnd instanceof MessageOccurrenceSpecification) {
- return ((MessageOccurrenceSpecification)messageEnd).getCovereds();
- } else if(messageEnd instanceof Gate) {
- ArrayList<Element> sources = new ArrayList<Element>();
- sources.add(((Gate)messageEnd).getOwner());
- return sources;
- }
- } else {
- return Collections.singletonList(object.getInteraction());
- }
- return Collections.EMPTY_LIST;
- };
-
- public Collection<?> caseGeneralOrdering(GeneralOrdering object) {
- if(object.getBefore() != null) {
- OccurrenceSpecification before = object.getBefore();
- return before.getCovereds();
- }
- return Collections.EMPTY_LIST;
- }
- });
- }
-
- /**
- * {@inheritDoc}
- */
- public Collection<?> getTarget(Element link) {
- return LinkMappingHelper.getTarget(link, new CommonTargetUMLSwitch() {
-
- public java.util.Collection<?> caseMessage(org.eclipse.uml2.uml.Message object) {
- if(object.getReceiveEvent() != null) {
- MessageEnd messageEnd = (MessageEnd)object.getReceiveEvent();
- if(messageEnd instanceof MessageOccurrenceSpecification) {
- return ((MessageOccurrenceSpecification)messageEnd).getCovereds();
- } else if(messageEnd instanceof Gate) {
- ArrayList<Element> sources = new ArrayList<Element>();
- sources.add(((Gate)messageEnd).getOwner());
- return sources;
- }
- } else {
- return Collections.singletonList(object.getInteraction());
- }
- return Collections.EMPTY_LIST;
- };
-
- public Collection<?> caseGeneralOrdering(GeneralOrdering object) {
- if(object.getAfter() != null) {
- OccurrenceSpecification after = object.getAfter();
- return after.getCovereds();
- }
- return Collections.EMPTY_LIST;
- }
-
- });
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceRequestConstant.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceRequestConstant.java
deleted file mode 100644
index 52fa63e7408..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceRequestConstant.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-/**
- * Constants used in the sequence diagram
- */
-public interface SequenceRequestConstant {
-
- /** A constant representing the container of an interactionFragment. It can be an Interaction or an InteractionOperand */
- public static final String INTERACTIONFRAGMENT_CONTAINER = "InteractionFragment Container"; //$NON-NLS-1$
-
- /** key for a set of covered InteractionFragment which needs to be moved inside a new container. */
- public static final String COVERED_INTERACTIONFRAGMENTS = "Covered InteractionFragments"; //$NON-NLS-1$
-
- public static final String SOURCE_MODEL_CONTAINER = "Source model container"; //$NON-NLS-1$
-
- public static final String TARGET_MODEL_CONTAINER = "Target model container"; //$NON-NLS-1$
-
- /** A key used in the creation of a CORegion to identify the lifeline graphically containing the CoRegion */
- public static final String LIFELINE_GRAPHICAL_CONTAINER = "Lifeline graphical container"; //$NON-NLS-1$
-
- /** The occurrence specification(s) which are the nearest from a creation request */
- public static final String NEAREST_OCCURRENCE_SPECIFICATION = "Nearest occurrence specification"; //$NON-NLS-1$
-
- /** The location of the occurrence specification which is the nearest from a creation request */
- public static final String OCCURRENCE_SPECIFICATION_LOCATION = "Nearest occurrence specification location"; //$NON-NLS-1$
-
- /** The occurrence specification(s) which are the nearest from a creation request (2nd end of creation) */
- public static final String NEAREST_OCCURRENCE_SPECIFICATION_2 = "Nearest occurrence specification (end)"; //$NON-NLS-1$
-
- /** The location of the occurrence specification which is the nearest from a creation request (2nd end of creation) */
- public static final String OCCURRENCE_SPECIFICATION_LOCATION_2 = "Nearest occurrence specification location (end)"; //$NON-NLS-1$
-
- /** Tag signifying that the edit parts must not be moved when an occurrence specification is moved (to avoid loop in chain effects) */
- public static final String DO_NOT_MOVE_EDIT_PARTS = "Do not move these edit parts"; //$NON-NLS-1$
-
- /** The location of the connection start creation request */
- public static final String SOURCE_LOCATION_DATA = "Location of connection source point"; //$NON-NLS-1$
-
- /** update connectable element reference */
- public static final String CONNECTABLE_ELEMENT = "Connectable Element"; //$NON-NLS-1$
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java
deleted file mode 100644
index 734e61a2ac8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SequenceUtil.java
+++ /dev/null
@@ -1,1713 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- * Camille Letavernier (camille.letavernier@cea.fr) - Loosen the MessageSortChange restriction
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-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.draw2d.AbstractPointListShape;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PrecisionPoint;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart;
-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.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.BaseSlidableAnchor;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.Anchor;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.IdentityAnchor;
-import org.eclipse.gmf.runtime.notation.LayoutConstraint;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.InteractionFragmentHelper;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ObservationLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ObservationLinkPolicy;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.common.util.CacheAdapter;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Continuation;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.InteractionOperatorKind;
-import org.eclipse.uml2.uml.InteractionUse;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.MessageSort;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.StateInvariant;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.TimeObservation;
-import org.eclipse.uml2.uml.UMLPackage;
-
-
-public class SequenceUtil {
-
- private static final double MAXIMAL_DISTANCE_FROM_EVENT = 10;
-
- /**
- * Request type of observation link
- */
- public static final String OBSERVATION_LINK_TYPE = "observation link"; //$NON-NLS-1$
-
- public static final String OBSERVATION_LINK_REQUEST_START = "observation connection start"; //$NON-NLS-1$
-
- public static final String OBSERVATION_LINK_REQUEST_END = "observation connection end"; //$NON-NLS-1$
-
- public static final String OBSERVATION_LINK_REQUEST_RECONNECT_SOURCE = "observation reconnect source"; //$NON-NLS-1$
-
- public static final String OBSERVATION_LINK_REQUEST_RECONNECT_TARGET = "observation reconnect target"; //$NON-NLS-1$
-
- /**
- * Default vertical offset of lifeline
- */
- public static final int LIFELINE_VERTICAL_OFFSET = 10;
-
- /**
- * Title for dialog of block message sort modification error
- */
- private static final String BLOCK_SORT_MODIFICATION_TITLE = "Forbidden action"; //$NON-NLS-1$
-
- /**
- * Message for dialog of block message sort modification error
- */
- private static final String BLOCK_SORT_MODIFICATION_MSG = "It's impossible to change the message sort."; //$NON-NLS-1$
-
- /**
- * Find the container interaction fragment at the given location.
- * The elements are drawn under the lifeline, but their model container is an interaction.
- * It can be of type Interaction or InteractionOperand.
- *
- * @param location
- * the location
- * @return the interaction or null
- */
- public static InteractionFragment findInteractionFragmentContainerAt(Point location, EditPart hostEditPart) {
- Rectangle bounds = new Rectangle();
- bounds.setLocation(location);
- return findInteractionFragmentContainerAt(bounds, hostEditPart);
- }
-
- /**
- * Find the container interaction fragment for the given bounds.
- * The elements are drawn under the lifeline, but their model container is an interaction.
- * It can be of type Interaction or InteractionOperand.
- *
- * @param bounds
- * the bounds
- * @param hostEditPart
- * any adit part in the corresponding diagram
- * @return the interaction or null
- */
- @SuppressWarnings("unchecked")
- public static InteractionFragment findInteractionFragmentContainerAt(Rectangle bounds, EditPart hostEditPart) {
-
- if(hostEditPart == null) {
- return null;
- }
-
- InteractionFragment container = null;
- Set<InteractionFragment> coveredInteractions = new HashSet<InteractionFragment>();
- Set<CombinedFragment> coveredCF = new HashSet<CombinedFragment>();
-
- Set<Entry<Object, EditPart>> allEditPartEntries = hostEditPart.getViewer().getEditPartRegistry().entrySet();
- for(Entry<Object, EditPart> epEntry : allEditPartEntries) {
- EditPart ep = epEntry.getValue();
-
- if(ep instanceof ShapeEditPart) {
- ShapeEditPart sep = (ShapeEditPart)ep;
- EObject eObject = sep.resolveSemanticElement();
-
- if(eObject instanceof Interaction || eObject instanceof InteractionOperand) {
-
- Rectangle figureBounds = getAbsoluteBounds(sep);
-
- if(figureBounds.contains(bounds)) {
- coveredInteractions.add((InteractionFragment)eObject);
- }
- } else if(eObject instanceof CombinedFragment) {
- // handle case when the figure is located in the CF header as if it were in the first Interaction Operand
- Rectangle figureBounds = getAbsoluteBounds(sep);
- if(figureBounds.contains(bounds)) {
- coveredCF.add((CombinedFragment)eObject);
- }
- }
- }
- }
-
- // inspect coveredCF to ensure at least on child operand is in coveredInteractions list
- for(CombinedFragment cf : coveredCF) {
- List<InteractionOperand> operands = cf.getOperands();
- if(operands.size() > 0 && Collections.disjoint(operands, coveredInteractions)) {
- // bounds are in the header, add the first operand
- coveredInteractions.add(operands.get(0));
- }
- }
-
- // for each interaction verify if its children list does not contain an other covered interaction
- // if it doesn't we have found the top-level interaction
- for(InteractionFragment ift : coveredInteractions) {
- boolean subiftFounded = false;
- if(ift instanceof Interaction) {
- for(InteractionFragment subift : ((Interaction)ift).getFragments()) {
- if(subift instanceof CombinedFragment) {
- for(InteractionOperand io : ((CombinedFragment)subift).getOperands()) {
- if(coveredInteractions.contains(io)) {
- subiftFounded = true;
- }
- }
- }
- }
- }
- if(!subiftFounded && ift instanceof InteractionOperand) {
- for(InteractionFragment subift : ((InteractionOperand)ift).getFragments()) {
- if(subift instanceof CombinedFragment) {
- for(InteractionOperand io : ((CombinedFragment)subift).getOperands()) {
- if(coveredInteractions.contains(io)) {
- subiftFounded = true;
- }
- }
- }
- }
- }
- if(!subiftFounded) {
- container = ift;
- break;
- }
- }
-
- return container;
- }
-
- /**
- * Find the location on the lifeline of an interaction fragment
- *
- * @param lifelineEditPart
- * the lifeline edit part
- * @param fragment
- * the searched interaction fragment
- * @return the absolute location or null if not found
- */
- public static Point findLocationOfEvent(LifelineEditPart lifelineEditPart, InteractionFragment fragment) {
- if(lifelineEditPart == null) {
- return null;
- }
- // Search for corresponding node edit part out of the lifeline.
- if(fragment instanceof CombinedFragment || fragment instanceof Continuation || fragment instanceof InteractionOperand || fragment instanceof InteractionUse || fragment instanceof Interaction) {
- List<View> views = DiagramEditPartsUtil.findViews(fragment, lifelineEditPart.getViewer());
- for(View view : views) {
- EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelineEditPart);
- boolean isCombinedFragment = part instanceof CombinedFragmentEditPart || part instanceof CombinedFragment2EditPart;
- boolean isContinuation = part instanceof ContinuationEditPart;
- boolean isInteractionOperand = part instanceof InteractionOperandEditPart;
- boolean isInteractionUse = part instanceof InteractionUseEditPart;
- boolean isInteraction = part instanceof InteractionEditPart;
- if(isCombinedFragment || isContinuation || isInteractionOperand || isInteractionUse || isInteraction) {
- Rectangle bounds = getAbsoluteBounds((GraphicalEditPart)part);
- return bounds.getTop();
- }
- }
- } else {
- // search on graphical children of the lifeline
- List<?> children = lifelineEditPart.getChildren();
- for(Object child : children) {
- // check destruction event
- if(child instanceof DestructionOccurrenceSpecificationEditPart) {
- EObject destructionOccurence = ((GraphicalEditPart)child).resolveSemanticElement();
- EObject lifeline = lifelineEditPart.resolveSemanticElement();
- if(destructionOccurence instanceof DestructionOccurrenceSpecification && lifeline instanceof Lifeline && fragment instanceof DestructionOccurrenceSpecification) {
- DestructionOccurrenceSpecification destEvent = ((DestructionOccurrenceSpecification)fragment);
- if(destEvent != null && destEvent.equals(destructionOccurence)) {
- Rectangle bounds = getAbsoluteBounds((GraphicalEditPart)child);
- return bounds.getCenter();
- }
- }
- }
- // check in children executions
- if(child instanceof ActionExecutionSpecificationEditPart || child instanceof BehaviorExecutionSpecificationEditPart) {
- if(fragment instanceof ExecutionSpecification) {
- // check the execution
- EObject element = ((GraphicalEditPart)child).resolveSemanticElement();
- if(element instanceof ExecutionSpecification) {
- if(fragment.equals(element)) {
- Rectangle bounds = getAbsoluteBounds((GraphicalEditPart)child);
- return bounds.getTop();
- }
- }
- } else if(fragment instanceof ExecutionOccurrenceSpecification) {
- // check start and finish events of the execution
- EObject element = ((GraphicalEditPart)child).resolveSemanticElement();
- if(element instanceof ExecutionSpecification) {
- if(fragment.equals(((ExecutionSpecification)element).getStart())) {
- Rectangle bounds = getAbsoluteBounds((GraphicalEditPart)child);
- return bounds.getTop();
- } else if(fragment.equals(((ExecutionSpecification)element).getFinish())) {
- Rectangle bounds = getAbsoluteBounds((GraphicalEditPart)child);
- return bounds.getBottom();
- }
- }
- } else if(fragment instanceof MessageOccurrenceSpecification) {
- // check messages to and from the execution
- Point loc = findLocationOfMessageOccurrence((GraphicalEditPart)child, (MessageOccurrenceSpecification)fragment);
- if(loc != null) {
- return loc;
- }
- }
- }
- // check in children StateInvariant
- if(child instanceof StateInvariantEditPart) {
- if(fragment instanceof StateInvariant) {
- // check the StateInvariant
- EObject element = ((GraphicalEditPart)child).resolveSemanticElement();
- if(element instanceof StateInvariant) {
- if(fragment.equals(element)) {
- Rectangle bounds = getAbsoluteBounds((GraphicalEditPart)child);
- return bounds.getTop();
- }
- }
- } else if(fragment instanceof MessageOccurrenceSpecification) {
- // check messages to and from the execution
- Point loc = findLocationOfMessageOccurrence((GraphicalEditPart)child, (MessageOccurrenceSpecification)fragment);
- if(loc != null) {
- return loc;
- }
- }
- }
- }
- if(fragment instanceof MessageOccurrenceSpecification) {
- // check messages to and from the lifeline
- Point loc = findLocationOfMessageOccurrence(lifelineEditPart, (MessageOccurrenceSpecification)fragment);
- if(loc != null) {
- return loc;
- }
- }
- }
- // If we found nothing, this may be a sync message receive
- if(fragment instanceof MessageOccurrenceSpecification) {
- boolean isSync = ((MessageOccurrenceSpecification)fragment).getMessage() != null && MessageSort.SYNCH_CALL_LITERAL.equals(((MessageOccurrenceSpecification)fragment).getMessage().getMessageSort());
- if(isSync) {
- // sync message should trigger an execution specification start. Find and return the corresponding start.
- EObject container = fragment.eContainer();
- EObject lifeline = lifelineEditPart.resolveSemanticElement();
- InteractionFragment nextFragment = InteractionFragmentHelper.findNextFragment(fragment, container);
- while(nextFragment != null && nextFragment.getCovereds().contains(lifeline)) {
- if(nextFragment.getCovereds().contains(lifeline)) {
- // Found next event of lifeline. Check if it really is a start.
- if(nextFragment instanceof ExecutionOccurrenceSpecification) {
- ExecutionSpecification exe = ((ExecutionOccurrenceSpecification)nextFragment).getExecution();
- if(exe != null && EcoreUtil.equals(exe.getStart(), nextFragment)) {
- // return location of the start.
- return findLocationOfEvent(lifelineEditPart, nextFragment);
- }
- }
- break;
- } else {
- nextFragment = InteractionFragmentHelper.findNextFragment(nextFragment, container);
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Get the bounds of an edit part
- *
- * @param part
- * edit part to find bounds
- * @return part's bounds in absolute coordinates
- */
- public static Rectangle getAbsoluteBounds(IGraphicalEditPart part) {
- // take bounds from figure
- Rectangle bounds = part.getFigure().getBounds().getCopy();
-
- if(part.getNotationView() instanceof Node) {
- // rather update with up to date model bounds
- Node node = (Node)part.getNotationView();
- LayoutConstraint cst = node.getLayoutConstraint();
- if(cst instanceof Bounds) {
- Bounds b = (Bounds)cst;
- Point parentLoc = part.getFigure().getParent().getBounds().getLocation();
- if(b.getX() > 0) {
- bounds.x = b.getX() + parentLoc.x;
- }
- if(b.getY() > 0) {
- bounds.y = b.getY() + parentLoc.y;
- }
- if(b.getHeight() != -1) {
- bounds.height = b.getHeight();
- }
- if(b.getWidth() != -1) {
- bounds.width = b.getWidth();
- }
- }
- }
-
- part.getFigure().getParent().translateToAbsolute(bounds);
- return bounds;
- }
-
- /**
- * Get the extremity of a connection edit part
- *
- * @param connection
- * the connection edit part to find extremity
- * @param isStart
- * true to find the start, false for the end
- * @return connection's extremity in absolute coordinates or null
- */
- public static Point getAbsoluteEdgeExtremity(ConnectionNodeEditPart connection, boolean isStart) {
- Connection msgFigure = connection.getConnectionFigure();
- if(connection.getNotationView() instanceof Edge) {
- // rather take up to date model information
- Edge edge = (Edge)connection.getNotationView();
- Anchor idAnchor = null;
- ConnectionAnchor conAnchor = null;
- Object part = null;
- if(isStart && connection.getSource() instanceof IGraphicalEditPart) {
- View linkedFigure = edge.getSource();
- // connection.getSource() may be not up to date, get part for linkedFigure
- part = connection.getSource().getViewer().getEditPartRegistry().get(linkedFigure);
- idAnchor = edge.getSourceAnchor();
- conAnchor = msgFigure.getSourceAnchor();
- } else if(!isStart && connection.getTarget() instanceof IGraphicalEditPart) {
- View linkedFigure = edge.getTarget();
- // connection.getTarget() may be not up to date, get part for linkedFigure
- part = connection.getTarget().getViewer().getEditPartRegistry().get(linkedFigure);
- idAnchor = edge.getTargetAnchor();
- conAnchor = msgFigure.getTargetAnchor();
- }
- if(part instanceof IGraphicalEditPart && idAnchor instanceof IdentityAnchor && conAnchor != null) {
- // take up to date bounds of the linked part in case it is moved
- Rectangle linkedPartBounds = getAbsoluteBounds((IGraphicalEditPart)part);
-
- IFigure anchorOwningFigure = conAnchor.getOwner();
- IFigure partFigure = ((IGraphicalEditPart)part).getFigure();
- Dimension delta = anchorOwningFigure.getBounds().getLocation().getDifference(partFigure.getBounds().getLocation());
- // get position from anchor id
- String oldTerminal = ((IdentityAnchor)idAnchor).getId();
- PrecisionPoint pp = BaseSlidableAnchor.parseTerminalString(oldTerminal);
- int xPos = linkedPartBounds.x + delta.width + (int)Math.round(anchorOwningFigure.getBounds().width * pp.preciseX);
- int yPos = linkedPartBounds.y + delta.height + (int)Math.round(anchorOwningFigure.getBounds().height * pp.preciseY);
- return new Point(xPos, yPos);
- }
- }
- // can not get from model, rely on figure
- if(msgFigure instanceof AbstractPointListShape) {
- Point extremity;
- if(isStart) {
- // start event of the message
- extremity = ((AbstractPointListShape)msgFigure).getStart().getCopy();
- } else {
- // finish event of the message
- extremity = ((AbstractPointListShape)msgFigure).getEnd().getCopy();
- }
- msgFigure.getParent().translateToAbsolute(extremity);
- return extremity;
- }
- return null;
- }
-
- /**
- * Find the location on a node of a message occurrence specification
- *
- * @param nodeEditPart
- * the node edit part which to check incoming and outgoing messages
- * @param event
- * the message occurrence specification
- * @return the absolute location or null
- */
- public static Point findLocationOfMessageOccurrence(GraphicalEditPart nodeEditPart, MessageOccurrenceSpecification event) {
- // messages to the node
- List<?> targetConnections = nodeEditPart.getTargetConnections();
- for(Object conn : targetConnections) {
- if(conn instanceof ConnectionNodeEditPart) {
- EObject element = ((ConnectionNodeEditPart)conn).resolveSemanticElement();
- if(element instanceof Message && event.equals(((Message)element).getReceiveEvent())) {
- // finish event of the message
- IFigure figure = ((ConnectionNodeEditPart)conn).getFigure();
- if(figure instanceof AbstractPointListShape) {
- return getAbsoluteEdgeExtremity((ConnectionNodeEditPart)conn, false);
- }
- }
- }
- }
- // messages from the node
- List<?> sourceConnections = nodeEditPart.getSourceConnections();
- for(Object conn : sourceConnections) {
- if(conn instanceof ConnectionNodeEditPart) {
- EObject element = ((ConnectionNodeEditPart)conn).resolveSemanticElement();
- if(element instanceof Message && event.equals(((Message)element).getSendEvent())) {
- // start event of the message
- IFigure figure = ((ConnectionNodeEditPart)conn).getFigure();
- if(figure instanceof AbstractPointListShape) {
- return getAbsoluteEdgeExtremity((ConnectionNodeEditPart)conn, true);
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Find the location on a node of a execution occurrence specification
- *
- * @param nodeEditPart
- * the node edit part which to check incoming and outgoing messages
- * @param event
- * the execution occurrence specification
- * @return the absolute location or null
- */
- public static Point findLocationOfExecutionOccurrence(GraphicalEditPart nodeEditPart, ExecutionOccurrenceSpecification event) {
- // child to the node
- List<?> children = nodeEditPart.getChildren();
- for(Object child : children) {
- if(child instanceof ActionExecutionSpecificationEditPart) {
- EObject element = ((ActionExecutionSpecificationEditPart)child).resolveSemanticElement();
- if(element != null && element instanceof ExecutionSpecification) {
- IFigure figure = ((ActionExecutionSpecificationEditPart)child).getFigure();
- Rectangle copy = figure.getBounds().getCopy();
- figure.translateToAbsolute(copy);
- if(event.equals(((ExecutionSpecification)element).getStart())){
- return copy.getTop();
- }else if(event.equals(((ExecutionSpecification)element).getFinish())){
- return copy.getBottom();
- }
- }
- }else if(child instanceof BehaviorExecutionSpecificationEditPart) {
- EObject element = ((BehaviorExecutionSpecificationEditPart)child).resolveSemanticElement();
- if(element != null && element instanceof ExecutionSpecification) {
- IFigure figure = ((BehaviorExecutionSpecificationEditPart)child).getFigure();
- Rectangle copy = figure.getBounds().getCopy();
- figure.translateToAbsolute(copy);
- if(event.equals(((ExecutionSpecification)element).getStart())){
- return copy.getTop();
- }else if(event.equals(((ExecutionSpecification)element).getFinish())){
- return copy.getBottom();
- }
- }
- }
- }
-
- return null;
- }
-
- /**
- * Find the occurrence specification covering the lifeline near the given location.
- * If none is close enough, null is returned.
- *
- * @param location
- * the location
- * @param lifelineEditPart
- * the Lifeline edit part
- * @return an entry with the nearest OccurrenceSpecification(s) and its corresponding location or null if none is close enough
- */
- public static Entry<Point, List<OccurrenceSpecification>> findNearestEvent(Point location, LifelineEditPart lifelineEditPart) {
- if(lifelineEditPart == null) {
- return null;
- }
- // Map referencing children occurrences by their location on the lifeline.
- Map<Point, List<OccurrenceSpecification>> occurrences = new HashMap<Point, List<OccurrenceSpecification>>();
- // graphical children of the lifeline
- List<?> children = lifelineEditPart.getChildren();
- for(Object child : children) {
- // children executions
- if(child instanceof ActionExecutionSpecificationEditPart || child instanceof BehaviorExecutionSpecificationEditPart) {
- EObject element = ((GraphicalEditPart)child).resolveSemanticElement();
- if(element instanceof ExecutionSpecification) {
- // find start and finish events of the execution
- Rectangle bounds = getAbsoluteBounds((GraphicalEditPart)child);
- if(!occurrences.containsKey(bounds.getTop())) {
- // there should be at most 2 occurrences (with starting message)
- occurrences.put(bounds.getTop(), new ArrayList<OccurrenceSpecification>(2));
- }
- occurrences.get(bounds.getTop()).add(((ExecutionSpecification)element).getStart());
- if(!occurrences.containsKey(bounds.getBottom())) {
- occurrences.put(bounds.getBottom(), new ArrayList<OccurrenceSpecification>(1));
- }
- occurrences.get(bounds.getBottom()).add(((ExecutionSpecification)element).getFinish());
- // messages to and from the execution
- completeOccurrencesMapWithMessages((GraphicalEditPart)child, occurrences);
- }
- }
- // destruction event
- if(child instanceof DestructionOccurrenceSpecificationEditPart) {
- EObject destructionOccurence = ((GraphicalEditPart)child).resolveSemanticElement();
- EObject lifeline = lifelineEditPart.resolveSemanticElement();
- if(destructionOccurence instanceof DestructionOccurrenceSpecification && lifeline instanceof Lifeline) {
- for(InteractionFragment occurence : ((Lifeline)lifeline).getCoveredBys()) {
- if(occurence instanceof DestructionOccurrenceSpecification) {
- DestructionOccurrenceSpecification currentOccurence = ((DestructionOccurrenceSpecification)occurence);
- if(destructionOccurence.equals(currentOccurence)) {
- Rectangle bounds = getAbsoluteBounds((GraphicalEditPart)child);
- if(!occurrences.containsKey(bounds.getCenter())) {
- occurrences.put(bounds.getCenter(), new ArrayList<OccurrenceSpecification>(2));
- }
- occurrences.get(bounds.getCenter()).add((OccurrenceSpecification)occurence);
- break;
- }
- }
- }
- }
- }
- }
- // messages to and from the lifeline
- completeOccurrencesMapWithMessages(lifelineEditPart, occurrences);
-
- // Find the nearest object within acceptable distance
- double smallerDistance = MAXIMAL_DISTANCE_FROM_EVENT;
- Entry<Point, List<OccurrenceSpecification>> nearestObject = null;
- for(Entry<Point, List<OccurrenceSpecification>> entry : occurrences.entrySet()) {
- double distance = location.getDistance(entry.getKey());
- if(distance < smallerDistance) {
- smallerDistance = distance;
- nearestObject = entry;
- } else if(distance == smallerDistance && nearestObject != null) {
- // two events at the exact same distance.
- // Keep both so the best one can be used
- if(entry.getValue() instanceof MessageOccurrenceSpecification) {
- nearestObject.getValue().addAll(entry.getValue());
- }
- }
- }
-
- return nearestObject;
- }
-
- /**
- * Complete the map of occurrences and their location, by taking in account messages from and to the node edit part
- *
- * @param nodeEditPart
- * part to consider message around
- * @param occurrencesMap
- * the map to complete
- */
- private static void completeOccurrencesMapWithMessages(GraphicalEditPart nodeEditPart, Map<Point, List<OccurrenceSpecification>> occurrencesMap) {
- // messages to the node
- List<?> targetConnections = nodeEditPart.getTargetConnections();
- for(Object conn : targetConnections) {
- if(conn instanceof ConnectionNodeEditPart) {
- EObject element = ((ConnectionNodeEditPart)conn).resolveSemanticElement();
- if(element instanceof Message && ((Message)element).getReceiveEvent() instanceof MessageOccurrenceSpecification) {
- // finish events of the message
- IFigure figure = ((ConnectionNodeEditPart)conn).getFigure();
- if(figure instanceof AbstractPointListShape) {
- Point end = getAbsoluteEdgeExtremity((ConnectionNodeEditPart)conn, false);
- if(!occurrencesMap.containsKey(end)) {
- occurrencesMap.put(end, new ArrayList<OccurrenceSpecification>(1));
- }
- occurrencesMap.get(end).add((MessageOccurrenceSpecification)((Message)element).getReceiveEvent());
- }
- }
- }
- }
- // messages from the node
- List<?> sourceConnections = nodeEditPart.getSourceConnections();
- for(Object conn : sourceConnections) {
- if(conn instanceof ConnectionNodeEditPart) {
- EObject element = ((ConnectionNodeEditPart)conn).resolveSemanticElement();
- if(element instanceof Message && ((Message)element).getSendEvent() instanceof MessageOccurrenceSpecification) {
- // start events of the message
- IFigure figure = ((ConnectionNodeEditPart)conn).getFigure();
- if(figure instanceof AbstractPointListShape) {
- Point start = getAbsoluteEdgeExtremity((ConnectionNodeEditPart)conn, true);
- if(!occurrencesMap.containsKey(start)) {
- occurrencesMap.put(start, new ArrayList<OccurrenceSpecification>(1));
- }
- occurrencesMap.get(start).add((MessageOccurrenceSpecification)((Message)element).getSendEvent());
- }
- }
- }
- }
- }
-
- /**
- * The position of the part where the event is linked
- *
- * @param occSpec
- * the occurrence specification
- * @param timeElementPart
- * the part representing time element (duration/time constraint/observation)
- * @return one of {@link PositionConstants#TOP}, {@link PositionConstants#CENTER}, {@link PositionConstants#BOTTOM},
- * {@link PositionConstants#NONE}
- */
- public static int positionWhereEventIsLinkedToPart(OccurrenceSpecification occSpec, IBorderItemEditPart timeElementPart) {
- EObject timeElement = timeElementPart.resolveSemanticElement();
- if(timeElement instanceof TimeObservation) {
- if(occSpec.equals(((TimeObservation)timeElement).getEvent())) {
- return PositionConstants.CENTER;
- } else {
- return PositionConstants.NONE;
- }
- } else if(timeElement instanceof TimeConstraint) {
- if(((TimeConstraint)timeElement).getConstrainedElements().contains(occSpec)) {
- return PositionConstants.CENTER;
- } else {
- return PositionConstants.NONE;
- }
- } else if(timeElement instanceof DurationConstraint) {
- if(((DurationConstraint)timeElement).getConstrainedElements().contains(occSpec)) {
- List<Element> events = ((DurationConstraint)timeElement).getConstrainedElements();
- LifelineEditPart lifelinePart = getParentLifelinePart(timeElementPart);
- if(lifelinePart != null && events.size() >= 2) {
- OccurrenceSpecification otherEvent = null;
- if(!occSpec.equals(events.get(0)) && events.get(0) instanceof OccurrenceSpecification) {
- otherEvent = (OccurrenceSpecification)events.get(0);
- } else if(!occSpec.equals(events.get(1)) && events.get(1) instanceof OccurrenceSpecification) {
- otherEvent = (OccurrenceSpecification)events.get(1);
- }
- if(otherEvent != null) {
- Point otherLoc = findLocationOfEvent(lifelinePart, otherEvent);
- Point thisLoc = findLocationOfEvent(lifelinePart, occSpec);
- if(otherLoc != null && thisLoc != null) {
- if(otherLoc.y > thisLoc.y) {
- return PositionConstants.TOP;
- } else {
- return PositionConstants.BOTTOM;
- }
- }
- }
- }
- } else {
- return PositionConstants.NONE;
- }
- }
- return PositionConstants.NONE;
- }
-
- /**
- * Return the lifeline edit part containing this part (directly or indirectly)
- *
- * @param nodeEditPart
- * the contained edit part or itself
- * @return lifeline edit part or null
- */
- public static LifelineEditPart getParentLifelinePart(EditPart nodeEditPart) {
- EditPart parent = nodeEditPart;
- while(parent != null) {
- if(parent instanceof LifelineEditPart) {
- return (LifelineEditPart)parent;
- } else {
- parent = parent.getParent();
- }
- }
- return null;
- }
-
- /**
- * Get the edit part (message, execution, or destruction event) which starts or finishes with the event on the given lifeline part
- *
- * @param lifelinePart
- * the lifeline edit part on which the event is located
- * @param event
- * the event
- * @return the edit part of which an end is defined by event on the lifelinePart edit part
- */
- public static EditPart getLinkedEditPart(EditPart lifelinePart, OccurrenceSpecification event) {
- if(event instanceof MessageOccurrenceSpecification) {
- // get parts representing the message linked with the event
- Message message = ((MessageOccurrenceSpecification)event).getMessage();
- if(message == null) {
- return null;
- }
- Collection<Setting> settings = CacheAdapter.INSTANCE.getNonNavigableInverseReferences(message);
- for(Setting ref : settings) {
- if(NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
- View view = (View)ref.getEObject();
- EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelinePart);
- // the message part must start or finish on the lifeline (with the event)
- if(part instanceof ConnectionEditPart) {
- EditPart lifelineChild = null;
- if(event.equals(message.getSendEvent())) {
- lifelineChild = ((ConnectionEditPart)part).getSource();
- } else if(event.equals(message.getReceiveEvent())) {
- lifelineChild = ((ConnectionEditPart)part).getTarget();
- }
- LifelineEditPart parentLifeline = getParentLifelinePart(lifelineChild);
- if(lifelinePart.equals(parentLifeline)) {
- return part;
- }
- }
- }
- }
- } else if(event instanceof ExecutionOccurrenceSpecification) {
- // get parts representing the execution linked with the event
- ExecutionSpecification execution = ((ExecutionOccurrenceSpecification)event).getExecution();
- if(execution == null) {
- return null;
- }
- Collection<Setting> settings = CacheAdapter.INSTANCE.getNonNavigableInverseReferences(execution);
- for(Setting ref : settings) {
- if(NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
- View view = (View)ref.getEObject();
- EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelinePart);
- // the execution part must be on the lifeline
- EditPart lifelineChild = part;
- LifelineEditPart parentLifeline = getParentLifelinePart(lifelineChild);
- if(lifelinePart.equals(parentLifeline)) {
- return part;
- }
- }
- }
- } else {
- // get parts representing the destruction event linked with the event
- for(Object lifelineChild : lifelinePart.getChildren()) {
- if(lifelineChild instanceof DestructionOccurrenceSpecificationEditPart) {
- EObject destr = ((DestructionOccurrenceSpecificationEditPart)lifelineChild).resolveSemanticElement();
- if(destr instanceof DestructionOccurrenceSpecification && destr.equals(event)) {
- return (EditPart)lifelineChild;
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Get the object safely casted as a list of OccurrenceSpecification
- *
- * @param occurrenceSpecificationList
- * the object which is supposed to be a list of OccurrenceSpecification
- */
- public static List<OccurrenceSpecification> getAsOccSpecList(Object occurrenceSpecificationList) {
- if(occurrenceSpecificationList instanceof List<?>) {
- List<?> list = (List<?>)occurrenceSpecificationList;
- if(!list.isEmpty()) {
- List<OccurrenceSpecification> newList = new ArrayList<OccurrenceSpecification>(list.size());
- for(Object elt : list) {
- if(elt instanceof OccurrenceSpecification) {
- newList.add((OccurrenceSpecification)elt);
- }
- }
- return newList;
- }
- }
- return Collections.emptyList();
- }
-
- /**
- * Get the pair of OccurrenceSpecification which a duration constraint or observation should be created between
- *
- * @param occ1List
- * the list of occurrences at the same time, among which the first one must be chosen
- * @param occ2List
- * the list of occurrences at the same time, among which the second one must be chosen
- * @return size two array of OccurrenceSpecification which can be linked or null
- */
- public static OccurrenceSpecification[] getPairOfCorrespondingOccSpec(List<OccurrenceSpecification> occ1List, List<OccurrenceSpecification> occ2List) {
- // check for occurrences linked by a message
- for(OccurrenceSpecification occ1 : occ1List) {
- for(OccurrenceSpecification occ2 : occ2List) {
- if(DurationConstraintHelper.endsOfSameMessage(occ1, occ2)) {
- // we must link occurrences of a message
- return new OccurrenceSpecification[]{ occ1, occ2 };
- }
- }
- }
- // check for occurrences on a same lifeline
- for(OccurrenceSpecification occ1 : occ1List) {
- if(occ1 instanceof MessageOccurrenceSpecification) {
- Message mess = ((MessageOccurrenceSpecification)occ1).getMessage();
- if(mess.getReceiveEvent().equals(occ1) && MessageSort.SYNCH_CALL_LITERAL.equals(mess.getMessageSort())) {
- // filter receive event, we prefer the corresponding start event at the same location
- continue;
- }
- }
- for(OccurrenceSpecification occ2 : occ2List) {
- if(occ2 instanceof MessageOccurrenceSpecification) {
- Message mess = ((MessageOccurrenceSpecification)occ2).getMessage();
- if(mess.getReceiveEvent().equals(occ2) && MessageSort.SYNCH_CALL_LITERAL.equals(mess.getMessageSort())) {
- // filter receive event, we prefer the corresponding start event at the same location
- continue;
- }
- }
- if(DurationConstraintHelper.coversSameLifeline(occ1, occ2)) {
- // we must link occurrences on a same lifeline
- return new OccurrenceSpecification[]{ occ1, occ2 };
- }
- }
- }
- return null;
- }
-
- public static List<Element> getCombinedFragmentAssociatedElement(CombinedFragment cf) {
- List<Element> elements = new LinkedList<Element>();
-
- for(InteractionOperand operand : cf.getOperands()) {
- // Add all elements related to this operand
- elements.addAll(getInteractionOperandAssociatedElement(operand));
- // Add this operand
- elements.add(operand);
- }
- return elements;
-
- }
-
- public static List<Element> getInteractionOperandAssociatedElement(InteractionOperand interactionOperand) {
- List<Element> elements = new LinkedList<Element>();
- for(InteractionFragment itf : interactionOperand.getFragments()) {
- if(itf instanceof CombinedFragment) {
- // add the combinedFragment
- elements.addAll(getCombinedFragmentAssociatedElement((CombinedFragment)itf));
- }
- elements.add(itf);
- if(itf instanceof MessageOccurrenceSpecification) {
- MessageOccurrenceSpecification mos = (MessageOccurrenceSpecification)itf;
- if(mos.getMessage() != null) {
- elements.add(mos.getMessage());
- }
- }
- }
- return elements;
- }
-
- public static void handleMessageSortChange(EditingDomain editingDomain, Notification notification, Message message, MessageSort expectedMessageSort) {
- //This restriction isn't needed anymore, as the Property View offers a refactoring
- //facility for the MessageSort. The refactoring is only available for AsynchCall to
- //AsynchSignal and vice-versa.
- //However, the modification of the MessageSort from the "Advanced" property view should still be forbidden.
-
- Object feature = notification.getFeature();
-
- if(UMLPackage.eINSTANCE.getMessage_MessageSort().equals(feature) && !expectedMessageSort.equals(notification.getNewValue())) {
- Object oldValue = notification.getOldValue();
- Object newValue = notification.getNewValue();
- if(oldValue instanceof MessageSort) {
- if(!((oldValue == MessageSort.ASYNCH_CALL_LITERAL && newValue == MessageSort.ASYNCH_SIGNAL_LITERAL) || (oldValue == MessageSort.ASYNCH_SIGNAL_LITERAL && newValue == MessageSort.ASYNCH_CALL_LITERAL))) {
- MessageDialog.openWarning(Display.getCurrent().getActiveShell(), BLOCK_SORT_MODIFICATION_TITLE, BLOCK_SORT_MODIFICATION_MSG);
- CommandHelper.executeCommandWithoutHistory(editingDomain, SetCommand.create(editingDomain, message, feature, notification.getOldValue()), true);
- return;
- }
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- public static Set<Lifeline> getCoveredLifelines(Rectangle selectionRect, EditPart hostEditPart) {
- Set<Lifeline> coveredLifelines = new HashSet<Lifeline>();
-
- // retrieve all the edit parts in the registry
- Set<Entry<Object, EditPart>> allEditPartEntries = hostEditPart.getViewer().getEditPartRegistry().entrySet();
- for(Entry<Object, EditPart> epEntry : allEditPartEntries) {
- EditPart ep = epEntry.getValue();
-
- if(ep instanceof ShapeEditPart) {
- ShapeEditPart sep = (ShapeEditPart)ep;
- EObject elem = sep.getNotationView().getElement();
-
- if(elem instanceof Lifeline) {
- Rectangle figureBounds = getAbsoluteBounds(sep);
-
- if(selectionRect.intersects(figureBounds)) {
- coveredLifelines.add((Lifeline)elem);
- }
- }
- }
- }
- return coveredLifelines;
- }
-
- /**
- * retrieve all the interaction fragments and their related ift at least partially covered by the rectangle, including sub ift like
- * interaction operands in combined fragment.
- *
- * @param selectionRect
- * the rectangle where to look for ift.
- * @param hostEditPart
- * the host edit part used to retrieve all the edit parts in the registry.
- * @param ignoreSet
- * a set of ift to ignore.
- * @return
- * a set containing the covered ift or null if an ift not ignored is not fully covered.
- */
- @SuppressWarnings("unchecked")
- public static Set<InteractionFragment> getCoveredInteractionFragments(Rectangle selectionRect, EditPart hostEditPart, Set<InteractionFragment> ignoreSet) {
- Set<InteractionFragment> coveredInteractionFragments = new HashSet<InteractionFragment>();
-
- if(ignoreSet == null) {
- ignoreSet = new HashSet<InteractionFragment>();
- }
-
- // retrieve all the edit parts in the registry
- Set<Entry<Object, EditPart>> allEditPartEntries = hostEditPart.getViewer().getEditPartRegistry().entrySet();
- for(Entry<Object, EditPart> epEntry : allEditPartEntries) {
- EditPart ep = epEntry.getValue();
-
- if(ep instanceof ShapeEditPart) {
- ShapeEditPart sep = (ShapeEditPart)ep;
- EObject elem = sep.getNotationView().getElement();
-
- if(elem instanceof InteractionFragment && !ignoreSet.contains(elem)) {
- Rectangle figureBounds = getAbsoluteBounds(sep);
-
- // keep the fragment if its figure is completely in the selection
- // if it is inside but not completely this method return null
- if(selectionRect.contains(figureBounds)) {
- coveredInteractionFragments.add((InteractionFragment)elem);
- if(elem instanceof ExecutionSpecification) {
- ExecutionSpecification es = (ExecutionSpecification)elem;
- coveredInteractionFragments.add(es.getStart());
- coveredInteractionFragments.add(es.getFinish());
- }
- } else {
- Rectangle intersection = selectionRect.getIntersection(figureBounds);
- if(!intersection.equals(new Rectangle()) && !intersection.equals(selectionRect)) {
- return null;
- }
- }
- }
-
- } else if(ep instanceof ConnectionEditPart) {
- ConnectionEditPart cep = (ConnectionEditPart)ep;
- EObject elem = cep.getNotationView().getElement();
-
- // for connections, messages have ends that are ift but don't have theirs own edit parts
- // => use anchors to determine if they should be included in the set
- if(elem instanceof Message) {
- Message msg = (Message)elem;
- Connection msgFigure = cep.getConnectionFigure();
-
- Point sourcePoint = msgFigure.getSourceAnchor().getReferencePoint();
- Point targetPoint = msgFigure.getTargetAnchor().getReferencePoint();
-
- if(selectionRect.contains(sourcePoint)) {
- MessageEnd msgSendEnd = msg.getSendEvent();
- if(msgSendEnd instanceof InteractionFragment) {
- coveredInteractionFragments.add((InteractionFragment)msgSendEnd);
- }
- }
- if(selectionRect.contains(targetPoint)) {
- MessageEnd msgReceiveEnd = msg.getReceiveEvent();
- if(msgReceiveEnd instanceof InteractionFragment) {
- coveredInteractionFragments.add((InteractionFragment)msgReceiveEnd);
- }
- }
- }
- }
- }
- return coveredInteractionFragments;
- }
-
- /**
- * return a command to set the enclosing interaction or interaction operand of an interaction fragment.
- *
- * @param ed
- * The transactional editing domain.
- * @param ift
- * The interaction fragment.
- * @param io
- * the new enclosing interaction.
- * @return The command.
- */
- public static ICommand getSetEnclosingInteractionCommand(final TransactionalEditingDomain ed, final InteractionFragment ift, final EObject interaction) {
- return new AbstractTransactionalCommand(ed, "Set enclosing interaction command", null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- setEnclosingInteraction(ift, interaction, false);
-
- return CommandResult.newOKCommandResult();
- }
- };
- }
-
- /**
- * Set the interaction or interaction operand which contains a fragment
- *
- * @param ift
- * fragment to update container
- * @param interaction
- * new containing interaction or interaction operand
- * @param forceIfCoregion
- * force the set even if fragment belong to a coregion. Use true only when you are sure the fragment no longer belongs to a coregion's
- * operand.
- */
- public static void setEnclosingInteraction(InteractionFragment ift, EObject interaction, boolean forceIfCoregion) {
- if(ift != null) {
- if(interaction instanceof Interaction) {
- if(!interaction.equals(ift.getEnclosingInteraction())) {
- // check case when mos looks outside but is in a coregion.
- if(!forceIfCoregion && ift instanceof MessageOccurrenceSpecification) {
- InteractionOperand operand = ift.getEnclosingOperand();
- if(operand != null) {
- Element cf = operand.getOwner();
- if(cf instanceof CombinedFragment && InteractionOperatorKind.PAR_LITERAL.equals(((CombinedFragment)cf).getInteractionOperator())) {
- // was in a coregion. Check whether other mos is still in the coregion
- Message mess = ((MessageOccurrenceSpecification)ift).getMessage();
- // find other mos
- MessageOccurrenceSpecification otherMos = null;
- if(ift.equals(mess.getSendEvent()) && mess.getReceiveEvent() instanceof MessageOccurrenceSpecification) {
- otherMos = (MessageOccurrenceSpecification)mess.getReceiveEvent();
- } else if(ift.equals(mess.getReceiveEvent()) && mess.getSendEvent() instanceof MessageOccurrenceSpecification) {
- otherMos = (MessageOccurrenceSpecification)mess.getSendEvent();
- }
- if(otherMos != null) {
- // check that it is in a coregion (specific code is in charge of taking it out in ReconnectMessageHelper)
- if(operand.equals(otherMos.getEnclosingOperand())) {
- return;
- }
- }
- }
- }
- }
- ift.setEnclosingOperand(null);
- ift.setEnclosingInteraction((Interaction)interaction);
- }
- } else if(interaction instanceof InteractionOperand) {
- if(!interaction.equals(ift.getEnclosingOperand())) {
- ift.setEnclosingInteraction(null);
- ift.setEnclosingOperand((InteractionOperand)interaction);
- }
- }
- }
- }
-
- /**
- * return a command to add a covered lifeline to an interaction fragment.
- *
- * @param ed
- * The transactional editing domain.
- * @param ift
- * The interaction fragment.
- * @param lifeline
- * the lifeline.
- * @return The command.
- */
- public static ICommand getAddCoveredLifelineCommand(final TransactionalEditingDomain ed, final InteractionFragment ift, final Lifeline lifeline) {
- return new AbstractTransactionalCommand(ed, "Add covered lifeline command", null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- ift.getCovereds().add(lifeline);
- return CommandResult.newOKCommandResult();
- }
- };
- }
-
- /**
- * return a command to remove a previously covered lifeline of an interaction fragment.
- *
- * @param ed
- * The transactional editing domain.
- * @param ift
- * The interaction fragment.
- * @param lifeline
- * the lifeline.
- * @return The command.
- */
- public static ICommand getRemoveCoveredLifelineCommand(final TransactionalEditingDomain ed, final InteractionFragment ift, final Lifeline lifeline) {
- return new AbstractTransactionalCommand(ed, "Add covered lifeline command", null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- ift.getCovereds().remove(lifeline);
- return CommandResult.newOKCommandResult();
- }
- };
- }
-
- /**
- * Create a command to update the enclosing interaction of a message end according to its new location.
- *
- * @param movedMos
- * the moved Message Occurrence Specification
- * @param newLocation
- * the new absolute location
- * @param editPart
- * any adit part of the corresponding diagram
- * @return the command or null if nothing changes
- */
- //@SuppressWarnings("unchecked")
- public static Command createUpdateEnclosingInteractionCommand(MessageOccurrenceSpecification movedMos, Point newLocation, GraphicalEditPart editPart) {
-
- // // calculate new bounds for the execution specification
- // Rectangle absoluteNewBounds = executionSpecificationEP.getFigure().getBounds().getCopy();
- //
- // executionSpecificationEP.getFigure().getParent().translateToAbsolute(absoluteNewBounds);
- //
- // absoluteNewBounds.translate(moveDelta);
- // absoluteNewBounds.resize(sizeDelta);
- //
- // int xCenter = absoluteNewBounds.getCenter().x;
- //
- // Rectangle top = new Rectangle(xCenter, absoluteNewBounds.y, 0, 0);
- // Rectangle bottom = new Rectangle(xCenter, absoluteNewBounds.bottom(), 0, 0);
- //
- // // associate es with its bounds, and start and finish event with the top and bottom of the bounds
- HashMap<InteractionFragment, Rectangle> iftToCheckForUpdate = new HashMap<InteractionFragment, Rectangle>();
- //
- // ExecutionSpecification es = (ExecutionSpecification)executionSpecificationEP.resolveSemanticElement();
-
- iftToCheckForUpdate.put(movedMos, new Rectangle(newLocation, new Dimension()));
-
- // iftToCheckForUpdate.put(es.getStart(), top);
- //
- // iftToCheckForUpdate.put(es.getFinish(), bottom);
- //
- // List<ConnectionEditPart> sourceConnectionEPs = executionSpecificationEP.getSourceConnections();
- //
- // // find possible ifts associated with messages connected to the moved es
- // for(ConnectionEditPart sourceConnectionEP : sourceConnectionEPs) {
- // EObject elem = sourceConnectionEP.getNotationView().getElement();
- //
- // // for connections, messages have ends that can be ift but don't have theirs own edit parts
- // // => use anchors to determine position
- // if(elem instanceof Message) {
- // Message msg = (Message)elem;
- // MessageEnd sendEvent = msg.getSendEvent();
- // if(sendEvent instanceof InteractionFragment) {
- // Connection msgFigure = sourceConnectionEP.getConnectionFigure();
- //
- // Point sourcePoint = msgFigure.getSourceAnchor().getLocation(msgFigure.getTargetAnchor().getReferencePoint());
- //
- // iftToCheckForUpdate.put((InteractionFragment)sendEvent, new Rectangle(sourcePoint.x + moveDelta.x, sourcePoint.y + moveDelta.y, 0, 0));
- // }
- // }
- // }
- //
- // List<ConnectionEditPart> targetConnectionEPs = executionSpecificationEP.getTargetConnections();
- //
- // for(ConnectionEditPart targetConnectionEP : targetConnectionEPs) {
- // EObject elem = targetConnectionEP.getNotationView().getElement();
- //
- // if(elem instanceof Message) {
- // Message msg = (Message)elem;
- // MessageEnd receiveEvent = msg.getReceiveEvent();
- // if(receiveEvent instanceof InteractionFragment) {
- // Connection msgFigure = targetConnectionEP.getConnectionFigure();
- //
- // Point targetPoint = msgFigure.getTargetAnchor().getLocation(msgFigure.getSourceAnchor().getReferencePoint());
- //
- // iftToCheckForUpdate.put((InteractionFragment)receiveEvent, new Rectangle(targetPoint.x + moveDelta.x, targetPoint.y + moveDelta.y, 0, 0));
- // }
- // }
- // }
-
- CompoundCommand cmd = new CompoundCommand();
-
- for(Map.Entry<InteractionFragment, Rectangle> entry : iftToCheckForUpdate.entrySet()) {
- InteractionFragment newEnclosingInteraction = findInteractionFragmentContainerAt(entry.getValue(), editPart);
- if(newEnclosingInteraction != null) {
- cmd.add(new ICommandProxy(getSetEnclosingInteractionCommand(editPart.getEditingDomain(), entry.getKey(), newEnclosingInteraction)));
- }
- }
-
- if(!cmd.isEmpty()) {
- return cmd;
- } else {
- return null;
- }
- }
-
- /**
- * Create a command to update the enclosing interaction of an execution specification according to its new bounds.
- *
- * @param executionSpecificationEP
- * the edit part of the execution specification
- * @param absoluteNewBounds
- * the new absolute bounds
- * @return the command or null if nothing changes
- */
- @SuppressWarnings("unchecked")
- public static Command createUpdateEnclosingInteractionCommand(ShapeNodeEditPart executionSpecificationEP, Point moveDelta, Dimension sizeDelta) {
-
- // calculate new bounds for the execution specification
- Rectangle absoluteNewBounds = executionSpecificationEP.getFigure().getBounds().getCopy();
-
- executionSpecificationEP.getFigure().getParent().translateToAbsolute(absoluteNewBounds);
-
- absoluteNewBounds.translate(moveDelta);
- absoluteNewBounds.resize(sizeDelta);
-
- int xCenter = absoluteNewBounds.getCenter().x;
-
- Rectangle top = new Rectangle(xCenter, absoluteNewBounds.y, 0, 0);
- Rectangle bottom = new Rectangle(xCenter, absoluteNewBounds.bottom(), 0, 0);
-
- // associate es with its bounds, and start and finish event with the top and bottom of the bounds
- HashMap<InteractionFragment, Rectangle> iftToCheckForUpdate = new HashMap<InteractionFragment, Rectangle>();
-
- ExecutionSpecification es = (ExecutionSpecification)executionSpecificationEP.resolveSemanticElement();
-
- iftToCheckForUpdate.put(es, absoluteNewBounds);
-
- iftToCheckForUpdate.put(es.getStart(), top);
-
- iftToCheckForUpdate.put(es.getFinish(), bottom);
-
- List<ConnectionEditPart> sourceConnectionEPs = executionSpecificationEP.getSourceConnections();
-
- // find possible ifts associated with messages connected to the moved es
- for(ConnectionEditPart sourceConnectionEP : sourceConnectionEPs) {
- EObject elem = sourceConnectionEP.getNotationView().getElement();
-
- // for connections, messages have ends that can be ift but don't have theirs own edit parts
- // => use anchors to determine position
- if(elem instanceof Message) {
- Message msg = (Message)elem;
- MessageEnd sendEvent = msg.getSendEvent();
- if(sendEvent instanceof InteractionFragment) {
- Connection msgFigure = sourceConnectionEP.getConnectionFigure();
-
- Point sourcePoint = msgFigure.getSourceAnchor().getLocation(msgFigure.getTargetAnchor().getReferencePoint());
-
- iftToCheckForUpdate.put((InteractionFragment)sendEvent, new Rectangle(sourcePoint.x + moveDelta.x, sourcePoint.y + moveDelta.y, 0, 0));
- }
- }
- }
-
- List<ConnectionEditPart> targetConnectionEPs = executionSpecificationEP.getTargetConnections();
-
- for(ConnectionEditPart targetConnectionEP : targetConnectionEPs) {
- EObject elem = targetConnectionEP.getNotationView().getElement();
-
- if(elem instanceof Message) {
- Message msg = (Message)elem;
- MessageEnd receiveEvent = msg.getReceiveEvent();
- if(receiveEvent instanceof InteractionFragment) {
- Connection msgFigure = targetConnectionEP.getConnectionFigure();
-
- Point targetPoint = msgFigure.getTargetAnchor().getLocation(msgFigure.getSourceAnchor().getReferencePoint());
-
- iftToCheckForUpdate.put((InteractionFragment)receiveEvent, new Rectangle(targetPoint.x + moveDelta.x, targetPoint.y + moveDelta.y, 0, 0));
- }
- }
- }
-
- CompoundCommand cmd = new CompoundCommand();
-
- for(Map.Entry<InteractionFragment, Rectangle> entry : iftToCheckForUpdate.entrySet()) {
- InteractionFragment newEnclosingInteraction = findInteractionFragmentContainerAt(entry.getValue(), executionSpecificationEP);
- if(newEnclosingInteraction != null) {
- cmd.add(new ICommandProxy(getSetEnclosingInteractionCommand(executionSpecificationEP.getEditingDomain(), entry.getKey(), newEnclosingInteraction)));
- }
- }
-
- if(!cmd.isEmpty()) {
- return cmd;
- } else {
- return null;
- }
- }
-
- /**
- * Find the edit part a connection should be reconnected to at a given reference point on a lifeline
- *
- * @param lifelinePart
- * lifeline part on which the reconnection must be performed
- * @param referencePoint
- * the reference point
- * @return lifeline or execution specification edit part to reconnect to (the most external in the lifeline)
- */
- public static GraphicalEditPart findPartToReconnectTo(LifelineEditPart lifelinePart, Point referencePoint) {
- Rectangle absoluteLifelineBounds = getAbsoluteBounds(lifelinePart);
- // inspect children nodes of lifeline
- List<?> children = lifelinePart.getChildren();
- GraphicalEditPart adequateExecutionPart = null;
- int maxDeltaWithMiddle = 0;
- for(Object child : children) {
- // children executions
- if(child instanceof ActionExecutionSpecificationEditPart || child instanceof BehaviorExecutionSpecificationEditPart || child instanceof CombinedFragment2EditPart) {
- GraphicalEditPart childPart = (GraphicalEditPart)child;
- Rectangle absoluteBounds = getAbsoluteBounds(childPart);
- // enlarge absolute bounds to contain also the right and bottom edges.
- absoluteBounds.expand(1, 1);
- if(absoluteBounds.contains(referencePoint)) {
- // this is an adequate execution part, take the most external one
- int deltaWithMiddle = Math.abs(absoluteBounds.getTop().x - absoluteLifelineBounds.getTop().x);
- if(deltaWithMiddle >= maxDeltaWithMiddle) {
- maxDeltaWithMiddle = deltaWithMiddle;
- adequateExecutionPart = childPart;
- }
- }
- }
- }
- if(adequateExecutionPart != null) {
- return adequateExecutionPart;
- }
- return lifelinePart;
- }
-
- /**
- * Find the range of possible locations an occurrence specification should be drawn in.
- *
- * @param lifelineEditPart
- * the lifeline on which the occurrence specification appears.
- * @param occSpec
- * the occurrence specification to find locations for.
- * @return rectangle within which the occurrence specification must be drawn (width is not significative)
- */
- public static Rectangle findPossibleLocationsForEvent(LifelineEditPart lifelineEditPart, OccurrenceSpecification occSpec) {
- // at least, we know the event is in the drawn lifeline
- Rectangle result = lifelineEditPart.getContentPane().getBounds().getCopy();
- lifelineEditPart.getFigure().translateToAbsolute(result);
-
-
- // find the containing pane
- IGraphicalEditPart containerPart = findDrawnContainerEditPart(lifelineEditPart, occSpec);
- IFigure drawnContentPane = getContentPaneThatCanContainFragments(containerPart);
- if(drawnContentPane != null) {
- // content pane is the smallest drawn owning rectangle
- Rectangle bounds = drawnContentPane.getBounds().getCopy();
- drawnContentPane.getParent().translateToAbsolute(bounds);
- // intersect with the lifeline's content
- result.intersect(bounds);
- }
-
- // we must search surrounding interaction fragments within uppestContainerToSearchInto
- EObject uppestContainerToSearchInto = containerPart.resolveSemanticElement();
-
- InteractionFragment after = InteractionFragmentHelper.findNextFragment(occSpec, uppestContainerToSearchInto);
- boolean foundNextFragment = false;
- while(!foundNextFragment && after != null) {
- Point bottom = findLocationOfEvent(lifelineEditPart, after);
- if(bottom != null && result.contains(bottom)) {
- int diff = bottom.y - result.bottom();
- result.resize(0, diff);
- foundNextFragment = true;
- } else {
- // fragment not represented on lifeline, search next fragment
- after = InteractionFragmentHelper.findNextFragment(after, uppestContainerToSearchInto);
- }
- }
- InteractionFragment before = InteractionFragmentHelper.findPreviousFragment(occSpec, uppestContainerToSearchInto);
- boolean foundPreviousFragment = false;
- while(!foundPreviousFragment && before != null) {
- Point top = findLocationOfEvent(lifelineEditPart, before);
- if(top != null && result.contains(top)) {
- int diff = top.y - result.y;
- result.translate(0, diff);
- result.resize(0, -diff);
- foundPreviousFragment = true;
- /*
- * In case before is contained in an interaction operand or
- * combined fragment which does not contain the searched event,
- * we must also take in account the bottom border of this node.
- */
- reduceByNodeContainingBefore(result, before, occSpec, lifelineEditPart);
- } else {
- // fragment not represented on lifeline, search next fragment
- before = InteractionFragmentHelper.findPreviousFragment(before, uppestContainerToSearchInto);
- }
- }
- return result;
- }
-
- /**
- * Reduce the possible bounds by removing the area of an eventual interaction operand or combined fragment which contains the fragment "before"
- * and not the occurrence specification for which we search a location.
- *
- * @param possibleBounds
- * bounds to reduce, in which the location will be possible
- * @param before
- * the fragment which happens before
- * @param occSpec
- * the occurrence specification for which we search a location
- * @param lifelineEditPart
- * the lifeline on which the occurrence specification appears.
- */
- private static void reduceByNodeContainingBefore(Rectangle possibleBounds, InteractionFragment before, OccurrenceSpecification occSpec, LifelineEditPart lifelineEditPart) {
- Element eventualNodeElement = before;
- // inspect each container of before, until it is common with occSpec
- while(!EcoreUtil.isAncestor(eventualNodeElement, occSpec)) {
- // test if eventualNodeElement has bounds excluding occSpec
- // search for the eventualNodeElement's edit part
- List<View> views = DiagramEditPartsUtil.findViews(eventualNodeElement, lifelineEditPart.getViewer());
- for(View view : views) {
- EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelineEditPart);
- // test if edit part is an adequate node
- if(part instanceof IGraphicalEditPart && getContentPaneThatCanContainFragments(part) != null) {
- Rectangle bounds = getAbsoluteBounds((IGraphicalEditPart)part);
- // reduce so that the bounds are excluded
- int newPossibleTop = bounds.bottom();
- if(possibleBounds.y < newPossibleTop) {
- int diff = newPossibleTop - possibleBounds.y;
- possibleBounds.translate(0, diff);
- possibleBounds.resize(0, -diff);
- }
- }
- }
- eventualNodeElement = eventualNodeElement.getOwner();
- }
- }
-
- /**
- * Get the content pane of an edit part that can directly or indirectly contain interaction fragments (this excludes lifeline, which references)
- *
- * @param containerPart
- * container edit part
- * @return its content pane if the container can contain fragments, null otherwise.
- */
- private static IFigure getContentPaneThatCanContainFragments(EditPart containerPart) {
- // test all owner edit parts which can contain an interaction fragment
- if(containerPart instanceof InteractionOperandEditPart) {
- return ((InteractionOperandEditPart)containerPart).getContentPane();
- } else if(containerPart instanceof CombinedFragmentEditPart) {
- return ((CombinedFragmentEditPart)containerPart).getContentPane();
- } else if(containerPart instanceof CombinedFragment2EditPart) {
- return ((CombinedFragment2EditPart)containerPart).getContentPane();
- } else if(containerPart instanceof ContinuationEditPart) {
- return ((ContinuationEditPart)containerPart).getContentPane();
- } else if(containerPart instanceof InteractionUseEditPart) {
- return ((InteractionUseEditPart)containerPart).getContentPane();
- } else if(containerPart instanceof InteractionEditPart) {
- return ((InteractionEditPart)containerPart).getContentPane();
- }
- return null;
- }
-
- /**
- * Find the smallest drawn edit part containing the occurrence specification.
- *
- * @param lifelineEditPart
- * support lifeline edit part
- * @param occSpec
- * occurrence specification to localize
- * @return a drawn edit part which element contains the occurrence specification or null
- */
- private static IGraphicalEditPart findDrawnContainerEditPart(LifelineEditPart lifelineEditPart, OccurrenceSpecification occSpec) {
- // find containing drawn edit parts
- Element owner = occSpec.getOwner();
- while(owner != null) {
- // search for the owner's edit part
- List<View> views = DiagramEditPartsUtil.findViews(owner, lifelineEditPart.getViewer());
- for(View view : views) {
- EditPart part = DiagramEditPartsUtil.getEditPartFromView(view, lifelineEditPart);
- // test if edit part can contain the occurrence specification
- if(part instanceof IGraphicalEditPart && getContentPaneThatCanContainFragments(part) != null) {
- return (IGraphicalEditPart)part;
- }
- }
- owner = owner.getOwner();
- }
- return null;
- }
-
- /**
- * Check whether the Lifeline is Create Message's target node
- * @param lifelineEP
- * @return boolean
- */
- public static boolean isCreateMessageEndLifeline(LifelineEditPart lifelineEP){
- List<Object> targetConnections = lifelineEP.getTargetConnections();
- if(targetConnections!=null && targetConnections.size()>0){
- for(int i = 0;i<targetConnections.size();i++){
- Object connection = targetConnections.get(i);
- if(connection instanceof Message4EditPart){
- return true;
- }
- }
- }
- return false;
- }
-
-
- /**
- * Find Time Observations editpart which are related to specific OccurenceSpecification
- * @param lifelinePart
- * @param oss
- * @return List<TimeObservationLabelEditPart>
- */
- public static List<TimeObservationLabelEditPart> findOccurenceSpecificationRelatedTimeObservationPart(LifelineEditPart lifelinePart,List<OccurrenceSpecification> oss){
- List<TimeObservationLabelEditPart> list = new ArrayList<TimeObservationLabelEditPart>();
- if(oss == null || oss.size() == 0){
- return list;
- }
- if(lifelinePart!=null&&lifelinePart.getTargetConnections().size()>0){
- for(Object targetConnection : lifelinePart.getTargetConnections()){
- if(targetConnection instanceof ObservationLinkEditPart){
- ObservationLinkEditPart observationLinkEditPart = (ObservationLinkEditPart)targetConnection;
- if(observationLinkEditPart.getSource() instanceof TimeObservationLabelEditPart){
- TimeObservationLabelEditPart source = (TimeObservationLabelEditPart)observationLinkEditPart.getSource();
- EObject timeElement = source.resolveSemanticElement();
- if(timeElement instanceof TimeObservation) {
- if(oss.contains(((TimeObservation)timeElement).getEvent())) {
- list.add(source);
- }
- }
- }
- }
- }
- }
- return list;
- }
-
- /**
- * Find Time Observations editpart which are related to specific OccurenceSpecification
- * @param lifelinePart
- * @param os
- * @return List<TimeObservationLabelEditPart>
- */
- public static List<TimeObservationLabelEditPart> findOccurenceSpecificationRelatedTimeObservationPart(LifelineEditPart lifelinePart,OccurrenceSpecification os){
- List<OccurrenceSpecification> oss = new ArrayList<OccurrenceSpecification>();
- oss.add(os);
- return findOccurenceSpecificationRelatedTimeObservationPart(lifelinePart, oss);
- }
-
- /**
- * Find specific editpart by semantic model
- * @param editPart
- * @param targetElement
- * @param targetClass
- * @return EditPart
- */
- public static EditPart getEditPart(EditPart editPart,
- EObject targetElement, Class targetClass) {
- if (editPart == null || targetElement == null || targetClass == null)
- return null;
- Map<?, ?> map = editPart.getViewer().getEditPartRegistry();
- for (Entry<?, ?> entry : map.entrySet()) {
- Object key = entry.getKey();
- if (!(key instanceof View)) {
- continue;
- }
- View view = (View) key;
- EObject tempElement = view.getElement();
- if (targetElement.equals(tempElement)) {
- Object value = entry.getValue();
- if (value.getClass() == targetClass) {
- return (EditPart) value;
- }
- }
- }
- return null;
- }
-
- /**
- * Intall observation link policy to specific editpart
- * @param editPart
- */
- public static void installObservationLinkPolicy(EditPart editPart) {
- String editPolicy = "observationlink";
- if (editPart instanceof LifelineEditPart
- || editPart instanceof TimeObservationLabelEditPart) {
- editPart.installEditPolicy(editPolicy,
- new ObservationLinkPolicy(editPart));
- }
- if (editPart instanceof DurationObservationEditPart) {
- editPart.installEditPolicy(editPolicy,
- new ObservationLinkPolicy(editPart));
- }
- if (editPart instanceof MessageEditPart
- || editPart instanceof Message2EditPart
- || editPart instanceof Message3EditPart
- || editPart instanceof Message4EditPart
- || editPart instanceof Message5EditPart
- || editPart instanceof Message6EditPart
- || editPart instanceof Message7EditPart) {
- editPart.installEditPolicy(editPolicy,
- new ObservationLinkPolicy(editPart));
- } else if (editPart instanceof MessageNameEditPart
- || editPart instanceof MessageName2EditPart
- || editPart instanceof MessageName3EditPart
- || editPart instanceof MessageName4EditPart
- || editPart instanceof MessageName5EditPart
- || editPart instanceof MessageName6EditPart
- || editPart instanceof MessageName7EditPart) {
- editPart.getParent().installEditPolicy(editPolicy,
- new ObservationLinkPolicy(editPart));
- } else if (editPart instanceof MessageSyncAppliedStereotypeEditPart
- || editPart instanceof MessageAsyncAppliedStereotypeEditPart
- || editPart instanceof MessageReplyAppliedStereotypeEditPart
- || editPart instanceof MessageCreateAppliedStereotypeEditPart
- || editPart instanceof MessageDeleteAppliedStereotypeEditPart
- || editPart instanceof MessageLostAppliedStereotypeEditPart
- || editPart instanceof MessageFoundAppliedStereotypeEditPart) {
- editPart.getParent().installEditPolicy(editPolicy,
- new ObservationLinkPolicy(editPart));
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/FragmentOrderingKeeper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/FragmentOrderingKeeper.java
deleted file mode 100644
index 559d6df2f31..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/FragmentOrderingKeeper.java
+++ /dev/null
@@ -1,823 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.validation;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TreeMap;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.validation.IValidationContext;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.common.util.MDTUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.DestructionOccurrenceUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.GeneralOrdering;
-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.Message;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.MessageSort;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * This class is a validator which ensures that :<br/>
- * <li>
- * <ul>
- * In the order Interaction's fragment property, the order is kept as a valid trace,
- * </ul>
- * <ul>
- * Or at least, when there is no valid trace, that the order is kept for each lifeline (not to loose sequence information on a lifeline, which is
- * contained only graphically otherwise).
- * </ul>
- * </li> <br/>
- * Note that this class contains an algorithm which computes a valid trace. With little adaptation, it could easily provide all valid traces, hence,
- * compare two lifelines to know whether they are equivalent.
- *
- * @author vhemery
- */
-public class FragmentOrderingKeeper {
-
- /** A constant equals to half the smallest location delta */
- private static final float HALF_UNIT = (float)0.5;
-
- /** Format for displaying an element's name */
- private static final String NAME_FORMAT = "<{0}> {1}";
-
- /** map with, for a given index, the fragments which have been put with an optional order (may change) */
- private Map<Integer, List<InteractionFragment>> optionallyOrderedFragments;
-
- private EList<InteractionFragment> orderedFragments;
-
- private Set<Lifeline> constrainingNotRepresentedLifelines;
-
- private Set<LifelineEditPart> constrainingLifelineParts;
-
- private Set<Message> constrainingMessages;
-
- private Set<ExecutionSpecification> constrainingExecutions;
-
- private Set<GeneralOrdering> constrainingGeneralOrderings;
-
- /* private Set<CombinedFragment> constrainingCombinedFragments; */
-
- private List<List<InteractionFragment>> orderConstraints;
-
- private Set<InteractionFragment> conflictingFragments;
-
- /**
- * Validate modification and update the interaction's fragments order if necessary.
- *
- * @see org.eclipse.emf.validation.AbstractModelConstraint#validate(org.eclipse.emf.validation.IValidationContext)
- *
- * @param target
- * the target to validate
- * @param ctx
- * validation context
- * @return status
- */
- public IStatus validate(EObject target, IValidationContext ctx) {
- if(target instanceof Interaction) {
- Interaction interaction = (Interaction)target;
- boolean valid = validateOrder(interaction);
- if(!valid) {
- IStatus status = ctx.createFailureStatus(getConflictingFragmentsFormattedString());
- removeModelReferences();
- return status;
- }
- } else if(target instanceof InteractionOperand) {
- InteractionOperand interactionOp = (InteractionOperand)target;
- boolean valid = validateOrder(interactionOp);
- if(!valid) {
- IStatus status = ctx.createFailureStatus(getConflictingFragmentsFormattedString());
- removeModelReferences();
- return status;
- }
- } else if(target instanceof InteractionFragment) {
- InteractionFragment fragment = (InteractionFragment)target;
- boolean valid = validateOrder(fragment.getEnclosingInteraction());
- if(!valid) {
- IStatus status = ctx.createFailureStatus(getConflictingFragmentsFormattedString());
- removeModelReferences();
- return status;
- }
- }
- removeModelReferences();
- return ctx.createSuccessStatus();
- }
-
- /**
- * Get a formatted string with names of all conflicting fragments
- *
- * @return formatted string
- */
- private String getConflictingFragmentsFormattedString() {
- StringBuffer buff = new StringBuffer();
- for(InteractionFragment frag : conflictingFragments) {
- buff.append(System.getProperty("line.separator"));
- String name = NLS.bind(NAME_FORMAT, frag.eClass().getName(), frag.getQualifiedName());
- buff.append(name);
- }
- return buff.toString();
- }
-
- /**
- * Remove any reference to model elements to avoid memory loss
- */
- private void removeModelReferences() {
- // orderedFragments is an EList, hence, we must not empty it.
- orderedFragments = null;
- // other lists can be cleared.
- if(constrainingLifelineParts != null) {
- constrainingLifelineParts.clear();
- }
- if(constrainingMessages != null) {
- constrainingMessages.clear();
- }
- if(constrainingExecutions != null) {
- constrainingExecutions.clear();
- }
- if(constrainingGeneralOrderings != null) {
- constrainingGeneralOrderings.clear();
- }
- //constrainingCombinedFragments.clear();
- if(orderConstraints != null) {
- orderConstraints.clear();
- }
- if(conflictingFragments != null) {
- conflictingFragments.clear();
- }
- if(optionallyOrderedFragments != null) {
- optionallyOrderedFragments.clear();
- }
- }
-
- /**
- * Validate the order of interaction operand's fragments
- *
- * @param interactionOperand
- * the interaction operand
- * @return true if a valid trace has been computed, false if none exists
- */
- private boolean validateOrder(InteractionOperand interactionOperand) {
- orderedFragments = interactionOperand.getFragments();
- computeConstraints();
- return reorderFragmentsInAValidTrace();
- }
-
- /**
- * Validate the order of interaction's fragments
- *
- * @param interaction
- * the interaction
- * @return true if a valid trace has been computed, false if none exists
- */
- private boolean validateOrder(Interaction interaction) {
- orderedFragments = interaction.getFragments();
- computeConstraints();
- return reorderFragmentsInAValidTrace();
- }
-
- /**
- * Compute constraints defined on fragments.<br/>
- * These are given by (by priority order):<br/>
- * <li>
- * <ul>
- * Lifelines (graphical location and previous order of elements not drawn)
- * </ul>
- * <ul>
- * Combined Fragments (graphical order of InteractionOperands in case no Lifeline is covered)
- * </ul>
- * <ul>
- * Messages (send > receive)
- * </ul>
- * ExecutionSpecifications (start > execution > finish)
- * <ul>
- * <ul>
- * General Orderings (before > after)
- * </ul>
- * </li>
- */
- private void computeConstraints() {
- IEditorPart editor = MDTUtil.getActiveEditor();
- DiagramEditPart diagram = null;
- if(editor instanceof IDiagramWorkbenchPart) {
- diagram = ((IDiagramWorkbenchPart)editor).getDiagramEditPart();
- }
-
- // reset constraints
- constrainingNotRepresentedLifelines = new HashSet<Lifeline>();
- constrainingLifelineParts = new HashSet<LifelineEditPart>();
- /* constrainingCombinedFragments = new HashSet<CombinedFragment>(); */
- constrainingMessages = new HashSet<Message>();
- constrainingExecutions = new HashSet<ExecutionSpecification>();
- constrainingGeneralOrderings = new HashSet<GeneralOrdering>();
- // get new constraining objects
- for(InteractionFragment fragment : orderedFragments) {
- // get Lifelines
- for(Lifeline lifeline : fragment.getCovereds()) {
- boolean lifelineRepresented = false;
- List<?> lifelineViews = DiagramEditPartsUtil.getEObjectViews(lifeline);
- for(Object lifelineView : lifelineViews) {
- if(lifelineView instanceof View && diagram != null) {
- int visualID = UMLVisualIDRegistry.getVisualID((View)lifelineView);
- if(visualID == LifelineEditPart.VISUAL_ID) {
- EditPart part = DiagramEditPartsUtil.getEditPartFromView((View)lifelineView, diagram);
- if(part instanceof LifelineEditPart) {
- constrainingLifelineParts.add((LifelineEditPart)part);
- lifelineRepresented = true;
- }
- }
- }
- }
- if(!lifelineRepresented) {
- // rely on old order for the lifeline
- constrainingNotRepresentedLifelines.add(lifeline);
- }
- }
- // get usefull Combined Fragments. Removed, since Combined Fragments own themselves their operands
- /*
- * if(fragment.getCovereds().isEmpty()) {
- * if(fragment instanceof CombinedFragment) {
- * constrainingCombinedFragments.add((CombinedFragment)fragment);
- * } else if(fragment instanceof InteractionOperand) {
- * Element owningCF = fragment.getOwner();
- * if(owningCF instanceof CombinedFragment) {
- * constrainingCombinedFragments.add((CombinedFragment)owningCF);
- * }
- * }
- * }
- */
- // get Messages
- if(fragment instanceof MessageOccurrenceSpecification) {
- Message mess = ((MessageOccurrenceSpecification)fragment).getMessage();
- if(mess != null) {
- constrainingMessages.add(mess);
- }
- }
- // get ExecutionSpecifications
- if(fragment instanceof ExecutionSpecification) {
- constrainingExecutions.add((ExecutionSpecification)fragment);
- } else if(fragment instanceof ExecutionOccurrenceSpecification) {
- ExecutionSpecification exe = ((ExecutionOccurrenceSpecification)fragment).getExecution();
- if(exe != null) {
- constrainingExecutions.add(exe);
- }
- }
- // get General Orderings
- if(fragment instanceof OccurrenceSpecification) {
- EList<GeneralOrdering> orderings = ((OccurrenceSpecification)fragment).getToAfters();
- constrainingGeneralOrderings.addAll(orderings);
- orderings = ((OccurrenceSpecification)fragment).getToBefores();
- constrainingGeneralOrderings.addAll(orderings);
- }
- }
-
- // construct constrained partial orders
- constructPartialOrders();
- }
-
- /**
- * Compute partial orders given by constraining elements (ordered by priority).<br/>
- * <li>
- * <ul>
- * Lifelines (graphical location and previous order of elements not drawn)
- * </ul>
- * <ul>
- * Combined Fragments (graphical order of InteractionOperands in case no Lifeline is covered)
- * </ul>
- * <ul>
- * Messages (send > receive)
- * </ul>
- * ExecutionSpecifications (start > execution > finish)
- * <ul>
- * <ul>
- * General Orderings (before > after)
- * </ul>
- * </li>
- */
- private void constructPartialOrders() {
- optionallyOrderedFragments = new HashMap<Integer, List<InteractionFragment>>();
- int numberOfConstraints = constrainingNotRepresentedLifelines.size() + constrainingLifelineParts.size() + constrainingMessages.size() + constrainingExecutions.size() + constrainingGeneralOrderings.size();
- /*
- * + constrainingCombinedFragments.size();
- */
- orderConstraints = new ArrayList<List<InteractionFragment>>(numberOfConstraints);
- int indexConstraint = 0;
- // construct lifelines constraints (model only)
- for(Lifeline lifeline : constrainingNotRepresentedLifelines) {
- List<InteractionFragment> constraint = new ArrayList<InteractionFragment>();
- //fill constraint : previous order for elements of lifeline not drawn
- for(InteractionFragment fragment : orderedFragments) {
- if(lifeline.getCoveredBys().contains(fragment)) {
- constraint.add(fragment);
- }
- }
- DestructionOccurrenceUtil.reorderDestructionOccurrence(constraint);
- // store constraint
- orderConstraints.add(indexConstraint, constraint);
- indexConstraint++;
- }
- // construct lifelines constraints (graphical and model)
- for(LifelineEditPart part : constrainingLifelineParts) {
- TreeMap<Float, InteractionFragment> constraint = new TreeMap<Float, InteractionFragment>();
- //fill constraint : graphical location and previous order of elements not drawn
- fillConstraintWithLifelineEvents(constraint, part, indexConstraint);
- // store constraint
- ArrayList<InteractionFragment> list = new ArrayList<InteractionFragment>(constraint.values());
- DestructionOccurrenceUtil.reorderDestructionOccurrence(list);
- orderConstraints.add(indexConstraint, list);
- indexConstraint++;
- }
- // construct general orderings constraints. Removed, since Combined Fragments own themselves their operands
- /*
- * for(CombinedFragment combFrag : constrainingCombinedFragments) {
- * List<InteractionFragment> constraint = new ArrayList<InteractionFragment>();
- * //fill constraint : graphical order of InteractionOperands
- * // take model order of InteractionOperands, we ensure it is coherent with graphical order
- * constraint.addAll(combFrag.getOperands());
- * // store constraint
- * orderConstraints.add(indexConstraint, constraint);
- * indexConstraint++;
- * }
- */
- // construct messages constraints
- for(Message mess : constrainingMessages) {
- List<InteractionFragment> constraint = new ArrayList<InteractionFragment>(2);
- //fill constraint : send > receive
- MessageEnd frag = mess.getSendEvent();
- if(frag instanceof InteractionFragment && orderedFragments.contains(frag)) {
- constraint.add((InteractionFragment)frag);
- }
- frag = mess.getReceiveEvent();
- if(frag instanceof InteractionFragment && orderedFragments.contains(frag)) {
- constraint.add((InteractionFragment)frag);
- }
-
- DestructionOccurrenceUtil.constraintDestructionOccurrence(mess, constraint);
- // store constraint
- orderConstraints.add(indexConstraint, constraint);
- indexConstraint++;
- }
- // construct executions constraints
- for(ExecutionSpecification exe : constrainingExecutions) {
- List<InteractionFragment> constraint = new ArrayList<InteractionFragment>(3);
- //fill constraint : start > execution > finish
- InteractionFragment frag = exe.getStart();
- if(frag != null && orderedFragments.contains(frag)) {
- constraint.add(frag);
- }
- frag = exe;
- if(orderedFragments.contains(frag)) {
- constraint.add(frag);
- }
- frag = exe.getFinish();
- if(frag != null && orderedFragments.contains(frag)) {
- constraint.add(frag);
- }
- // store constraint
- orderConstraints.add(indexConstraint, constraint);
- indexConstraint++;
- }
- // construct general orderings constraints
- for(GeneralOrdering genOrd : constrainingGeneralOrderings) {
- List<InteractionFragment> constraint = new ArrayList<InteractionFragment>(2);
- //fill constraint : before > after
- InteractionFragment frag = genOrd.getBefore();
- if(frag != null && orderedFragments.contains(frag)) {
- constraint.add(frag);
- }
- frag = genOrd.getAfter();
- if(frag != null && orderedFragments.contains(frag)) {
- constraint.add(frag);
- }
- // store constraint
- orderConstraints.add(indexConstraint, constraint);
- indexConstraint++;
- }
- }
-
- /**
- * Fill the constraint imposed by a lifeline
- *
- * @param constraint
- * the tree map for hosting the constraint
- * @param lifelinePart
- * the lifeline edit part
- * @param indexConstraint
- * index of constraint
- */
- private void fillConstraintWithLifelineEvents(TreeMap<Float, InteractionFragment> constraint, LifelineEditPart lifelinePart, int indexConstraint) {
- EObject lifeline = lifelinePart.resolveSemanticElement();
- if(lifeline instanceof Lifeline) {
- List<InteractionFragment> nonLocalizedEvents = new ArrayList<InteractionFragment>();
- // sort fragments according to their location on the lifeline
- for(InteractionFragment event : ((Lifeline)lifeline).getCoveredBys()) {
- if(orderedFragments.contains(event)) {
- Point loc = SequenceUtil.findLocationOfEvent(lifelinePart, event);
- if(loc != null) {
- float index = findNonConflictingYIndexOnLifeline(loc.y, constraint, event);
- constraint.put(index, event);
- } else {
- nonLocalizedEvents.add(event);
- }
- }
- // else, it is not in the list, must be in a child element.
- }
- optionallyOrderedFragments.put(indexConstraint, nonLocalizedEvents);
- // add not drawn events according to their old order in the valid trace
- InteractionFragment lastMetSortedFragment = null;
- for(InteractionFragment fragment : orderedFragments) {
- if(((Lifeline)lifeline).getCoveredBys().contains(fragment)) {
- // this is a fragment of the lifeline.
- if(constraint.containsValue(fragment)) {
- lastMetSortedFragment = fragment;
- } else if(nonLocalizedEvents.contains(fragment) && lastMetSortedFragment == null) {
- // insert it at the very beginning
- constraint.put((float)0, fragment);
- lastMetSortedFragment = fragment;
- } else if(nonLocalizedEvents.contains(fragment)) {
- // insert it just after lastMetSortedFragment
- Iterator<Entry<Float, InteractionFragment>> entryIt = constraint.entrySet().iterator();
- // find float key of lastMetSortedFragment
- while(entryIt.hasNext()) {
- Entry<Float, InteractionFragment> entry = entryIt.next();
- if(entry.getValue().equals(lastMetSortedFragment)) {
- if(entryIt.hasNext()) {
- // insert between the two fragments
- float key = (entry.getKey() + entryIt.next().getKey()) / 2;
- constraint.put(key, fragment);
- lastMetSortedFragment = fragment;
- break;
- } else {
- // insert at the end
- float key = entry.getKey() + 1;
- constraint.put(key, fragment);
- lastMetSortedFragment = fragment;
- break;
- }
- }
- }
- }
- }
- }
- }
- }
-
- /**
- * Find a float index corresponding approximatively to the location of event on the lifeline.
- *
- * @param y
- * real location of event on the lifeline
- * @param eventsMap
- * map containing other events of the lifeline
- * @param event
- * event to find a float index for
- * @return unused float index for the map
- */
- private float findNonConflictingYIndexOnLifeline(int y, TreeMap<Float, InteractionFragment> eventsMap, InteractionFragment event) {
- float index = Integer.valueOf(y).floatValue();
- float delta = HALF_UNIT;
- while(eventsMap.containsKey(index)) {
- InteractionFragment otherEvent = eventsMap.get(index);
- if(simulatenousEventsHappenInThisOrder(otherEvent, event)) {
- // other event must happen before the event
- index += delta;
- } else {
- // event must happen before the other event
- index -= delta;
- }
- delta = delta * HALF_UNIT;
- }
- return index;
- }
-
- /**
- * Gives the order between two fragments which virtually happen at the same time
- *
- * @param firstFragment
- * first InteractionFragment
- * @param secondFragment
- * second InteractionFragment
- * @return true if firstEvent should happen before secondEvent, false if the contrary.
- */
- private boolean simulatenousEventsHappenInThisOrder(InteractionFragment firstFragment, InteractionFragment secondFragment) {
- // DestructionEvent comes last
- if(firstFragment instanceof DestructionOccurrenceSpecification) {
- return false;
- } else if(secondFragment instanceof DestructionOccurrenceSpecification) {
- return true;
- }
- // a receiving message event should trigger any other event
- if(firstFragment instanceof MessageOccurrenceSpecification && EcoreUtil.equals(((MessageOccurrenceSpecification)firstFragment).getMessage().getReceiveEvent(), firstFragment)) {
- return true;
- }
- if(secondFragment instanceof MessageOccurrenceSpecification && EcoreUtil.equals(((MessageOccurrenceSpecification)secondFragment).getMessage().getReceiveEvent(), secondFragment)) {
- return false;
- }
- // a starting execution event should happen before subsequent execution's events (except creation message receive)
- if(firstFragment instanceof ExecutionOccurrenceSpecification && EcoreUtil.equals(((ExecutionOccurrenceSpecification)firstFragment).getExecution().getStart(), firstFragment)) {
- return true;
- }
- if(secondFragment instanceof ExecutionOccurrenceSpecification && EcoreUtil.equals(((ExecutionOccurrenceSpecification)secondFragment).getExecution().getStart(), secondFragment)) {
- return false;
- }
- // an execution event should happen before subsequent execution's events (except starting)
- if(firstFragment instanceof ExecutionSpecification) {
- return true;
- }
- if(secondFragment instanceof ExecutionSpecification) {
- return false;
- }
- // a finishing execution event should happen after terminated execution's events
- if(firstFragment instanceof ExecutionOccurrenceSpecification && EcoreUtil.equals(((ExecutionOccurrenceSpecification)firstFragment).getExecution().getFinish(), firstFragment)) {
- return false;
- }
- if(secondFragment instanceof ExecutionOccurrenceSpecification && EcoreUtil.equals(((ExecutionOccurrenceSpecification)secondFragment).getExecution().getFinish(), secondFragment)) {
- return true;
- }
- // a sending message event should happen preferably after an unspecified event
- if(firstFragment instanceof MessageOccurrenceSpecification && EcoreUtil.equals(((MessageOccurrenceSpecification)firstFragment).getMessage().getSendEvent(), firstFragment)) {
- return false;
- }
- if(secondFragment instanceof MessageOccurrenceSpecification && EcoreUtil.equals(((MessageOccurrenceSpecification)secondFragment).getMessage().getSendEvent(), secondFragment)) {
- return true;
- }
- // otherwise, no importance
- return true;
- }
-
- /**
- * Reorder the fragments according to constraints to make a valid trace.
- *
- * NOTE : this algorithm could easily be adapted to compute all valid traces.
- *
- * @return true if a valid trace has been computed, false if there is no valid trace
- */
- private boolean reorderFragmentsInAValidTrace() {
- List<InteractionFragment> initialFragmentsList = new ArrayList<InteractionFragment>(orderedFragments);
- List<InteractionFragment> reorderedFragments = new ArrayList<InteractionFragment>(orderedFragments.size());
- /*
- * This algorithm merges constraints to compute a valid trace.
- * With little adaptation, it could compute all valid traces.
- */
- // n : number of constraint lists
- int n = orderConstraints.size();
- // whether computed trace is valid (also whether a valid trace exists)
- boolean valid = true;
- // pointers to first elements to handle in each constraint list
- int[] pointers = new int[n];
- Arrays.fill(pointers, 0);
- while(getFragmentToInspect(-1, pointers) != null) {
- // inspect each constraint list to know whether fragment is mature enough, in such a case, store it with constraint index
- Map<Integer, InteractionFragment> matureFragments = new HashMap<Integer, InteractionFragment>(n);
- for(int i = 0; i < n; i++) {
-
- InteractionFragment fragmentToInspect = getFragmentToInspect(i, pointers);
- // if no more fragment in this constraint (fragmentToInspect == null), nothing to do
- if(fragmentToInspect != null) {
- /*
- * Check whether fragment is mature enough :
- * Fragment can happen only if other constraints do not impose it to happen after their current fragment.
- */
- boolean wait = false;
- for(int j = 0; j < n; j++) {
- if(i != j) {
- // check that current fragment of constraint j must not occur before
- if(pointers[j] < orderConstraints.get(j).size()) {
- List<InteractionFragment> waitingList = orderConstraints.get(j).subList(pointers[j] + 1, orderConstraints.get(j).size());
- if(waitingList.contains(fragmentToInspect)) {
- wait = true;
- break;
- }
- }
- }
- }
- if(!wait) {
- //Fragment is ready to happen.
- matureFragments.put(i, fragmentToInspect);
- }
- }
- }
- if(matureFragments.isEmpty()) {
- //FIXME duplicated code : try again, without optional order
- // inspect each constraint list to know whether fragment is mature enough, in such a case, store it with constraint index
- matureFragments = new HashMap<Integer, InteractionFragment>(n);
- for(int i = 0; i < n; i++) {
-
- InteractionFragment fragmentToInspect = getFragmentToInspect(i, pointers);
- // if no more fragment in this constraint (fragmentToInspect == null), nothing to do
- if(fragmentToInspect != null) {
- /*
- * Check whether fragment is mature enough :
- * Fragment can happen only if other constraints do not impose it to happen after their current fragment.
- */
- boolean wait = false;
- for(int j = 0; j < n; j++) {
- if(i != j) {
- // check that current fragment of constraint j must not occur before
- if(pointers[j] < orderConstraints.get(j).size()) {
- // only difference : ignore order for fragments in optionallyOrderedFragments
- int updatedPointer = pointers[j];
- if(optionallyOrderedFragments.containsKey(j)) {
- List<InteractionFragment> ignore = optionallyOrderedFragments.get(j);
- /*
- * // hack for coregion
- * while(ignore.contains(orderConstraints.get(j).get(updatedPointer)) ||
- * (orderConstraints.get(j).get(updatedPointer) instanceof CombinedFragment &&
- * InteractionOperatorKind.PAR_LITERAL
- * .equals(((CombinedFragment)orderConstraints.get(j).get(updatedPointer)).getInteractionOperator()))) {
- * updatedPointer++;
- * }
- */
- while(ignore.contains(orderConstraints.get(j).get(updatedPointer))) {
- updatedPointer++;
- }
- }
- List<InteractionFragment> waitingList = orderConstraints.get(j).subList(updatedPointer + 1, orderConstraints.get(j).size());
-
- if(waitingList.contains(fragmentToInspect)) {
- wait = true;
- break;
- }
- }
- }
- }
- if(!wait) {
- //Fragment is ready to happen.
- matureFragments.put(i, fragmentToInspect);
- }
- }
- }
- if(matureFragments.isEmpty()) {
- // no valid trace.
- if(valid) {
- // store first conflicting fragments for user explanation
- conflictingFragments = new HashSet<InteractionFragment>(n);
- for(int k = 0; k < n; k++) {
- InteractionFragment frag = getFragmentToInspect(k, pointers);
- if(frag != null) {
- conflictingFragments.add(frag);
- }
- }
- }
- valid = false;
- /*
- * We must at least keep order of constraints with higher priority.
- * Take the next event in the first available constraint.
- */
- InteractionFragment addedFragment = getFragmentToInspect(-1, pointers);
- reorderedFragments.add(addedFragment);
- // increment pointers of constraints whose fragment has been added.
- for(int k = 0; k < n; k++) {
- InteractionFragment frag = getFragmentToInspect(k, pointers);
- while(reorderedFragments.contains(frag)) {
- // either frag == addedFragment and has just been added, or it has been added earlier after a conflict
- pointers[k]++;
- frag = getFragmentToInspect(k, pointers);
- }
- }
- } else {
- /*
- * NOTE : to compute every traces, fork here by making fragmentsSet.size() branches, adding only one mature fragment for each
- * branch and continuing the algorithm.
- */
- // All matureFragments can happen in any order. Add them all (without doubles).
- Set<InteractionFragment> fragmentsSet = new HashSet<InteractionFragment>(matureFragments.values());
- reorderedFragments.addAll(fragmentsSet);
- // increment pointers of constraints whose fragment has been added.
- for(int incrementingPointerIndex : matureFragments.keySet()) {
- InteractionFragment frag = getFragmentToInspect(incrementingPointerIndex, pointers);
- while(reorderedFragments.contains(frag)) {
- // either frag == addedFragment and has just been added, or it has been added earlier after a conflict
- pointers[incrementingPointerIndex]++;
- frag = getFragmentToInspect(incrementingPointerIndex, pointers);
- }
- }
- }
-
- // // no valid trace.
- // if(valid) {
- // // store first conflicting fragments for user explanation
- // conflictingFragments = new HashSet<InteractionFragment>(n);
- // for(int k = 0; k < n; k++) {
- // InteractionFragment frag = getFragmentToInspect(k, pointers);
- // if(frag != null) {
- // conflictingFragments.add(frag);
- // }
- // }
- // }
- // valid = false;
- // /*
- // * We must at least keep order of constraints with higher priority.
- // * Take the next event in the first available constraint.
- // */
- // InteractionFragment addedFragment = getFragmentToInspect(-1, pointers);
- // reorderedFragments.add(addedFragment);
- // // increment pointers of constraints whose fragment has been added.
- // for(int k = 0; k < n; k++) {
- // InteractionFragment frag = getFragmentToInspect(k, pointers);
- // while(reorderedFragments.contains(frag)) {
- // // either frag == addedFragment and has just been added, or it has been added earlier after a conflict
- // pointers[k]++;
- // frag = getFragmentToInspect(k, pointers);
- // }
- // }
- } else {
- /*
- * NOTE : to compute every traces, fork here by making fragmentsSet.size() branches, adding only one mature fragment for each
- * branch and continuing the algorithm.
- */
- // All matureFragments can happen in any order. Add them all (without doubles).
- Set<InteractionFragment> fragmentsSet = new HashSet<InteractionFragment>(matureFragments.values());
- reorderedFragments.addAll(fragmentsSet);
- // increment pointers of constraints whose fragment has been added.
- for(int incrementingPointerIndex : matureFragments.keySet()) {
- InteractionFragment frag = getFragmentToInspect(incrementingPointerIndex, pointers);
- while(reorderedFragments.contains(frag)) {
- // either frag == addedFragment and has just been added, or it has been added earlier after a conflict
- pointers[incrementingPointerIndex]++;
- frag = getFragmentToInspect(incrementingPointerIndex, pointers);
- }
- }
- }
- }
- // Add fragments which were not in any constraint
- /*
- * NOTE : to compute every traces, these can be added wherever in the list.
- */
- initialFragmentsList.removeAll(reorderedFragments);
- reorderedFragments.addAll(initialFragmentsList);
-
- DestructionOccurrenceUtil.reorderDestructionOccurrence(reorderedFragments);
-
- /*
- * Now that we have a valid trace, apply it on orderedFragments.
- * Only move operations must be performed on the EList, since others strongly affect the model.
- */
- int size = reorderedFragments.size();
- for(int i = 0; i < size; i++) {
- orderedFragments.move(i, reorderedFragments.get(i));
- }
- return valid;
- }
-
- /**
- * Get the fragment to inspect for the trace computing algorithm.
- *
- * @param i
- * index of constraint to take in account, or -1 for taking the first available one with the highest priority
- * @param pointers
- * pointers indicating fragments to inspect in each constraint
- * @return fragment which must be inspected or null if none left
- */
- private InteractionFragment getFragmentToInspect(int i, int[] pointers) {
- if(orderConstraints.size() != pointers.length) {
- // should not happen, incorrect pointers argument
- return null;
- }
- if(i < 0 || i >= orderConstraints.size()) {
- i = -1;
- // compute best i with highest priority
- int j = 0;
- while(j < orderConstraints.size() && i == -1) {
- if(pointers[j] < orderConstraints.get(j).size()) {
- // elements left in constraint j. Best constraint index found.
- i = j;
- }
- j++;
- }
- }
- if(0 <= i && i < orderConstraints.size() && pointers[i] < orderConstraints.get(i).size()) {
- // return next fragment in constraint
- return orderConstraints.get(i).get(pointers[i]);
- } else {
- // no fragment left to inspect
- return null;
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/UMLValidationHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/UMLValidationHelper.java
deleted file mode 100644
index d70a88a4bfd..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/UMLValidationHelper.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.validation;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.validation.IValidationContext;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-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.Message;
-
-/**
- * This helper performs non generated validation tasks.
- *
- * @author vhemery
- */
-public class UMLValidationHelper {
-
- /**
- * Validate modification and update the interaction operand's or interaction's fragments order if necessary.
- *
- * @see org.eclipse.emf.validation.AbstractModelConstraint#validate(org.eclipse.emf.validation.IValidationContext)
- *
- * @param context
- * object on which update is performed
- * @param ctx
- * validation context
- * @return status
- */
- public static IStatus validateFragmentsOrder(EObject context, IValidationContext ctx) {
- if(context instanceof View) {
- return validateFragmentsOrder(((View)context).getElement(), ctx);
- } else if(context instanceof Bounds) {
- return validateFragmentsOrder(((Bounds)context).eContainer(), ctx);
- } else if(context instanceof Interaction) {
- return validateFragmentsOrder((Interaction)context, ctx);
- } else if(context instanceof InteractionOperand) {
- return validateFragmentsOrder((InteractionOperand)context, ctx);
- } else if(context instanceof InteractionFragment) {
- return validateFragmentsOrder(((InteractionFragment)context).getOwner(), ctx);
- } else if(context instanceof Message) {
- // both events are in the same container, but they may not exist
- EObject sendFragmentContainer = ((Message)context).getSendEvent().eContainer();
- EObject receiveFragmentContainer = ((Message)context).getReceiveEvent().eContainer();
- if(sendFragmentContainer != null) {
- return validateFragmentsOrder(sendFragmentContainer, ctx);
- } else if(receiveFragmentContainer != null) {
- return validateFragmentsOrder(receiveFragmentContainer, ctx);
- }
- } else if(context instanceof Lifeline) {
- // events may have changed of container while lifeline was moving
- return validateFragmentsOrder(((Lifeline)context).getInteraction(), ctx);
- }
- // no implementation for this element
- return ctx.createSuccessStatus();
- }
-
- /**
- * Validate modification and update the interaction's fragments order if necessary.
- *
- * @see org.eclipse.emf.validation.AbstractModelConstraint#validate(org.eclipse.emf.validation.IValidationContext)
- *
- * @param context
- * element on which update is performed
- * @param ctx
- * validation context
- * @return status
- */
- public static IStatus validateFragmentsOrder(Interaction context, IValidationContext ctx) {
- try {
- FragmentOrderingKeeper keeper = new FragmentOrderingKeeper();
- return keeper.validate(context, ctx);
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError(Messages.FragmentOrderingKeeper_error, e);
- // avoid returning the exception, or the constraint will never be called again.
- return ctx.createSuccessStatus();
- }
- }
-
- /**
- * Validate modification and update the interaction operand's fragments order if necessary.
- *
- * @see org.eclipse.emf.validation.AbstractModelConstraint#validate(org.eclipse.emf.validation.IValidationContext)
- *
- * @param context
- * element on which update is performed
- * @param ctx
- * validation context
- * @return status
- */
- public static IStatus validateFragmentsOrder(InteractionOperand context, IValidationContext ctx) {
- try {
- FragmentOrderingKeeper keeper = new FragmentOrderingKeeper();
- return keeper.validate(context, ctx);
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError(Messages.FragmentOrderingKeeper_error, e);
- // avoid returning the exception, or the constraint will never be called again.
- return ctx.createSuccessStatus();
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/incomingLinksNavigatorGroup.gif b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/incomingLinksNavigatorGroup.gif
deleted file mode 100644
index fca9c53e629..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/incomingLinksNavigatorGroup.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linkSourceNavigatorGroup.gif b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linkSourceNavigatorGroup.gif
deleted file mode 100644
index fca9c53e629..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linkSourceNavigatorGroup.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linkTargetNavigatorGroup.gif b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linkTargetNavigatorGroup.gif
deleted file mode 100644
index fca9c53e629..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linkTargetNavigatorGroup.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linksNavigatorGroup.gif b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linksNavigatorGroup.gif
deleted file mode 100644
index fca9c53e629..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/linksNavigatorGroup.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/obj16/Diagram_Sequence.gif b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/obj16/Diagram_Sequence.gif
deleted file mode 100644
index a44f944a60b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/obj16/Diagram_Sequence.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/obj16/UMLDiagramFile.gif b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/obj16/UMLDiagramFile.gif
deleted file mode 100644
index de938070dea..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/obj16/UMLDiagramFile.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/outgoingLinksNavigatorGroup.gif b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/outgoingLinksNavigatorGroup.gif
deleted file mode 100644
index fca9c53e629..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/outgoingLinksNavigatorGroup.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/wizban/NewUMLWizard.gif b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/wizban/NewUMLWizard.gif
deleted file mode 100644
index 83e03bf39bf..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/icons/wizban/NewUMLWizard.gif
+++ /dev/null
Binary files differ
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/messages.properties b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/messages.properties
deleted file mode 100644
index aca26e92b68..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/messages.properties
+++ /dev/null
@@ -1,201 +0,0 @@
-#Custom message entries
-MoveMessageCommand_Label=Move message
-SelectOrCreateDialog_NothingLabel=No element
-SelectOrCreateDialog_CreateLabel=Create a new element
-SelectOrCreateDialog_NameLabel=Name:
-SelectOrCreateDialog_OwnerLabel=Owner of the created element
-SelectOrCreateDialog_SelectLabel=Select an existing element
-SelectOrCreateDialog_TypeLabel=Type:
-CommandHelper_CreateMessage=Create a new Message
-FragmentOrderingKeeper_error=An error occurred during validation of Fragments order.
-DropError_DefaultTitle=Element can not be dropped
-DropError_DefaultTxt=For an unknown reason, this link can not be dropped between {0} and {1}.
-DropError_UphillMessageTitle=Message can not be dropped
-DropError_UphillMessageTxt=This message goes uphill ({0} should be at least {2}px lower compared to {1}).
-Warning_ResizeInteractionOperandTitle=Resize of Interaction Operands may be erratic
-Warning_ResizeInteractionOperandTxt=The resize of the Interaction Operands you have just performed may be erratic.{0}Check contained fragments and slightly move them inside the Operand if necessary.
-
-# TODO: manually put keys and values
-UMLCreationWizardTitle=New PapyrusUMLSequenceDiagram Diagram
-UMLCreationWizard_DiagramModelFilePageTitle=Create PapyrusUMLSequenceDiagram Diagram
-UMLCreationWizard_DiagramModelFilePageDescription=Select file that will contain diagram model.
-UMLCreationWizard_DomainModelFilePageTitle=Create PapyrusUMLSequenceDiagram Domain Model
-UMLCreationWizard_DomainModelFilePageDescription=Select file that will contain domain model.
-UMLCreationWizardOpenEditorError=Error opening diagram editor
-UMLCreationWizardCreationError=Creation Problems
-UMLCreationWizardPageExtensionError=File name should have {0} extension.
-UMLDiagramEditorUtil_OpenModelResourceErrorDialogTitle=Error
-UMLDiagramEditorUtil_OpenModelResourceErrorDialogMessage=Failed to load model file {0}
-UMLDiagramEditorUtil_CreateDiagramProgressTask=Creating diagram and model files
-UMLDiagramEditorUtil_CreateDiagramCommandLabel=Creating diagram and model
-UMLDocumentProvider_isModifiable=Updating cache failed
-UMLDocumentProvider_handleElementContentChanged=Failed to refresh hierarchy for changed resource
-UMLDocumentProvider_IncorrectInputError={1}
-UMLDocumentProvider_NoDiagramInResourceError=Diagram is not present in resource
-UMLDocumentProvider_DiagramLoadingError=Error loading diagram
-UMLDocumentProvider_UnsynchronizedFileSaveError=The file has been changed on the file system
-UMLDocumentProvider_SaveDiagramTask=Saving diagram
-UMLDocumentProvider_SaveNextResourceTask=Saving {0}
-UMLDocumentProvider_SaveAsOperation=Saving {0} diagram as
-InitDiagramFile_ResourceErrorDialogTitle=Error
-InitDiagramFile_ResourceErrorDialogMessage=Model file loading failed
-InitDiagramFile_WizardTitle=Initialize new {0} diagram file
-InitDiagramFile_OpenModelFileDialogTitle=Select domain model
-UMLNewDiagramFileWizard_CreationPageName=Initialize new diagram file
-UMLNewDiagramFileWizard_CreationPageTitle=Diagram file
-UMLNewDiagramFileWizard_CreationPageDescription=Create new diagram based on {0} model content
-UMLNewDiagramFileWizard_RootSelectionPageName=Select diagram root element
-UMLNewDiagramFileWizard_RootSelectionPageTitle=Diagram root element
-UMLNewDiagramFileWizard_RootSelectionPageDescription=Select semantic model element to be depicted on diagram
-UMLNewDiagramFileWizard_RootSelectionPageSelectionTitle=Select diagram root element:
-UMLNewDiagramFileWizard_RootSelectionPageNoSelectionMessage=Diagram root element is not selected
-UMLNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage=Invalid diagram root element is selected
-UMLNewDiagramFileWizard_InitDiagramCommand=Initializing diagram contents
-UMLNewDiagramFileWizard_IncorrectRootError=Incorrect model object stored as a root resource object
-UMLDiagramEditor_SavingDeletedFile=The original file "{0}" has been deleted.
-UMLDiagramEditor_SaveAsErrorTitle=Problem During Save As...
-UMLDiagramEditor_SaveAsErrorMessage=Save could not be completed. Target file is already open in another editor.
-UMLDiagramEditor_SaveErrorTitle=Save Problems
-UMLDiagramEditor_SaveErrorMessage=Could not save file.
-UMLElementChooserDialog_SelectModelElementTitle=Select model element
-ModelElementSelectionPageMessage=Select model element:
-ValidateActionMessage=Validate
-InteractionInteractionCompartmentEditPart_title=InteractionCompartment
-CombinedFragmentCombinedFragmentCompartmentEditPart_title=CombinedFragmentCompartment
-
-CommandName_OpenDiagram=Open Diagram
-NavigatorGroupName_Package_1000_links=links
-NavigatorGroupName_Interaction_2001_incominglinks=incoming links
-NavigatorGroupName_Interaction_2001_outgoinglinks=outgoing links
-NavigatorGroupName_Lifeline_3001_incominglinks=incoming links
-NavigatorGroupName_Lifeline_3001_outgoinglinks=outgoing links
-NavigatorGroupName_ActionExecutionSpecification_3006_incominglinks=incoming links
-NavigatorGroupName_ActionExecutionSpecification_3006_outgoinglinks=outgoing links
-NavigatorGroupName_BehaviorExecutionSpecification_3003_incominglinks=incoming links
-NavigatorGroupName_BehaviorExecutionSpecification_3003_outgoinglinks=outgoing links
-NavigatorGroupName_InteractionUse_3002_incominglinks=incoming links
-NavigatorGroupName_InteractionUse_3002_outgoinglinks=outgoing links
-NavigatorGroupName_ConsiderIgnoreFragment_3007_incominglinks=incoming links
-NavigatorGroupName_ConsiderIgnoreFragment_3007_outgoinglinks=outgoing links
-NavigatorGroupName_CombinedFragment_3004_incominglinks=incoming links
-NavigatorGroupName_CombinedFragment_3004_outgoinglinks=outgoing links
-NavigatorGroupName_InteractionOperand_3005_incominglinks=incoming links
-NavigatorGroupName_InteractionOperand_3005_outgoinglinks=outgoing links
-NavigatorGroupName_Constraint_3008_incominglinks=incoming links
-NavigatorGroupName_Constraint_3008_outgoinglinks=outgoing links
-NavigatorGroupName_Comment_3009_incominglinks=incoming links
-NavigatorGroupName_Comment_3009_outgoinglinks=outgoing links
-NavigatorGroupName_Message_4003_target=target
-NavigatorGroupName_Message_4003_source=source
-NavigatorGroupName_Message_4004_target=target
-NavigatorGroupName_Message_4004_source=source
-NavigatorGroupName_Message_4005_target=target
-NavigatorGroupName_Message_4005_source=source
-NavigatorGroupName_Message_4006_target=target
-NavigatorGroupName_Message_4006_source=source
-NavigatorGroupName_Message_4007_target=target
-NavigatorGroupName_Message_4007_source=source
-NavigatorGroupName_Message_4008_target=target
-NavigatorGroupName_Message_4008_source=source
-NavigatorGroupName_Message_4009_target=target
-NavigatorGroupName_Message_4009_source=source
-NavigatorGroupName_CommentAnnotatedElement_4010_target=target
-NavigatorGroupName_CommentAnnotatedElement_4010_source=source
-NavigatorGroupName_ConstraintConstrainedElement_4011_target=target
-NavigatorGroupName_ConstraintConstrainedElement_4011_source=source
-NavigatorActionProvider_OpenDiagramActionName=Open Diagram
-AbstractParser_UnexpectedValueType=Value of type {0} is expected
-AbstractParser_WrongStringConversion=String value does not convert to {0} value
-AbstractParser_UnknownLiteral=Unknown literal: {0}
-
-MessageFormatParser_InvalidInputError=Invalid input at {0}
-UMLModelingAssistantProviderTitle=Select domain model element
-UMLModelingAssistantProviderMessage=Available domain model elements:
-NavigatorGroupName_Continuation_3016_incominglinks=incoming links
-NavigatorGroupName_Continuation_3016_outgoinglinks=outgoing links
-NavigatorGroupName_StateInvariant_3017_incominglinks=incoming links
-NavigatorGroupName_StateInvariant_3017_outgoinglinks=outgoing links
-NavigatorGroupName_CombinedFragment_3018_incominglinks=incoming links
-NavigatorGroupName_CombinedFragment_3018_outgoinglinks=outgoing links
-NavigatorGroupName_TimeConstraint_3019_incominglinks=incoming links
-NavigatorGroupName_TimeConstraint_3019_outgoinglinks=outgoing links
-NavigatorGroupName_TimeObservation_3020_incominglinks=incoming links
-NavigatorGroupName_TimeObservation_3020_outgoinglinks=outgoing links
-NavigatorGroupName_DurationConstraint_3021_incominglinks=incoming links
-NavigatorGroupName_DurationConstraint_3021_outgoinglinks=outgoing links
-createNodes1Group_title=Nodes
-createNodes1Group_desc=
-createEdges2Group_title=Edges
-createEdges2Group_desc=Message tools
-createLifeline1CreationTool_title=Lifeline
-createLifeline1CreationTool_desc=Create a Lifeline
-createActionExecutionSpecification2CreationTool_title=Action Execution Specification
-createActionExecutionSpecification2CreationTool_desc=Create an Action Execution Specification
-createBehaviorExecutionSpecification3CreationTool_title= Behavior Execution Specification
-createBehaviorExecutionSpecification3CreationTool_desc=Create an BehaviorExecutionSpecification
-createInteractionUse4CreationTool_title=InteractionUse
-createInteractionUse4CreationTool_desc=Create InteractionUse
-createCombinedFragment5CreationTool_title=Combined Fragment
-createCombinedFragment5CreationTool_desc=Create Combined Fragment
-createInteractionOperand6CreationTool_title=Interaction Operand
-createInteractionOperand6CreationTool_desc=Create Interaction Operand
-createContinuation7CreationTool_title=Continuation
-createContinuation7CreationTool_desc=Create Continuation
-createStateInvariant8CreationTool_title=StateInvariant
-createStateInvariant8CreationTool_desc=Create StateInvariant
-createComment9CreationTool_title=Comment
-createComment9CreationTool_desc=Create a comment
-createConstraint10CreationTool_title=Constraint
-createConstraint10CreationTool_desc=Create a constraint
-createCoRegion11CreationTool_title=CoRegion
-createCoRegion11CreationTool_desc=Create a CoRegion
-createDurationObservation12CreationTool_title=Duration Observation
-createDurationObservation12CreationTool_desc=Create a Duration Observation on a Message
-createTimeConstraint13CreationTool_title=Time Constraint
-createTimeConstraint13CreationTool_desc=Create a Time Constraint
-createTimeObservation14CreationTool_title=Time Observation
-createTimeObservation14CreationTool_desc=Create a Time Observation
-createDurationConstraint15CreationTool_title=Duration Constraint
-createDurationConstraint15CreationTool_desc=Create a Duration Constraint
-createDestructionEvent16CreationTool_title=Destruction Event
-createDestructionEvent16CreationTool_desc=Create a Destruction Event
-createMessageSync1CreationTool_title=Message Sync
-createMessageSync1CreationTool_desc=Create MessageSync
-createMessageAsync2CreationTool_title=Message Async
-createMessageAsync2CreationTool_desc=Create MessageAsync
-createMessageReply3CreationTool_title=Message Reply
-createMessageReply3CreationTool_desc=Create MessageReply
-createMessageCreate4CreationTool_title=Message Create
-createMessageCreate4CreationTool_desc=Create MessageCreate
-createMessageDelete5CreationTool_title=Message Delete
-createMessageDelete5CreationTool_desc=Create MessageDelete
-createMessageLost6CreationTool_title=Message Lost
-createMessageLost6CreationTool_desc=Create MessageLost
-createMessageFound7CreationTool_title=Message Found
-createMessageFound7CreationTool_desc=Create MessageFound
-NavigatorGroupName_Message_4007_incominglinks=incoming links
-NavigatorGroupName_Message_4007_outgoinglinks=outgoing links
-NavigatorGroupName_Message_4004_incominglinks=incoming links
-NavigatorGroupName_Message_4004_outgoinglinks=outgoing links
-NavigatorGroupName_Message_4003_incominglinks=incoming links
-NavigatorGroupName_Message_4003_outgoinglinks=outgoing links
-NavigatorGroupName_Message_4008_incominglinks=incoming links
-NavigatorGroupName_Message_4008_outgoinglinks=outgoing links
-NavigatorGroupName_Message_4006_incominglinks=incoming links
-NavigatorGroupName_Message_4006_outgoinglinks=outgoing links
-NavigatorGroupName_Message_4009_incominglinks=incoming links
-NavigatorGroupName_Message_4009_outgoinglinks=outgoing links
-NavigatorGroupName_Message_4005_incominglinks=incoming links
-NavigatorGroupName_Message_4005_outgoinglinks=outgoing links
-NavigatorGroupName_DurationObservation_3024_incominglinks=incoming links
-NavigatorGroupName_DurationObservation_3024_outgoinglinks=outgoing links
-NavigatorGroupName_DurationConstraint_3023_incominglinks=incoming links
-NavigatorGroupName_DurationConstraint_3023_outgoinglinks=outgoing links
-createGeneralOrdering8CreationTool_title=General Ordering
-createGeneralOrdering8CreationTool_desc=Create GeneralOrdering
-createCommentlink9CreationTool_title=Comment link
-createCommentlink9CreationTool_desc=Create a comment link
-createConstraintlink10CreationTool_title=Constraint link
-createConstraintlink10CreationTool_desc=Create a constraint link
-NavigatorGroupName_DestructionOccurrenceSpecification_3022_incominglinks=incoming links
-NavigatorGroupName_DestructionOccurrenceSpecification_3022_outgoinglinks=outgoing links
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/Environment.xmi b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/Environment.xmi
deleted file mode 100644
index d171cd9bcc2..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/Environment.xmi
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<environment:Environment
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:environment="http://www.eclipse.org/papyrus/properties/environment/0.9">
- <modelElementFactories
- name="MessageStyle Notation Factory"
- factoryClass="org.eclipse.papyrus.uml.diagram.sequence.util.MessageStyleElementFactory"/>
- <modelElementFactories
- name="Sequence preferences Factory"
- factoryClass="org.eclipse.papyrus.uml.diagram.sequence.util.PreferencesModelElementFactory"/>
-</environment:Environment>
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/seq.ctx b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/seq.ctx
deleted file mode 100644
index 863f085cae6..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/seq.ctx
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" name="SequenceNotation">
- <tabs label="Appearance" id="appearance" category="org.eclipse.papyrus" priority="75">
- <sections name="CombinedFragmentTitle" sectionFile="ui/CombinedFragmentTitle.xwt">
- <widget href="ui/CombinedFragmentTitle.xwt#/"/>
- </sections>
- <sections name="ConsiderIgnoreFragmentTitle" sectionFile="ui/ConsiderIgnoreFragmentTitle.xwt">
- <widget href="ui/ConsiderIgnoreFragmentTitle.xwt#/"/>
- </sections>
- <sections name="MessageStyle" sectionFile="ui/MessageStyle.xwt">
- <widget href="ui/MessageStyle.xwt#/"/>
- </sections>
- </tabs>
-
- <views name="CombinedFragmentTitle" sections="//@tabs.0/@sections.0" automaticContext="true">
- <constraints xsi:type="constraints:SimpleConstraint" name="isSingleCombinedFragment">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.0" />
- <properties xsi:type="constraints:ValueProperty" name="umlClassName" value="CombinedFragment" />
- </constraints>
- </views>
- <views name="ConsiderIgnoreFragmentTitle" sections="//@tabs.0/@sections.1" automaticContext="true">
- <constraints xsi:type="constraints:SimpleConstraint" name="isSingleConsiderIgnoreFragment">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.0" />
- <properties xsi:type="constraints:ValueProperty" name="umlClassName" value="ConsiderIgnoreFragment" />
- </constraints>
- </views>
- <views name="MessageStyle" sections="//@tabs.0/@sections.2" automaticContext="true">
- <constraints xsi:type="constraints:SimpleConstraint" name="isMessageStyle">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
- <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
- <properties xsi:type="constraints:ValueProperty" name="className" value="Edge"/>
- </constraints>
- </views>
-
- <dataContexts name="Preference" label="Preference">
- <elements name="org.eclipse.papyrus.infra.gmfdiag.preferences">
- <properties name="ELEMENT_PapyrusUMLSequenceDiagram_CombinedFragment_CombinedFragmentCompartment.compartment_name.visibility" label="Show Title" type="Boolean" description="Show the Title in the diagram"/>
- <properties name="ELEMENT_PapyrusUMLSequenceDiagram_ConsiderIgnoreFragment_CombinedFragmentCompartment.compartment_name.visibility" label="Show Title" type="Boolean" description="Show the Title in the diagram"/>
- </elements>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.uml.diagram.sequence/model/prop/Environment.xmi#//@modelElementFactories.1"/>
- </dataContexts>
-
- <dataContexts name="MessageStyle" label="MessageStyle">
- <elements name="LineStyle">
- <properties name="lineColor" type="Integer"/>
- <properties name="lineWidth" type="Integer"/>
- </elements>
- <elements name="FontStyle">
- <properties name="fontColor" type="Integer"/>
- <properties name="fontName"/>
- <properties name="fontHeight" type="Integer"/>
- <properties name="bold" type="Boolean"/>
- <properties name="italic" type="Boolean"/>
- <properties name="underline" type="Boolean"/>
- <properties name="strikeThrough" type="Boolean"/>
- </elements>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.uml.diagram.sequence/model/prop/Environment.xmi#//@modelElementFactories.0"/>
- </dataContexts>
-</contexts:Context>
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/CombinedFragmentTitle.xwt b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/CombinedFragmentTitle.xwt
deleted file mode 100644
index d8f9f12058d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/CombinedFragmentTitle.xwt
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanCheckbox input="{Binding}" property="Preference:org.eclipse.papyrus.infra.gmfdiag.preferences:ELEMENT_PapyrusUMLSequenceDiagram_CombinedFragment_CombinedFragmentCompartment.compartment_name.visibility"></ppe:BooleanCheckbox>
-</Composite> \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/ConsiderIgnoreFragmentTitle.xwt b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/ConsiderIgnoreFragmentTitle.xwt
deleted file mode 100644
index 931defbf324..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/ConsiderIgnoreFragmentTitle.xwt
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanCheckbox input="{Binding}" property="Preference:org.eclipse.papyrus.infra.gmfdiag.preferences:ELEMENT_PapyrusUMLSequenceDiagram_ConsiderIgnoreFragment_CombinedFragmentCompartment.compartment_name.visibility"></ppe:BooleanCheckbox>
-</Composite> \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/MessageStyle.xwt b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/MessageStyle.xwt
deleted file mode 100644
index baefda8ab27..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/prop/ui/MessageStyle.xwt
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:x="http://www.eclipse.org/xwt"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:gmf="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.widgets.editors"
- xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
- text="Style">
- <Composite.layout>
- <GridLayout></GridLayout>
- </Composite.layout>
- <Group text="Line">
- <Group.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Group.layout>
- <gmf:XWTAwareColorPicker input="{Binding}"
- property="MessageStyle:LineStyle:lineColor"></gmf:XWTAwareColorPicker>
- </Group>
- <Group text="Font">
- <Group.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Group.layout>
- <gmf:XWTAwareFontEditor input="{Binding}"
- property="MessageStyle:FontStyle:fontName" showLabel="false"></gmf:XWTAwareFontEditor>
- <ppe:IntegerEditor input="{Binding}"
- property="MessageStyle:FontStyle:fontHeight"></ppe:IntegerEditor>
- <ppe:BooleanToggle
- image="/org.eclipse.gmf.runtime.diagram.ui.properties/icons/bold.gif"
- input="{Binding}" property="MessageStyle:FontStyle:bold" showLabel="false"></ppe:BooleanToggle>
- <gmf:XWTAwareColorPicker input="{Binding}"
- property="MessageStyle:FontStyle:fontColor" showLabel="false"></gmf:XWTAwareColorPicker>
- </Group>
-</Composite> \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfgen b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfgen
deleted file mode 100644
index b12e696928c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfgen
+++ /dev/null
@@ -1,7475 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
- xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
- <gmfgen:GenEditorGenerator
- packageNamePrefix="org.eclipse.papyrus.uml.diagram.sequence"
- modelID="PapyrusUMLSequenceDiagram"
- domainFileExtension="PapyrusUMLSequence"
- dynamicTemplates="true"
- templateDirectory="/org.eclipse.papyrus.def/dynamic-templates3.5/codegen">
- <audits>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validate"
- name="validateUMLModel"
- description="Validate the UML model"
- path="/0/@audits/@categories.0"/>
- <categories
- id="org.eclipse.papyrus.uml.diagram.sequence.validation.FragmentOrderingKeeper"
- name="fragmentsOrder"
- description="Fragments order"
- path="/0/@audits/@categories.0 /0/@audits/@categories.1"
- audits="/0/@audits/@rules.0 /0/@audits/@rules.1 /0/@audits/@rules.2"/>
- <rules
- name="Interaction fragment ordering"
- description="The fragment property of an Interaction must be ordered as a valid trace."
- id="FragmentOrderingKeeper.Interaction"
- rule="/0/@expressionProviders/@providers.0/@expressions.19"
- message="There is no valid trace sequencing the InteractionFragments in the fragment property. Some of them can not be organized as a valid sequence :{0}"
- useInLiveMode="true"
- category="/0/@audits/@categories.1">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction"/>
- </target>
- </rules>
- <rules
- name="InteractionOperand fragment ordering"
- description="The fragment property of an InteractionOperand must be ordered as a valid trace."
- id="FragmentOrderingKeeper.InteractionOperand"
- rule="/0/@expressionProviders/@providers.0/@expressions.20"
- message="There is no valid trace sequencing the InteractionFragments in the fragment property. Some of them can not be organized as a valid sequence :{0}"
- useInLiveMode="true"
- category="/0/@audits/@categories.1">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InteractionOperand"/>
- </target>
- </rules>
- <rules
- name="Fragment ordering"
- description="The fragment property of an Interaction or InteractionOperand must be ordered as a valid trace."
- id="FragmentOrderingKeeper.LifelineFigure"
- rule="/0/@expressionProviders/@providers.0/@expressions.21"
- message="There is no valid trace sequencing the InteractionFragments in the fragment property. Some of them can not be organized as a valid sequence :{0}"
- useInLiveMode="true"
- category="/0/@audits/@categories.1">
- <target
- xsi:type="gmfgen:GenDiagramElementTarget"
- contextSelector="/0/@audits/@clientContexts.1"
- element="/0/@diagram/@childNodes.5"/>
- </rules>
- <clientContexts
- ruleTargets="/0/@audits/@rules.0/@target /0/@audits/@rules.1/@target"/>
- <clientContexts
- id="Ctx_3001"
- ruleTargets="/0/@audits/@rules.2/@target"/>
- </audits>
- <diagram
- visualID="1000"
- editPartClassName="PackageEditPart"
- itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PackageCanonicalEditPolicy"
- iconProviderPriority="Low"
- validationProviderPriority="Low"
- validationEnabled="true"
- validationDecorators="true"
- liveValidationUIFeedback="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="PackageEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <domainDiagramElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <childNodes
- visualID="3007"
- editPartClassName="ConsiderIgnoreFragmentEditPart"
- itemSemanticEditPolicyClassName="ConsiderIgnoreFragmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ConsiderIgnoreFragmentViewFactory"
- canonicalEditPolicyClassName="ConsiderIgnoreFragmentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConsiderIgnoreFragmentGraphicalNodeEditPolicy"
- createCommandClassName="ConsiderIgnoreFragmentCreateCommand"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@childNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ConsiderIgnoreFragmentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.CombinedFragmentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentItemComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ConsiderIgnoreFragment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- </childNodes>
- <childNodes
- visualID="3004"
- editPartClassName="CombinedFragmentEditPart"
- itemSemanticEditPolicyClassName="CombinedFragmentItemSemanticEditPolicy"
- notationViewFactoryClassName="CombinedFragmentViewFactory"
- canonicalEditPolicyClassName="CombinedFragmentCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.1"
- graphicalNodeEditPolicyClassName="CombinedFragmentGraphicalNodeEditPolicy"
- createCommandClassName="CombinedFragmentCreateCommand"
- containers="/0/@diagram/@childNodes.2 /0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="CombinedFragmentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.CombinedFragmentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentItemComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CombinedFragment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.2">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- </childNodes>
- <childNodes
- visualID="3005"
- editPartClassName="InteractionOperandEditPart"
- itemSemanticEditPolicyClassName="InteractionOperandItemSemanticEditPolicy"
- notationViewFactoryClassName="InteractionOperandViewFactory"
- canonicalEditPolicyClassName="InteractionOperandCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.4"
- graphicalNodeEditPolicyClassName="InteractionOperandGraphicalNodeEditPolicy"
- createCommandClassName="InteractionOperandCreateCommand"
- containers="/0/@diagram/@compartments.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="InteractionOperandEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- layoutType="XY_LAYOUT"
- className="CustomInteractionOperandFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class CustomInteractionOperandFigure extends org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionOperandFigure {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fInteractionConstraintLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public CustomInteractionOperandFigure() {&#xA;&#x9;&#x9;this.setLayoutManager(new org.eclipse.draw2d.XYLayout());&#xA;&#x9;&#x9;&#xA;&#xA;&#xA;&#xA;this.setLineStyle(&#xA;Graphics.LINE_DASH);&#xA;&#xA;&#xA;&#xA;&#xA;this.setBorder(&#xA;null);&#xA;&#xA;&#xA;&#xA;&#xA;this.setLineSeparator(&#xA;!firstOperand);&#xA;&#xA;&#xA;&#x9;&#x9;createContents();&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fInteractionConstraintLabel = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;fInteractionConstraintLabel.setText(&quot;&quot;);&#xA;&#xA;this.add(fInteractionConstraintLabel, &#xA;new org.eclipse.draw2d.geometry.Rectangle(getMapMode().DPtoLP(10)&#xA;, getMapMode().DPtoLP(10)&#xA;, getMapMode().DPtoLP(200)&#xA;, getMapMode().DPtoLP(20)&#xA;)&#xA;);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getInteractionConstraintLabel() {&#xA;&#x9;&#x9;return fInteractionConstraintLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:ResizeConstraints"
- resizeHandles="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InteractionOperand"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CombinedFragment/operand"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CombinedFragment/operand"/>
- </modelFacet>
- </childNodes>
- <childNodes
- visualID="3002"
- editPartClassName="InteractionUseEditPart"
- itemSemanticEditPolicyClassName="InteractionUseItemSemanticEditPolicy"
- notationViewFactoryClassName="InteractionUseViewFactory"
- canonicalEditPolicyClassName="InteractionUseCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InteractionUseGraphicalNodeEditPolicy"
- createCommandClassName="InteractionUseCreateCommand"
- containers="/0/@diagram/@childNodes.2 /0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="InteractionUseEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionUseRectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InteractionUse"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.3">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5003"
- editPartClassName="InteractionUseNameEditPart"
- itemSemanticEditPolicyClassName="InteractionUseNameItemSemanticEditPolicy"
- notationViewFactoryClassName="InteractionUseNameViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getHeaderLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="Ref"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5004"
- editPartClassName="InteractionUseName2EditPart"
- itemSemanticEditPolicyClassName="InteractionUseName2ItemSemanticEditPolicy"
- notationViewFactoryClassName="InteractionUseNameViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCenterLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2"
- viewPattern=""
- editorPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3016"
- editPartClassName="ContinuationEditPart"
- itemSemanticEditPolicyClassName="ContinuationItemSemanticEditPolicy"
- notationViewFactoryClassName="ContinuationViewFactory"
- canonicalEditPolicyClassName="ContinuationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ContinuationGraphicalNodeEditPolicy"
- createCommandClassName="ContinuationCreateCommand"
- containers="/0/@diagram/@childNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ContinuationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="ContinuationFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class ContinuationFigure extends org.eclipse.draw2d.RoundedRectangle {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel fFigureContinuationNameLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public ContinuationFigure() {&#xA;&#x9;&#x9;&#xA;&#x9;org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout layoutThis = new org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout();&#xA;&#xA;&#xA;&#x9;this.setLayoutManager(layoutThis);&#xA;&#xA;&#x9;&#x9;this.setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(50)&#xA;, getMapMode().DPtoLP(50)&#xA;));&#xA;&#x9;&#x9;createContents();&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureContinuationNameLabel = new org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel();&#xA;&#xA;&#xA;&#xA;this.add(fFigureContinuationNameLabel);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel getFigureContinuationNameLabel() {&#xA;&#x9;&#x9;return fFigureContinuationNameLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Continuation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InteractionOperand/fragment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InteractionOperand/fragment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.4">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5007"
- editPartClassName="ContinuationNameEditPart"
- itemSemanticEditPolicyClassName="ContinuationNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ContinuationNameViewFactory"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureContinuationNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3001"
- editPartClassName="LifelineEditPart"
- itemSemanticEditPolicyClassName="LifelineItemSemanticEditPolicy"
- notationViewFactoryClassName="LifelineViewFactory"
- canonicalEditPolicyClassName="LifelineCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13"
- graphicalNodeEditPolicyClassName="LifelineGraphicalNodeEditPolicy"
- createCommandClassName="LifelineCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="LifelineEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="LifelineFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class LifelineFigure extends org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureLifelineLabelFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RectangleFigure fFigureLifelineNameContainerFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RectangleFigure fFigureExecutionsContainerFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure fFigureLifelineDotLineFigure; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public LifelineFigure() {&#xA;&#x9;&#x9;&#xA;&#x9;org.eclipse.draw2d.BorderLayout layoutThis = new org.eclipse.draw2d.BorderLayout();&#xA;&#x9;this.setLayoutManager(layoutThis);&#xA;&#xA;&#x9;&#x9;&#xA;&#xA;this.setMaximumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(100)&#xA;, getMapMode().DPtoLP(200)&#xA;));&#xA;&#x9;&#x9;createContents();&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureLifelineNameContainerFigure = new org.eclipse.draw2d.RectangleFigure();&#xA;&#xA;fFigureLifelineNameContainerFigure.setBorder(new org.eclipse.draw2d.MarginBorder(getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(7)&#xA;));&#xA;&#xA;this.add(fFigureLifelineNameContainerFigure, org.eclipse.draw2d.BorderLayout.TOP);&#xA;fFigureLifelineNameContainerFigure.setLayoutManager(new org.eclipse.draw2d.StackLayout());&#xA;&#xA;&#xA;fFigureLifelineLabelFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;&#xA;&#xA;&#xA;&#xA;fFigureLifelineLabelFigure.setText(&#xA;&quot;&lt;...>&quot;);&#xA;&#xA;&#xA;&#xA;&#xA;fFigureLifelineLabelFigure.setTextWrap(&#xA;true);&#xA;&#xA;&#xA;&#xA;&#xA;fFigureLifelineLabelFigure.setAlignment(&#xA;org.eclipse.draw2d.PositionConstants.CENTER);&#xA;&#xA;&#xA;&#xA;fFigureLifelineNameContainerFigure.add(fFigureLifelineLabelFigure);&#xA;&#xA;&#xA;&#xA;&#xA;fFigureExecutionsContainerFigure = new org.eclipse.draw2d.RectangleFigure();&#xA;fFigureExecutionsContainerFigure.setFill(false);&#xA;fFigureExecutionsContainerFigure.setOutline(false);&#xA;&#xA;this.add(fFigureExecutionsContainerFigure, org.eclipse.draw2d.BorderLayout.CENTER);&#xA;fFigureExecutionsContainerFigure.setLayoutManager(new org.eclipse.draw2d.StackLayout());&#xA;&#xA;&#xA;fFigureLifelineDotLineFigure = new org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure();&#xA;&#xA;&#xA;&#xA;fFigureExecutionsContainerFigure.add(fFigureLifelineDotLineFigure);&#xA;&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureLifelineLabelFigure() {&#xA;&#x9;&#x9;return fFigureLifelineLabelFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.draw2d.RectangleFigure getFigureLifelineNameContainerFigure() {&#xA;&#x9;&#x9;return fFigureLifelineNameContainerFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.draw2d.RectangleFigure getFigureExecutionsContainerFigure() {&#xA;&#x9;&#x9;return fFigureExecutionsContainerFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure getFigureLifelineDotLineFigure() {&#xA;&#x9;&#x9;return fFigureLifelineDotLineFigure;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="250"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineXYLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ElementCreationWithMessageEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineAppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Lifeline"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/lifeline"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/lifeline"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.5">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5002"
- editPartClassName="LifelineNameEditPart"
- itemSemanticEditPolicyClassName="LifelineNameItemSemanticEditPolicy"
- notationViewFactoryClassName="LifelineNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureLifelineLabelFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="{0}"
- editorPattern="{0}"
- editPattern="{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3006"
- editPartClassName="ActionExecutionSpecificationEditPart"
- itemSemanticEditPolicyClassName="ActionExecutionSpecificationItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionExecutionSpecificationViewFactory"
- canonicalEditPolicyClassName="ActionExecutionSpecificationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActionExecutionSpecificationGraphicalNodeEditPolicy"
- createCommandClassName="ActionExecutionSpecificationCreateCommand"
- containers="/0/@diagram/@childNodes.5">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ActionExecutionSpecificationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="ExecutionSpecificationRectangleFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class ExecutionSpecificationRectangleFigure extends org.eclipse.draw2d.RectangleFigure {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public ExecutionSpecificationRectangleFigure() {&#xA;&#x9;&#x9;&#x9;&#x9;this.setPreferredSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(16)&#xA;, getMapMode().DPtoLP(60)&#xA;));&#xA;this.setMinimumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(16)&#xA;, getMapMode().DPtoLP(25)&#xA;));&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:ResizeConstraints"
- resizeHandles="5"/>
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="16"
- height="60"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ElementCreationWithMessageEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionExecutionSpecification"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- </modelFacet>
- </childNodes>
- <childNodes
- visualID="3003"
- editPartClassName="BehaviorExecutionSpecificationEditPart"
- itemSemanticEditPolicyClassName="BehaviorExecutionSpecificationItemSemanticEditPolicy"
- notationViewFactoryClassName="BehaviorExecutionSpecificationViewFactory"
- canonicalEditPolicyClassName="BehaviorExecutionSpecificationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="BehaviorExecutionSpecificationGraphicalNodeEditPolicy"
- createCommandClassName="BehaviorExecutionSpecificationCreateCommand"
- containers="/0/@diagram/@childNodes.5">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="BehaviorExecutionSpecificationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="ExecutionSpecificationRectangleFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class ExecutionSpecificationRectangleFigure extends org.eclipse.draw2d.RectangleFigure {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public ExecutionSpecificationRectangleFigure() {&#xA;&#x9;&#x9;&#x9;&#x9;this.setPreferredSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(16)&#xA;, getMapMode().DPtoLP(60)&#xA;));&#xA;this.setMinimumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(16)&#xA;, getMapMode().DPtoLP(25)&#xA;));&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:ResizeConstraints"
- resizeHandles="5"/>
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="16"
- height="60"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ElementCreationWithMessageEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BehaviorExecutionSpecification"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- </modelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3017"
- editPartClassName="StateInvariantEditPart"
- itemSemanticEditPolicyClassName="StateInvariantItemSemanticEditPolicy"
- notationViewFactoryClassName="StateInvariantViewFactory"
- canonicalEditPolicyClassName="StateInvariantCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="StateInvariantGraphicalNodeEditPolicy"
- createCommandClassName="StateInvariantCreateCommand"
- containers="/0/@diagram/@childNodes.5">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="StateInvariantEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="ContinuationFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class ContinuationFigure extends org.eclipse.draw2d.RoundedRectangle {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel fFigureContinuationNameLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public ContinuationFigure() {&#xA;&#x9;&#x9;&#xA;&#x9;org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout layoutThis = new org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout();&#xA;&#xA;&#xA;&#x9;this.setLayoutManager(layoutThis);&#xA;&#xA;&#x9;&#x9;this.setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(50)&#xA;, getMapMode().DPtoLP(50)&#xA;));&#xA;&#x9;&#x9;createContents();&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureContinuationNameLabel = new org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel();&#xA;&#xA;&#xA;&#xA;this.add(fFigureContinuationNameLabel);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel getFigureContinuationNameLabel() {&#xA;&#x9;&#x9;return fFigureContinuationNameLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateInvariant"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.6">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5008"
- editPartClassName="StateInvariantNameEditPart"
- itemSemanticEditPolicyClassName="StateInvariantNameItemSemanticEditPolicy"
- notationViewFactoryClassName="StateInvariantNameViewFactory"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureContinuationNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3018"
- editPartClassName="CombinedFragment2EditPart"
- itemSemanticEditPolicyClassName="CombinedFragment2ItemSemanticEditPolicy"
- notationViewFactoryClassName="CombinedFragmentViewFactory"
- canonicalEditPolicyClassName="CombinedFragment2CanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="CombinedFragment2GraphicalNodeEditPolicy"
- createCommandClassName="CombinedFragment2CreateCommand"
- containers="/0/@diagram/@childNodes.5">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.CoRegionCombinedFragmentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CombinedFragment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.7">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3019"
- editPartClassName="TimeConstraintEditPart"
- itemSemanticEditPolicyClassName="TimeConstraintItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeConstraintViewFactory"
- canonicalEditPolicyClassName="TimeConstraintCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="TimeConstraintGraphicalNodeEditPolicy"
- createCommandClassName="TimeConstraintCreateCommand"
- containers="/0/@diagram/@childNodes.5">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="TimeConstraintEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="TimeMarkElementFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class TimeMarkElementFigure extends org.eclipse.draw2d.PolylineShape {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public TimeMarkElementFigure() {&#xA;&#x9;&#x9;&#x9;&#x9;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;));&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(20)&#xA;, getMapMode().DPtoLP(0)&#xA;));&#xA;this.setLocation(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;));&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="DeleteTimeElementWithoutEventPolicy.KEY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeConstraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.8">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeInterval"/>
- </newElementInitializers>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.9">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5009"
- editPartClassName="TimeConstraintLabelEditPart"
- itemSemanticEditPolicyClassName="TimeConstraintLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeConstraintLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="MultilineLabelFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class MultilineLabelFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public MultilineLabelFigure() {&#xA;&#x9;&#x9;&#x9;&#x9;&#xA;&#xA;&#xA;&#xA;this.setTextAlignment(&#xA;PositionConstants.CENTER);&#xA;&#xA;&#xA;&#xA;&#xA;this.setAlignment(&#xA;PositionConstants.CENTER);&#xA;&#xA;&#xA;&#xA;&#xA;this.setBackgroundColor(&#xA;getBackgroundColor());&#xA;&#xA;&#xA;&#xA;&#xA;this.setTextWrap(&#xA;true);&#xA;&#xA;&#xA;&#xA;&#xA;this.setTextJustification(&#xA;PositionConstants.CENTER);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="22"
- y="-7"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5013"
- editPartClassName="TimeConstraintAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="TimeConstraintAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeConstraintLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-22"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3020"
- editPartClassName="TimeObservationEditPart"
- itemSemanticEditPolicyClassName="TimeObservationItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeObservationViewFactory"
- canonicalEditPolicyClassName="TimeObservationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="TimeObservationGraphicalNodeEditPolicy"
- createCommandClassName="TimeObservationCreateCommand"
- containers="/0/@diagram/@childNodes.5">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="TimeObservationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="TimeMarkElementFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class TimeMarkElementFigure extends org.eclipse.draw2d.PolylineShape {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public TimeMarkElementFigure() {&#xA;&#x9;&#x9;&#x9;&#x9;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;));&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(20)&#xA;, getMapMode().DPtoLP(0)&#xA;));&#xA;this.setLocation(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;));&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="DeleteTimeElementWithoutEventPolicy.KEY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeObservation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.10">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5010"
- editPartClassName="TimeObservationLabelEditPart"
- itemSemanticEditPolicyClassName="TimeObservationLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeObservationLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="MultilineLabelFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class MultilineLabelFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public MultilineLabelFigure() {&#xA;&#x9;&#x9;&#x9;&#x9;&#xA;&#xA;&#xA;&#xA;this.setTextAlignment(&#xA;PositionConstants.CENTER);&#xA;&#xA;&#xA;&#xA;&#xA;this.setAlignment(&#xA;PositionConstants.CENTER);&#xA;&#xA;&#xA;&#xA;&#xA;this.setBackgroundColor(&#xA;getBackgroundColor());&#xA;&#xA;&#xA;&#xA;&#xA;this.setTextWrap(&#xA;true);&#xA;&#xA;&#xA;&#xA;&#xA;this.setTextJustification(&#xA;PositionConstants.CENTER);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="22"
- y="-7"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5014"
- editPartClassName="TimeObservationAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="TimeObservationAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeObservationLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-22"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3021"
- editPartClassName="DurationConstraintEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintViewFactory"
- canonicalEditPolicyClassName="DurationConstraintCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DurationConstraintGraphicalNodeEditPolicy"
- createCommandClassName="DurationConstraintCreateCommand"
- containers="/0/@diagram/@childNodes.5">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="DurationConstraintEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="DurationConstraintFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class DurationConstraintFigure extends org.eclipse.draw2d.RectangleFigure {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.PolylineShape fDurationArrow; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public DurationConstraintFigure() {&#xA;&#x9;&#x9;&#xA;&#x9;org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout layoutThis = new org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout();&#xA;&#xA;&#xA;&#x9;this.setLayoutManager(layoutThis);&#xA;&#xA;&#x9;&#x9;this.setFill(false);&#xA;this.setOutline(false);&#xA;this.setPreferredSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(40)&#xA;, getMapMode().DPtoLP(-1)&#xA;));&#xA;this.setBorder(createBorder0());&#xA;&#x9;&#x9;createContents();&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fDurationArrow = new org.eclipse.draw2d.PolylineShape();&#xA;fDurationArrow.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;));&#xA;fDurationArrow.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(10)&#xA;, getMapMode().DPtoLP(0)&#xA;));&#xA;&#xA;this.add(fDurationArrow);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.Border createBorder0() {&#xA;&#x9;&#x9;org.eclipse.papyrus.uml.diagram.common.draw2d.LinesBorder result = new org.eclipse.papyrus.uml.diagram.common.draw2d.LinesBorder();&#xA;&#x9;&#x9;&#xA;&#xA;&#xA;&#xA;result.setSides(&#xA;PositionConstants.TOP | PositionConstants.BOTTOM);&#xA;&#xA;&#xA;&#xA;&#x9;&#x9;return result;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.draw2d.PolylineShape getDurationArrow() {&#xA;&#x9;&#x9;return fDurationArrow;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="-1"
- height="-1"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="DeleteTimeElementWithoutEventPolicy.KEY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationConstraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.11">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationInterval"/>
- </newElementInitializers>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.12">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5011"
- editPartClassName="DurationConstraintLabelEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="MultilineLabelFigure"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class MultilineLabelFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public MultilineLabelFigure() {&#xA;&#x9;&#x9;&#x9;&#x9;&#xA;&#xA;&#xA;&#xA;this.setTextAlignment(&#xA;PositionConstants.CENTER);&#xA;&#xA;&#xA;&#xA;&#xA;this.setAlignment(&#xA;PositionConstants.CENTER);&#xA;&#xA;&#xA;&#xA;&#xA;this.setBackgroundColor(&#xA;getBackgroundColor());&#xA;&#xA;&#xA;&#xA;&#xA;this.setTextWrap(&#xA;true);&#xA;&#xA;&#xA;&#xA;&#xA;this.setTextJustification(&#xA;PositionConstants.CENTER);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="45"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5015"
- editPartClassName="DurationConstraintAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-22"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3022"
- editPartClassName="DestructionOccurrenceSpecificationEditPart"
- itemSemanticEditPolicyClassName="DestructionOccurrenceSpecificationItemSemanticEditPolicy"
- notationViewFactoryClassName="DestructionEventViewFactory"
- canonicalEditPolicyClassName="DestructionOccurrenceSpecificationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DestructionOccurrenceSpecificationGraphicalNodeEditPolicy"
- createCommandClassName="DestructionOccurrenceSpecificationCreateCommand"
- containers="/0/@diagram/@childNodes.5"
- preferredSideName="SOUTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="DestructionEventEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.DestructionEventFigure">
- <attributes
- xsi:type="gmfgen:ResizeConstraints"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DestructionEventComponentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DestructionOccurrenceSpecification"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/fragment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.13">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- </childNodes>
- <childNodes
- visualID="3008"
- editPartClassName="ConstraintEditPart"
- itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintViewFactory"
- canonicalEditPolicyClassName="ConstraintCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicy"
- createCommandClassName="ConstraintCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ConstraintEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.14">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralString/value"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LiteralString"/>
- </newElementInitializers>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5005"
- editPartClassName="ConstraintNameEditPart"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5012"
- editPartClassName="Constraint2EditPart"
- itemSemanticEditPolicyClassName="Constraint2ItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.9"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3009"
- editPartClassName="CommentEditPart"
- itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicy"
- notationViewFactoryClassName="CommentViewFactory"
- canonicalEditPolicyClassName="CommentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicy"
- createCommandClassName="CommentCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="CommentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5006"
- editPartClassName="CommentBodyEditPart"
- itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicy"
- notationViewFactoryClassName="CommentBodyViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.4"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3023"
- editPartClassName="DurationConstraintInMessageEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintInMessageItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintViewFactory"
- canonicalEditPolicyClassName="DurationConstraintInMessageCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DurationConstraintInMessageGraphicalNodeEditPolicy"
- createCommandClassName="DurationConstraintInMessageCreateCommand"
- containers="/0/@diagram/@topLevelNodes.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.12/@elementType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="DurationObservationConstraint"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class DurationObservationConstraint extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fDurationLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public DurationObservationConstraint() {&#xA;&#x9;&#x9;&#x9;&#x9;&#xA;&#xA;&#xA;&#xA;this.setTextWrap(&#xA;true);&#xA;&#xA;&#xA;&#xA;&#xA;this.setTextJustification(&#xA;PositionConstants.CENTER);&#xA;&#xA;&#xA;&#x9;this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#xA;this.setFont(THIS_FONT);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getDurationLabel() {&#xA;&#x9;&#x9;return fDurationLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Font THIS_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), &quot;SANS&quot;, 9, org.eclipse.swt.SWT.NORMAL);&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"
- fixedForeground="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MoveableNonResizableLabelEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="DeleteTimeElementWithoutEventPolicy.KEY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationConstraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.15">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationInterval"/>
- </newElementInitializers>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.16">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5018"
- editPartClassName="DurationConstraintInMessageLabelEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintInMessageLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getDurationLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"
- fixedForeground="true"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.SELECTION_FEEDBACK_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5019"
- editPartClassName="DurationConstraintInMessageAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintInMessageAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-22"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3024"
- editPartClassName="DurationObservationEditPart"
- itemSemanticEditPolicyClassName="DurationObservationItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationObservationViewFactory"
- canonicalEditPolicyClassName="DurationObservationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DurationObservationGraphicalNodeEditPolicy"
- createCommandClassName="DurationObservationCreateCommand"
- containers="/0/@diagram/@topLevelNodes.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="DurationObservationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="DurationObservationConstraint"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class DurationObservationConstraint extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fDurationLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public DurationObservationConstraint() {&#xA;&#x9;&#x9;&#x9;&#x9;&#xA;&#xA;&#xA;&#xA;this.setTextWrap(&#xA;true);&#xA;&#xA;&#xA;&#xA;&#xA;this.setTextJustification(&#xA;PositionConstants.CENTER);&#xA;&#xA;&#xA;&#x9;this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#xA;this.setFont(THIS_FONT);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getDurationLabel() {&#xA;&#x9;&#x9;return fDurationLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Font THIS_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), &quot;SANS&quot;, 9, org.eclipse.swt.SWT.NORMAL);&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"
- fixedForeground="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MoveableNonResizableLabelEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="DeleteTimeElementWithoutEventPolicy.KEY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationObservation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.17">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5016"
- editPartClassName="DurationObservationLabelEditPart"
- itemSemanticEditPolicyClassName="DurationObservationLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationObservationLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getDurationLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"
- fixedForeground="true"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.SELECTION_FEEDBACK_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.5"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5017"
- editPartClassName="DurationObservationAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="DurationObservationAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationObservationLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-22"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- </childNodes>
- <topLevelNodes
- visualID="2001"
- editPartClassName="InteractionEditPart"
- itemSemanticEditPolicyClassName="InteractionItemSemanticEditPolicy"
- notationViewFactoryClassName="InteractionViewFactory"
- canonicalEditPolicyClassName="InteractionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17"
- compartments="/0/@diagram/@compartments.0"
- graphicalNodeEditPolicyClassName="InteractionGraphicalNodeEditPolicy"
- createCommandClassName="InteractionCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="InteractionEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.InteractionRectangleFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="857"
- height="757"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5001"
- editPartClassName="InteractionNameEditPart"
- itemSemanticEditPolicyClassName="InteractionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="InteractionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getHeaderLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="sd: {0}"
- editorPattern="{0}"
- editPattern="{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <links
- visualID="4003"
- editPartClassName="MessageEditPart"
- itemSemanticEditPolicyClassName="MessageItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageViewFactory"
- createCommandClassName="MessageCreateCommand"
- reorientCommandClassName="MessageReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="MessageEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="MessageSync"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class MessageSync extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureMessageSyncLabelFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fAppliedStereotypeLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public MessageSync() {&#xA;&#x9;&#x9;&#x9;this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#xA;&#x9;&#x9;createContents();&#xA;&#x9;&#x9;setTargetDecoration(createTargetDecoration());&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureMessageSyncLabelFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;fFigureMessageSyncLabelFigure.setText(&quot;&quot;);&#xA;&#xA;fFigureMessageSyncLabelFigure.setFont(FFIGUREMESSAGESYNCLABELFIGURE_FONT);&#xA;&#xA;&#xA;&#xA;fFigureMessageSyncLabelFigure.setBorder(new org.eclipse.draw2d.MarginBorder(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;));&#xA;&#xA;this.add(fFigureMessageSyncLabelFigure);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {&#xA;&#x9;&#x9;org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();&#xA;df.setFill(true);&#xA;&#x9;df.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#x9;df.setBackgroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(-2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;df.setTemplate(pl);&#xA;df.setScale(getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(3)&#xA;);&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureMessageSyncLabelFigure() {&#xA;&#x9;&#x9;return fFigureMessageSyncLabelFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getAppliedStereotypeLabel() {&#xA;&#x9;&#x9;return fAppliedStereotypeLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Font FFIGUREMESSAGESYNCLABELFIGURE_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), &quot;SANS&quot;, 9, org.eclipse.swt.SWT.NORMAL);&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedForeground="true"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_BENDPOINTS_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.1">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Message"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/owner"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedElement"/>
- </modelFacet>
- <labels
- visualID="6001"
- editPartClassName="MessageNameEditPart"
- itemSemanticEditPolicyClassName="MessageNameItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureMessageSyncLabelFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-13"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6008"
- editPartClassName="MessageSyncAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="MessageSyncAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-33"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.1/@expressions.2"
- targetEnd="/0/@expressionProviders/@providers.1/@expressions.3"/>
- </links>
- <links
- visualID="4004"
- editPartClassName="Message2EditPart"
- itemSemanticEditPolicyClassName="Message2ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageViewFactory"
- createCommandClassName="Message2CreateCommand"
- reorientCommandClassName="Message2ReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@links.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="MessageAsync"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class MessageAsync extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureMessageAsyncLabelFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fAppliedStereotypeLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public MessageAsync() {&#xA;&#x9;&#x9;&#xA;&#x9;&#x9;createContents();&#xA;&#x9;&#x9;setTargetDecoration(createTargetDecoration());&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureMessageAsyncLabelFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;fFigureMessageAsyncLabelFigure.setText(&quot;&quot;);&#xA;&#x9;fFigureMessageAsyncLabelFigure.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#xA;fFigureMessageAsyncLabelFigure.setFont(FFIGUREMESSAGEASYNCLABELFIGURE_FONT);&#xA;&#xA;&#xA;&#xA;this.add(fFigureMessageAsyncLabelFigure);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {&#xA;&#x9;&#x9;org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();&#xA;&#x9;df.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(-2)&#xA;);&#xA;df.setTemplate(pl);&#xA;df.setScale(getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(3)&#xA;);&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureMessageAsyncLabelFigure() {&#xA;&#x9;&#x9;return fFigureMessageAsyncLabelFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getAppliedStereotypeLabel() {&#xA;&#x9;&#x9;return fAppliedStereotypeLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Font FFIGUREMESSAGEASYNCLABELFIGURE_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), &quot;SANS&quot;, 9, org.eclipse.swt.SWT.NORMAL);&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedForeground="true"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_BENDPOINTS_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.4">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Message"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/owner"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedElement"/>
- </modelFacet>
- <labels
- visualID="6002"
- editPartClassName="MessageName2EditPart"
- itemSemanticEditPolicyClassName="MessageName2ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureMessageAsyncLabelFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"
- fixedForeground="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-13"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6009"
- editPartClassName="MessageAsyncAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="MessageAsyncAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"
- fixedForeground="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-33"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.1/@expressions.5"
- targetEnd="/0/@expressionProviders/@providers.1/@expressions.6"/>
- </links>
- <links
- visualID="4005"
- editPartClassName="Message3EditPart"
- itemSemanticEditPolicyClassName="Message3ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageViewFactory"
- createCommandClassName="Message3CreateCommand"
- reorientCommandClassName="Message3ReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@links.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="MessageReply"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class MessageReply extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureMessageReplyLabelFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fAppliedStereotypeLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public MessageReply() {&#xA;&#x9;&#x9;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xA;&#x9;this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#xA;&#x9;&#x9;createContents();&#xA;&#x9;&#x9;setTargetDecoration(createTargetDecoration());&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureMessageReplyLabelFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;fFigureMessageReplyLabelFigure.setText(&quot;&quot;);&#xA;&#xA;fFigureMessageReplyLabelFigure.setFont(FFIGUREMESSAGEREPLYLABELFIGURE_FONT);&#xA;&#xA;&#xA;&#xA;this.add(fFigureMessageReplyLabelFigure);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {&#xA;&#x9;&#x9;org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();&#xA;&#x9;df.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(-2)&#xA;);&#xA;df.setTemplate(pl);&#xA;df.setScale(getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(3)&#xA;);&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureMessageReplyLabelFigure() {&#xA;&#x9;&#x9;return fFigureMessageReplyLabelFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getAppliedStereotypeLabel() {&#xA;&#x9;&#x9;return fAppliedStereotypeLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Font FFIGUREMESSAGEREPLYLABELFIGURE_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), &quot;SANS&quot;, 9, org.eclipse.swt.SWT.NORMAL);&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedForeground="true"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_BENDPOINTS_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.7">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Message"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/owner"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedElement"/>
- </modelFacet>
- <labels
- visualID="6003"
- editPartClassName="MessageName3EditPart"
- itemSemanticEditPolicyClassName="MessageName3ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureMessageReplyLabelFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-13"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6010"
- editPartClassName="MessageReplyAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="MessageReplyAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-33"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.1/@expressions.8"
- targetEnd="/0/@expressionProviders/@providers.1/@expressions.9"/>
- </links>
- <links
- visualID="4006"
- editPartClassName="Message4EditPart"
- itemSemanticEditPolicyClassName="Message4ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageViewFactory"
- createCommandClassName="Message4CreateCommand"
- reorientCommandClassName="Message4ReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@links.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="MessageCreate"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class MessageCreate extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureMessageCreateLabelFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fAppliedStereotypeLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public MessageCreate() {&#xA;&#x9;&#x9;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xA;&#x9;this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#xA;&#x9;&#x9;createContents();&#xA;&#x9;&#x9;setTargetDecoration(createTargetDecoration());&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureMessageCreateLabelFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;fFigureMessageCreateLabelFigure.setText(&quot;&quot;);&#xA;&#xA;fFigureMessageCreateLabelFigure.setFont(FFIGUREMESSAGECREATELABELFIGURE_FONT);&#xA;&#xA;&#xA;&#xA;this.add(fFigureMessageCreateLabelFigure);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {&#xA;&#x9;&#x9;org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();&#xA;&#x9;df.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(-2)&#xA;);&#xA;df.setTemplate(pl);&#xA;df.setScale(getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(3)&#xA;);&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureMessageCreateLabelFigure() {&#xA;&#x9;&#x9;return fFigureMessageCreateLabelFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getAppliedStereotypeLabel() {&#xA;&#x9;&#x9;return fAppliedStereotypeLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Font FFIGUREMESSAGECREATELABELFIGURE_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), &quot;SANS&quot;, 9, org.eclipse.swt.SWT.NORMAL);&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedForeground="true"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_BENDPOINTS_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.10">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Message"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/owner"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedElement"/>
- </modelFacet>
- <labels
- visualID="6004"
- editPartClassName="MessageName4EditPart"
- itemSemanticEditPolicyClassName="MessageName4ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureMessageCreateLabelFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-13"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6011"
- editPartClassName="MessageCreateAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="MessageCreateAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-33"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.1/@expressions.11"
- targetEnd="/0/@expressionProviders/@providers.1/@expressions.12"/>
- </links>
- <links
- visualID="4007"
- editPartClassName="Message5EditPart"
- itemSemanticEditPolicyClassName="Message5ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageViewFactory"
- createCommandClassName="Message5CreateCommand"
- reorientCommandClassName="Message5ReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@links.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="MessageDelete"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class MessageDelete extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureMessageDeleteLabelFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fAppliedStereotypeLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public MessageDelete() {&#xA;&#x9;&#x9;&#x9;this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#xA;&#x9;&#x9;createContents();&#xA;&#x9;&#x9;setTargetDecoration(createTargetDecoration());&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureMessageDeleteLabelFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;fFigureMessageDeleteLabelFigure.setText(&quot;&quot;);&#xA;&#xA;fFigureMessageDeleteLabelFigure.setFont(FFIGUREMESSAGEDELETELABELFIGURE_FONT);&#xA;&#xA;&#xA;&#xA;this.add(fFigureMessageDeleteLabelFigure);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {&#xA;&#x9;&#x9;org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();&#xA;df.setFill(true);&#xA;&#x9;df.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#x9;df.setBackgroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(-2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;df.setTemplate(pl);&#xA;df.setScale(getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(3)&#xA;);&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureMessageDeleteLabelFigure() {&#xA;&#x9;&#x9;return fFigureMessageDeleteLabelFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getAppliedStereotypeLabel() {&#xA;&#x9;&#x9;return fAppliedStereotypeLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Font FFIGUREMESSAGEDELETELABELFIGURE_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), &quot;SANS&quot;, 9, org.eclipse.swt.SWT.NORMAL);&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedForeground="true"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_BENDPOINTS_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.13">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Message"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/owner"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedElement"/>
- </modelFacet>
- <labels
- visualID="6005"
- editPartClassName="MessageName5EditPart"
- itemSemanticEditPolicyClassName="MessageName5ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureMessageDeleteLabelFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-13"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6012"
- editPartClassName="MessageDeleteAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="MessageDeleteAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-33"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.1/@expressions.14"
- targetEnd="/0/@expressionProviders/@providers.1/@expressions.15"/>
- </links>
- <links
- visualID="4008"
- editPartClassName="Message6EditPart"
- itemSemanticEditPolicyClassName="Message6ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageViewFactory"
- createCommandClassName="Message6CreateCommand"
- reorientCommandClassName="Message6ReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@links.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="MessageLost"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class MessageLost extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureMessageLostLabelFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fAppliedStereotypeLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public MessageLost() {&#xA;&#x9;&#x9;&#x9;this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#xA;&#x9;&#x9;createContents();&#xA;&#x9;&#x9;setTargetDecoration(createTargetDecoration());&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureMessageLostLabelFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;fFigureMessageLostLabelFigure.setText(&quot;&quot;);&#xA;&#xA;fFigureMessageLostLabelFigure.setFont(FFIGUREMESSAGELOSTLABELFIGURE_FONT);&#xA;&#xA;&#xA;&#xA;this.add(fFigureMessageLostLabelFigure);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {&#xA;&#x9;&#x9;org.eclipse.papyrus.uml.diagram.sequence.figures.EllipseDecoration df = new org.eclipse.papyrus.uml.diagram.sequence.figures.EllipseDecoration();&#xA;&#xA;&#xA;&#xA;&#xA;df.setAlwaysFill(&#xA;true);&#xA;&#xA;&#xA;&#xA;&#xA;df.setPreferredSize(&#xA;new org.eclipse.draw2d.geometry.Dimension(10,10));&#xA;&#xA;&#xA;&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureMessageLostLabelFigure() {&#xA;&#x9;&#x9;return fFigureMessageLostLabelFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getAppliedStereotypeLabel() {&#xA;&#x9;&#x9;return fAppliedStereotypeLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Font FFIGUREMESSAGELOSTLABELFIGURE_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), &quot;SANS&quot;, 9, org.eclipse.swt.SWT.NORMAL);&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedForeground="true"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_BENDPOINTS_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.16">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Message"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/owner"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedElement"/>
- </modelFacet>
- <labels
- visualID="6006"
- editPartClassName="MessageName6EditPart"
- itemSemanticEditPolicyClassName="MessageName6ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureMessageLostLabelFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-13"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6013"
- editPartClassName="MessageLostAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="MessageLostAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-33"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.1/@expressions.17"
- targetEnd="/0/@expressionProviders/@providers.1/@expressions.18"/>
- </links>
- <links
- visualID="4009"
- editPartClassName="Message7EditPart"
- itemSemanticEditPolicyClassName="Message7ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageViewFactory"
- createCommandClassName="Message7CreateCommand"
- reorientCommandClassName="Message7ReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@links.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="MessageFound"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class MessageFound extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureMessageFoundLabelFigure; &#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fAppliedStereotypeLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public MessageFound() {&#xA;&#x9;&#x9;&#x9;this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#xA;&#x9;&#x9;createContents();&#xA;&#x9;&#x9;setSourceDecoration(createSourceDecoration());&#xA;&#x9;&#x9;setTargetDecoration(createTargetDecoration());&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private void createContents(){&#xA;&#xA;&#xA;fFigureMessageFoundLabelFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();&#xA;fFigureMessageFoundLabelFigure.setText(&quot;&quot;);&#xA;&#xA;fFigureMessageFoundLabelFigure.setFont(FFIGUREMESSAGEFOUNDLABELFIGURE_FONT);&#xA;&#xA;&#xA;&#xA;this.add(fFigureMessageFoundLabelFigure);&#xA;&#xA;&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RotatableDecoration createSourceDecoration() {&#xA;&#x9;&#x9;org.eclipse.papyrus.uml.diagram.sequence.figures.EllipseDecoration df = new org.eclipse.papyrus.uml.diagram.sequence.figures.EllipseDecoration();&#xA;&#xA;&#xA;&#xA;&#xA;df.setAlwaysFill(&#xA;true);&#xA;&#xA;&#xA;&#xA;&#xA;df.setPreferredSize(&#xA;new org.eclipse.draw2d.geometry.Dimension(10,10));&#xA;&#xA;&#xA;&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {&#xA;&#x9;&#x9;org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();&#xA;&#x9;df.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(-2)&#xA;);&#xA;df.setTemplate(pl);&#xA;df.setScale(getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(3)&#xA;);&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureMessageFoundLabelFigure() {&#xA;&#x9;&#x9;return fFigureMessageFoundLabelFigure;&#xA;&#x9;}&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getAppliedStereotypeLabel() {&#xA;&#x9;&#x9;return fAppliedStereotypeLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;/**&#xA; * @generated&#xA; */&#xA;static final org.eclipse.swt.graphics.Font FFIGUREMESSAGEFOUNDLABELFIGURE_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), &quot;SANS&quot;, 9, org.eclipse.swt.SWT.NORMAL);&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedForeground="true"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.CONNECTION_BENDPOINTS_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.19">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Message"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/owner"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedElement"/>
- </modelFacet>
- <labels
- visualID="6007"
- editPartClassName="MessageName7EditPart"
- itemSemanticEditPolicyClassName="MessageName7ItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureMessageFoundLabelFigure"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-13"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6014"
- editPartClassName="MessageFoundAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="MessageFoundAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="MessageLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-33"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.1/@expressions.20"
- targetEnd="/0/@expressionProviders/@providers.1/@expressions.21"/>
- </links>
- <links
- visualID="4010"
- editPartClassName="CommentAnnotatedElementEditPart"
- itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
- notationViewFactoryClassName="CommentAnnotatedElementViewFactory"
- createCommandClassName="CommentAnnotatedElementCreateCommand"
- reorientCommandClassName="CommentAnnotatedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="CommentLinkDescriptor"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class CommentLinkDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public CommentLinkDescriptor() {&#xA;&#x9;&#x9;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="4011"
- editPartClassName="ConstraintConstrainedElementEditPart"
- itemSemanticEditPolicyClassName="ConstraintConstrainedElementItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintConstrainedElementViewFactory"
- createCommandClassName="ConstraintConstrainedElementCreateCommand"
- reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="ConstraintLinkDescriptor"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class ConstraintLinkDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public ConstraintLinkDescriptor() {&#xA;&#x9;&#x9;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xA;&#xA;&#x9;}&#xA;&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="4012"
- editPartClassName="GeneralOrderingEditPart"
- itemSemanticEditPolicyClassName="GeneralOrderingItemSemanticEditPolicy"
- notationViewFactoryClassName="GeneralOrderingViewFactory"
- createCommandClassName="GeneralOrderingCreateCommand"
- reorientCommandClassName="GeneralOrderingReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="GeneralOrderingEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="GeneralOrderingDescriptor"
- classBody="&#xA;/**&#xA; * @generated&#xA; */&#xA;public class GeneralOrderingDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fAppliedStereotypeLabel; &#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public GeneralOrderingDescriptor() {&#xA;&#x9;&#x9;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xA;&#x9;this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#xA;&#x9;&#x9;setTargetDecoration(createTargetDecoration());&#xA;&#x9;}&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() {&#xA;&#x9;&#x9;org.eclipse.draw2d.PolygonDecoration df = new org.eclipse.draw2d.PolygonDecoration();&#xA;df.setFill(true);&#xA;&#x9;df.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;&#x9;df.setBackgroundColor(org.eclipse.draw2d.ColorConstants.black);&#xA;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(0)&#xA;, getMapMode().DPtoLP(0)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(-2)&#xA;);&#xA;pl.addPoint(getMapMode().DPtoLP(-2)&#xA;, getMapMode().DPtoLP(2)&#xA;);&#xA;df.setTemplate(pl);&#xA;df.setScale(getMapMode().DPtoLP(7)&#xA;, getMapMode().DPtoLP(3)&#xA;);&#xA;&#x9;&#x9;return df;&#xA;&#x9;}&#xA;&#xA;&#xA;&#x9;/**&#xA;&#x9; * @generated&#xA;&#x9; */&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getAppliedStereotypeLabel() {&#xA;&#x9;&#x9;return fAppliedStereotypeLabel;&#xA;&#x9;}&#xA;&#xA;&#xA;}&#xA;&#xA;">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedForeground="true"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralOrdering"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InteractionFragment/generalOrdering"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InteractionFragment/generalOrdering"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.18">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralOrdering/before"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralOrdering/after"/>
- </modelFacet>
- <labels
- visualID="6015"
- editPartClassName="GeneralOrderingAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="GeneralOrderingAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="GeneralOrderingLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"
- fixedForeground="true"/>
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-33"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- </links>
- <compartments
- visualID="7001"
- editPartClassName="InteractionInteractionCompartmentEditPart"
- itemSemanticEditPolicyClassName="InteractionInteractionCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="InteractionInteractionCompartmentViewFactory"
- canonicalEditPolicyClassName="InteractionInteractionCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15"
- title="InteractionCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@topLevelNodes.0"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionCompartmentXYLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7004"
- editPartClassName="CombinedFragmentCombinedFragmentCompartmentEditPart"
- itemSemanticEditPolicyClassName="CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="CombinedFragmentCombinedFragmentCompartmentViewFactory"
- canonicalEditPolicyClassName="CombinedFragmentCombinedFragmentCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2"
- title="CombinedFragmentCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- </compartments>
- <palette>
- <groups
- title="Nodes"
- description=""
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Lifeline"
- description="Create a Lifeline"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
- genNodes="/0/@diagram/@childNodes.5"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Action Execution Specification"
- description="Create an Action Execution Specification"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActionExecutionSpecification.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActionExecutionSpecification.gif"
- genNodes="/0/@diagram/@childNodes.6"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title=" Behavior Execution Specification"
- description="Create an BehaviorExecutionSpecification"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/BehaviorExecutionSpecification.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/BehaviorExecutionSpecification.gif"
- genNodes="/0/@diagram/@childNodes.7"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="InteractionUse"
- description="Create InteractionUse"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif"
- genNodes="/0/@diagram/@childNodes.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Combined Fragment"
- description="Create Combined Fragment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
- genNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Interaction Operand"
- description="Create Interaction Operand"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionOperand.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionOperand.gif"
- genNodes="/0/@diagram/@childNodes.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Continuation"
- description="Create Continuation"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Continuation.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Continuation.gif"
- genNodes="/0/@diagram/@childNodes.4"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="StateInvariant"
- description="Create StateInvariant"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateInvariant.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateInvariant.gif"
- genNodes="/0/@diagram/@childNodes.8"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Comment"
- description="Create a comment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- genNodes="/0/@diagram/@childNodes.15"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Constraint"
- description="Create a constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- genNodes="/0/@diagram/@childNodes.14"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="CoRegion"
- description="Create a CoRegion"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
- genNodes="/0/@diagram/@childNodes.9"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Duration Observation"
- description="Create a Duration Observation on a Message"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
- genNodes="/0/@diagram/@childNodes.17"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Time Constraint"
- description="Create a Time Constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
- genNodes="/0/@diagram/@childNodes.10"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Time Observation"
- description="Create a Time Observation"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
- genNodes="/0/@diagram/@childNodes.11"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Duration Constraint"
- description="Create a Duration Constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
- genNodes="/0/@diagram/@childNodes.12 /0/@diagram/@childNodes.16"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Destruction Event"
- description="Create a Destruction Event"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestructionEvent.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestructionEvent.gif"
- genNodes="/0/@diagram/@childNodes.13"/>
- </groups>
- <groups
- title="Edges"
- description="Message tools"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Message Sync"
- description="Create MessageSync"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_synchCall.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_synchCall.gif"
- genLinks="/0/@diagram/@links.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Message Async"
- description="Create MessageAsync"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_asynchCall.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_asynchCall.gif"
- genLinks="/0/@diagram/@links.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Message Reply"
- description="Create MessageReply"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_reply.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_reply.gif"
- genLinks="/0/@diagram/@links.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Message Create"
- description="Create MessageCreate"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
- genLinks="/0/@diagram/@links.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Message Delete"
- description="Create MessageDelete"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_deleteMessage.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_deleteMessage.gif"
- genLinks="/0/@diagram/@links.4"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Message Lost"
- description="Create MessageLost"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
- genLinks="/0/@diagram/@links.5"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Message Found"
- description="Create MessageFound"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
- genLinks="/0/@diagram/@links.6"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="General Ordering"
- description="Create GeneralOrdering"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralOrdering.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralOrdering.gif"
- genLinks="/0/@diagram/@links.9"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Comment link"
- description="Create a comment link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- genLinks="/0/@diagram/@links.7"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Constraint link"
- description="Create a constraint link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- genLinks="/0/@diagram/@links.8"/>
- </groups>
- </palette>
- <preferencePages
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.general"
- name="UML Diagram">
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.appearance"
- name="Appearance"
- kind="Appearance"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.connections"
- name="Connections"
- kind="Connections"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.printing"
- name="Printing"
- kind="Printing"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
- name="Rulers And Grid"
- kind="RulersAndGrid"/>
- </preferencePages>
- </diagram>
- <plugin
- iD="org.eclipse.papyrus.uml.diagram.sequence"
- provider="CEA"
- version="0.7.1.qualifier">
- <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
- <requiredPlugins>org.eclipse.papyrus.uml.diagram.common</requiredPlugins>
- <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
- </plugin>
- <editor/>
- <navigator>
- <childReferences
- child="/0/@diagram"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.0"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@childNodes.3"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@childNodes.0"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@childNodes.1"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@childNodes.4"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@childNodes.2"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.1"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@childNodes.6"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@childNodes.7"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@childNodes.8"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@childNodes.9"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@childNodes.10"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@childNodes.11"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@childNodes.12"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@childNodes.13"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.5"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.3"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.14"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.15"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.16"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.17"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@topLevelNodes.0"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.0"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.5"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.7"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.8"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.9"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.10"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.12"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.13"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.14"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.15"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.17"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.1"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.5"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.7"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.8"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.9"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.10"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.12"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.13"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.14"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.15"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.17"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.2"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.5"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.7"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.8"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.9"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.10"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.12"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.13"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.14"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.15"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.17"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.3"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.5"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.7"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.8"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.9"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.10"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.12"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.13"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.14"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.15"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.17"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.4"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.5"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.7"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.8"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.9"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.10"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.12"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.13"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.14"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.15"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.17"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.5"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.5"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.7"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.8"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.9"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.10"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.12"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.13"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.14"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.15"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.17"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.6"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.5"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.7"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.8"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.9"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.10"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.12"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.13"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.14"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.15"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@childNodes.17"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.7"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.7"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.7"
- child="/0/@diagram/@childNodes.15"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.7"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.8"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.0"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.1"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.2"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@links.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.6"
- child="/0/@diagram/@links.8"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.10"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.8"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.12"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.8"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.14"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.8"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.8"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.8"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.9"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- </navigator>
- <diagramUpdater/>
- <propertySheet>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="appearance"/>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="diagram"/>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
- <types>org.eclipse.gmf.runtime.notation.View</types>
- <types>org.eclipse.gef.EditPart</types>
- <generatedTypes>abstractNavigatorItem</generatedTypes>
- </filter>
- </tabs>
- </propertySheet>
- <domainGenModel
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
- <expressionProviders>
- <providers
- xsi:type="gmfgen:GenJavaExpressionProvider"
- injectExpressionBody="true">
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, &quot;t&quot;, &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return &quot;&quot;;"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, &quot;d&quot;, &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateFragmentsOrder(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateFragmentsOrder(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateFragmentsOrder(context, ctx);"/>
- </providers>
- <providers
- xsi:type="gmfgen:GenExpressionInterpreter">
- <expressions
- body="' '"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.messageSort=MessageSort::synchCall and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::InteractionFragment)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(self.messageSort=MessageSort::asynchCall or self.messageSort=MessageSort::asynchSignal) and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="true&#xD;&#xA;-- The following rule is completely false : check can not be performed with only source and target (depends on the the location on the lifeline). Anyway, job is previously done by method CommandHelper.hasValidContainer(IEditCommandRequest)&#xD;&#xA;--(self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)) and (self.owner = oppositeEnd.owner or self.owner = oppositeEnd or self = oppositeEnd.owner)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.messageSort=MessageSort::reply and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::InteractionFragment)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.messageSort=MessageSort::createMessage and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::Lifeline)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.messageSort=MessageSort::deleteMessage and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::DestructionOccurrenceSpecification) or self.oclIsKindOf(uml::Lifeline)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.receiveEvent=null"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::Lifeline) or self.oclIsKindOf(uml::InteractionFragment)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::Interaction)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.sendEvent=null"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::Interaction)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(self.oclIsKindOf(uml::Lifeline) or self.oclIsKindOf(uml::InteractionFragment))"/>
- </providers>
- </expressionProviders>
- <labelParsers
- extensibleViaService="true">
- <implementations
- xsi:type="gmfgen:PredefinedParser"
- uses="/0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.14/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.5/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.sequence.parser.custom.LifelineCustomParsers"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.3/@labels.1/@modelFacet"
- qualifiedName=" org.eclipse.papyrus.uml.diagram.sequence.parser.custom.InteractionUseCustomParsers"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.0/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@links.2/@labels.0/@modelFacet /0/@diagram/@links.6/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.0/@modelFacet"
- qualifiedName=" org.eclipse.papyrus.uml.diagram.sequence.parser.custom.MessageCustomParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.15/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.17/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.sequence.parser.custom.DurationObservationParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@childNodes.16/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.sequence.parser.custom.TimeConstraintParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.11/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.sequence.parser.custom.TimeObservationParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.2/@labels.1/@modelFacet /0/@diagram/@childNodes.12/@labels.1/@modelFacet /0/@diagram/@links.9/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.1/@modelFacet /0/@diagram/@childNodes.17/@labels.1/@modelFacet /0/@diagram/@childNodes.10/@labels.1/@modelFacet /0/@diagram/@childNodes.16/@labels.1/@modelFacet /0/@diagram/@links.0/@labels.1/@modelFacet /0/@diagram/@childNodes.11/@labels.1/@modelFacet /0/@diagram/@links.6/@labels.1/@modelFacet /0/@diagram/@links.5/@labels.1/@modelFacet /0/@diagram/@links.3/@labels.1/@modelFacet /0/@diagram/@links.4/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.14/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
- </labelParsers>
- <contextMenus
- context="/0/@diagram">
- <items
- xsi:type="gmfgen:LoadResourceAction"/>
- </contextMenus>
- </gmfgen:GenEditorGenerator>
- <papyrusgmfgenextension:PapyrusExtensionRootNode>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- genView="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.3"
- name="InteractionFragmentEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionFragmentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- genView="/0/@diagram/@childNodes.0"
- superGenViews="/0/@diagram/@childNodes.1"
- name="CombinedFragmentEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocator"
- comment="Affixed locator for Lifelines to place element with a time bar"
- classpath="org.eclipse.papyrus.uml.diagram.sequence.locator.TimeMarkElementPositionLocator"
- genChildSideAffixedNode="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocator"
- comment="Specific locator for the itemBorder of the lifeline."
- classpath="org.eclipse.papyrus.uml.diagram.sequence.locator.CenterLocator"
- genChildSideAffixedNode="/0/@diagram/@childNodes.13 /0/@diagram/@childNodes.8"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="// make DurationConstraint as message label"
- name="LabelEditPart"
- superOwnedEditPart="org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Node with label for named element"
- genView="/0/@diagram/@childNodes.5"
- name="NamedElementEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="this is an extension to manage the comment"
- genView="/0/@diagram/@childNodes.15"
- name="comment extended node"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="ConstraintEditPart extension"
- genView="/0/@diagram/@childNodes.14"
- name="ConstraintEditPart extension"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:EditPartUsingDeleteService"
- comment=""
- genView="/0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.6 /0/@diagram/@links.0 /0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.3 /0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.13 /0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.0"/>
- </papyrusgmfgenextension:PapyrusExtensionRootNode>
-</xmi:XMI>
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfgraph b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfgraph
deleted file mode 100644
index fb090be290a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfgraph
+++ /dev/null
@@ -1,912 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gmfgraph:Canvas
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgraph="http://www.eclipse.org/gmf/2006/GraphicalDefinition"
- name="uml">
- <figures
- name="Sequence Gallery"
- implementationBundle="org.eclipse.papyrus.uml.diagram.common">
- <figures
- xsi:type="gmfgraph:CustomDecoration"
- name="RoundedArrow"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.EllipseDecoration">
- <attributes
- name="alwaysFill"
- value="true"/>
- <attributes
- name="PreferredSize"
- value="new org.eclipse.draw2d.geometry.Dimension(10,10)"/>
- </figures>
- <figures
- xsi:type="gmfgraph:PolylineDecoration"
- name="OpenArow">
- <foregroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- <template
- x="-2"
- y="2"/>
- <template/>
- <template
- x="-2"
- y="-2"/>
- </figures>
- <figures
- xsi:type="gmfgraph:PolygonDecoration"
- name="ClosedArow">
- <foregroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- <backgroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- <template
- x="-2"
- y="2"/>
- <template/>
- <template
- x="-2"
- y="-2"/>
- <template
- x="-2"
- y="2"/>
- </figures>
- <descriptors
- name="CustomInteractionRectangleFigure">
- <actualFigure
- xsi:type="gmfgraph:CustomFigure"
- name="CustomInteractionRectangleFigure"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.InteractionRectangleFigure">
- <customChildren
- accessor="getHeaderLabel()">
- <typedFigure
- xsi:type="gmfgraph:Label"
- name="InteractionLabel"/>
- </customChildren>
- <customChildren
- accessor="getCompartmentFigure()">
- <typedFigure
- xsi:type="gmfgraph:Rectangle"
- name="InteractionCompartmentFigure"/>
- </customChildren>
- </actualFigure>
- <accessors
- accessor="getCompartmentFigure"
- figure="//@figures.0/@descriptors.0/@actualFigure/@customChildren.1/@typedFigure"/>
- <accessors
- accessor="getHeaderLabel"
- figure="//@figures.0/@descriptors.0/@actualFigure/@customChildren.0/@typedFigure"/>
- </descriptors>
- <descriptors
- name="LifelineFigure">
- <actualFigure
- xsi:type="gmfgraph:CustomFigure"
- name="LifelineFigure"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure">
- <layout
- xsi:type="gmfgraph:BorderLayout"/>
- <maximumSize
- dx="100"
- dy="200"/>
- <children
- xsi:type="gmfgraph:Rectangle"
- name="LifelineNameContainerFigure">
- <layoutData
- xsi:type="gmfgraph:BorderLayoutData"
- alignment="BEGINNING"
- vertical="true"/>
- <layout
- xsi:type="gmfgraph:StackLayout"/>
- <insets
- top="7"
- left="7"
- bottom="7"
- right="7"/>
- <children
- xsi:type="gmfgraph:CustomFigure"
- name="LifelineLabelFigure"
- qualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- name="Text"
- value="&quot;&lt;...>&quot;"/>
- <attributes
- name="TextWrap"
- value="true"/>
- <attributes
- name="Alignment"
- value="org.eclipse.draw2d.PositionConstants.CENTER"/>
- </children>
- </children>
- <children
- xsi:type="gmfgraph:Rectangle"
- name="ExecutionsContainerFigure"
- outline="false"
- fill="false">
- <layoutData
- xsi:type="gmfgraph:BorderLayoutData"
- vertical="true"/>
- <layout
- xsi:type="gmfgraph:StackLayout"/>
- <children
- xsi:type="gmfgraph:CustomFigure"
- name="LifelineDotLineFigure"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure"/>
- </children>
- </actualFigure>
- <accessors
- figure="//@figures.0/@descriptors.1/@actualFigure/@children.0/@children.0"/>
- <accessors
- figure="//@figures.0/@descriptors.1/@actualFigure/@children.0"/>
- <accessors
- accessor="getFigureExecutionsContainerFigure"
- figure="//@figures.0/@descriptors.1/@actualFigure/@children.1"/>
- <accessors
- accessor="getFigureLifelineDotLineFigure"
- figure="//@figures.0/@descriptors.1/@actualFigure/@children.1/@children.0"/>
- </descriptors>
- <descriptors
- name="ExecutionSpecificationRectangleFigure">
- <actualFigure
- xsi:type="gmfgraph:Rectangle"
- name="ExecutionSpecificationRectangleFigure">
- <minimumSize
- dx="16"
- dy="25"/>
- <preferredSize
- dx="16"
- dy="60"/>
- </actualFigure>
- </descriptors>
- <descriptors
- name="CustomInteractionUse">
- <actualFigure
- xsi:type="gmfgraph:CustomFigure"
- name="CustomInteractionUseFigure"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionUseRectangleFigure">
- <customChildren
- accessor="getCenterLabel()">
- <typedFigure
- xsi:type="gmfgraph:Label"
- name="CenterLabel"/>
- </customChildren>
- </actualFigure>
- <accessors
- accessor="getHeaderLabel"
- figure="//@figures.0/@descriptors.0/@actualFigure/@customChildren.0/@typedFigure"/>
- <accessors
- accessor="getCenterLabel"
- figure="//@figures.0/@descriptors.3/@actualFigure/@customChildren.0/@typedFigure"/>
- </descriptors>
- <descriptors
- name="CustomCombinedFragmentFigureDescriptor">
- <actualFigure
- xsi:type="gmfgraph:CustomFigure"
- name="CustomCombinedFragmentFigure"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.CombinedFragmentFigure">
- <customChildren
- accessor="getCompartmentFigure()">
- <typedFigure
- xsi:type="gmfgraph:Rectangle"
- name="CombinedFragmentCompartmentFigure"
- outline="false"
- fill="false"/>
- </customChildren>
- </actualFigure>
- <accessors
- accessor="getCompartmentFigure"
- figure="//@figures.0/@descriptors.4/@actualFigure/@customChildren.0/@typedFigure"/>
- </descriptors>
- <descriptors
- name="CustomInteractionOperandFigure">
- <actualFigure
- xsi:type="gmfgraph:CustomFigure"
- name="CustomInteractionOperandFigure"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionOperandFigure">
- <layout
- xsi:type="gmfgraph:XYLayout"/>
- <children
- xsi:type="gmfgraph:Label"
- name="InteractionConstraint"
- text="">
- <layoutData
- xsi:type="gmfgraph:XYLayoutData">
- <topLeft
- x="10"
- y="10"/>
- <size
- dx="200"
- dy="20"/>
- </layoutData>
- </children>
- <attributes
- name="lineStyle"
- value="Graphics.LINE_DASH"/>
- <attributes
- name="border"/>
- <attributes
- name="lineSeparator"
- value="!firstOperand"/>
- </actualFigure>
- <accessors
- accessor="getInteractionConstraintLabel"
- figure="//@figures.0/@descriptors.5/@actualFigure/@children.0"/>
- </descriptors>
- <descriptors
- name="MessageSync">
- <actualFigure
- xsi:type="gmfgraph:PolylineConnection"
- name="CallSync"
- targetDecoration="//@figures.0/@figures.2">
- <foregroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- <children
- xsi:type="gmfgraph:Label"
- name="MessageSyncLabelFigure"
- text="">
- <font
- xsi:type="gmfgraph:BasicFont"
- faceName="SANS"/>
- <insets/>
- </children>
- </actualFigure>
- <accessors
- figure="//@figures.0/@descriptors.6/@actualFigure/@children.0"/>
- <accessors
- accessor="getAppliedStereotypeLabel"
- figure="//@figures.0/@descriptors.6/@actualFigure/@children.0"/>
- </descriptors>
- <descriptors
- name="MessageAsync">
- <actualFigure
- xsi:type="gmfgraph:PolylineConnection"
- name="CallAsync"
- targetDecoration="//@figures.0/@figures.1">
- <children
- xsi:type="gmfgraph:Label"
- name="MessageAsyncLabelFigure">
- <foregroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- <font
- xsi:type="gmfgraph:BasicFont"
- faceName="SANS"/>
- </children>
- </actualFigure>
- <accessors
- figure="//@figures.0/@descriptors.7/@actualFigure/@children.0"/>
- <accessors
- accessor="getAppliedStereotypeLabel"
- figure="//@figures.0/@descriptors.7/@actualFigure/@children.0"/>
- </descriptors>
- <descriptors
- name="MessageReply">
- <actualFigure
- xsi:type="gmfgraph:PolylineConnection"
- name="CallReply"
- lineKind="LINE_DASH"
- targetDecoration="//@figures.0/@figures.1">
- <foregroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- <children
- xsi:type="gmfgraph:Label"
- name="MessageReplyLabelFigure">
- <font
- xsi:type="gmfgraph:BasicFont"
- faceName="SANS"/>
- </children>
- </actualFigure>
- <accessors
- accessor="getFigureMessageReplyLabelFigure"
- figure="//@figures.0/@descriptors.8/@actualFigure/@children.0"/>
- <accessors
- accessor="getAppliedStereotypeLabel"
- figure="//@figures.0/@descriptors.8/@actualFigure/@children.0"/>
- </descriptors>
- <descriptors
- name="MessageCreate">
- <actualFigure
- xsi:type="gmfgraph:PolylineConnection"
- name="CallCreate"
- lineKind="LINE_DASH"
- targetDecoration="//@figures.0/@figures.1">
- <foregroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- <children
- xsi:type="gmfgraph:Label"
- name="MessageCreateLabelFigure">
- <font
- xsi:type="gmfgraph:BasicFont"
- faceName="SANS"/>
- </children>
- </actualFigure>
- <accessors
- accessor="getFigureMessageCreateLabelFigure"
- figure="//@figures.0/@descriptors.9/@actualFigure/@children.0"/>
- <accessors
- accessor="getAppliedStereotypeLabel"
- figure="//@figures.0/@descriptors.9/@actualFigure/@children.0"/>
- </descriptors>
- <descriptors
- name="MessageDelete">
- <actualFigure
- xsi:type="gmfgraph:PolylineConnection"
- name="CallDelete"
- targetDecoration="//@figures.0/@figures.2">
- <foregroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- <children
- xsi:type="gmfgraph:Label"
- name="MessageDeleteLabelFigure"
- text="">
- <font
- xsi:type="gmfgraph:BasicFont"
- faceName="SANS"/>
- </children>
- </actualFigure>
- <accessors
- figure="//@figures.0/@descriptors.10/@actualFigure/@children.0"/>
- <accessors
- accessor="getAppliedStereotypeLabel"
- figure="//@figures.0/@descriptors.10/@actualFigure/@children.0"/>
- </descriptors>
- <descriptors
- name="MessageLost">
- <actualFigure
- xsi:type="gmfgraph:PolylineConnection"
- name="CallLost"
- targetDecoration="//@figures.0/@figures.0">
- <foregroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- <children
- xsi:type="gmfgraph:Label"
- name="MessageLostLabelFigure">
- <font
- xsi:type="gmfgraph:BasicFont"
- faceName="SANS"/>
- </children>
- </actualFigure>
- <accessors
- figure="//@figures.0/@descriptors.11/@actualFigure/@children.0"/>
- <accessors
- accessor="getAppliedStereotypeLabel"
- figure="//@figures.0/@descriptors.11/@actualFigure/@children.0"/>
- </descriptors>
- <descriptors
- name="MessageFound">
- <actualFigure
- xsi:type="gmfgraph:PolylineConnection"
- name="CallFound"
- sourceDecoration="//@figures.0/@figures.0"
- targetDecoration="//@figures.0/@figures.1">
- <foregroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- <children
- xsi:type="gmfgraph:Label"
- name="MessageFoundLabelFigure">
- <font
- xsi:type="gmfgraph:BasicFont"
- faceName="SANS"/>
- </children>
- </actualFigure>
- <accessors
- figure="//@figures.0/@descriptors.12/@actualFigure/@children.0"/>
- <accessors
- accessor="getAppliedStereotypeLabel"
- figure="//@figures.0/@descriptors.12/@actualFigure/@children.0"/>
- </descriptors>
- <descriptors
- name="ContinuationFigure">
- <actualFigure
- xsi:type="gmfgraph:RoundedRectangle"
- name="ContinuationRoundedRectangle"
- cornerWidth="50"
- cornerHeight="50">
- <layout
- xsi:type="gmfgraph:CustomLayout"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout"/>
- <children
- xsi:type="gmfgraph:CustomFigure"
- name="ContinuationNameLabel"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
- </actualFigure>
- <accessors
- figure="//@figures.0/@descriptors.13/@actualFigure/@children.0"/>
- </descriptors>
- <descriptors
- name="CoregionFigure">
- <actualFigure
- xsi:type="gmfgraph:CustomFigure"
- name="CustomCoregionFigure"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.CoRegionCombinedFragmentFigure"/>
- </descriptors>
- <descriptors
- name="DurationObservationConstraint">
- <actualFigure
- xsi:type="gmfgraph:CustomFigure"
- name="DurationObservationLabelFigure"
- qualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <foregroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- <font
- xsi:type="gmfgraph:BasicFont"
- faceName="SANS"/>
- <attributes
- name="TextWrap"
- value="true"/>
- <attributes
- name="TextJustification"
- value="PositionConstants.CENTER"/>
- </actualFigure>
- <accessors
- accessor="getDurationLabel"
- figure="//@figures.0/@descriptors.15/@actualFigure"/>
- </descriptors>
- <descriptors
- name="TimeMarkElementFigure">
- <actualFigure
- xsi:type="gmfgraph:Polyline"
- name="TimeMark">
- <location/>
- <template/>
- <template
- x="20"/>
- </actualFigure>
- </descriptors>
- <descriptors
- name="DurationConstraintFigure">
- <actualFigure
- xsi:type="gmfgraph:Rectangle"
- name="DurationRect"
- outline="false"
- fill="false">
- <layout
- xsi:type="gmfgraph:CustomLayout"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout"/>
- <preferredSize
- dx="40"
- dy="-1"/>
- <border
- xsi:type="gmfgraph:CustomBorder"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.common.draw2d.LinesBorder">
- <attributes
- name="sides"
- value="PositionConstants.TOP | PositionConstants.BOTTOM"/>
- </border>
- <children
- xsi:type="gmfgraph:Polyline"
- name="DurationArrow">
- <template/>
- <template
- x="10"/>
- </children>
- </actualFigure>
- <accessors
- accessor="getDurationArrow"
- figure="//@figures.0/@descriptors.17/@actualFigure/@children.0"/>
- </descriptors>
- <descriptors
- name="DestructionEventFigureDesc">
- <actualFigure
- xsi:type="gmfgraph:CustomFigure"
- name="DestructionEventFigure"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.sequence.figures.DestructionEventFigure"/>
- </descriptors>
- <descriptors
- name="MultilineLabelFigure">
- <actualFigure
- xsi:type="gmfgraph:CustomFigure"
- name="MultilineLabel"
- qualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- name="TextAlignment"
- value="PositionConstants.CENTER"/>
- <attributes
- name="Alignment"
- value="PositionConstants.CENTER"/>
- <attributes
- name="BackgroundColor"
- value="getBackgroundColor()"/>
- <attributes
- name="TextWrap"
- value="true"/>
- <attributes
- name="TextJustification"
- value="PositionConstants.CENTER"/>
- </actualFigure>
- </descriptors>
- <descriptors
- name="AppliedStereotypeWrappingLabelFigure">
- <actualFigure
- xsi:type="gmfgraph:CustomFigure"
- name="AppliedStereotypeWrappingLabel"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- </descriptors>
- <descriptors
- name="GeneralOrderingDescriptor">
- <actualFigure
- xsi:type="gmfgraph:PolylineConnection"
- name="GeneralOrderingConnection"
- lineKind="LINE_DASH"
- targetDecoration="//@figures.0/@figures.2">
- <foregroundColor
- xsi:type="gmfgraph:ConstantColor"
- value="black"/>
- </actualFigure>
- <accessors
- accessor="getAppliedStereotypeLabel"
- figure="//@figures.0/@descriptors.7/@actualFigure/@children.0"/>
- </descriptors>
- </figures>
- <nodes
- name="InteractionNode"
- figure="CustomInteractionRectangleFigure"/>
- <nodes
- name="LifelineNode"
- figure="LifelineFigure">
- <facets
- xsi:type="gmfgraph:DefaultSizeFacet">
- <defaultSize
- dx="100"
- dy="250"/>
- </facets>
- </nodes>
- <nodes
- name="ActionExecutionSpecificationNode"
- figure="ExecutionSpecificationRectangleFigure"
- resizeConstraint="NORTH_SOUTH"/>
- <nodes
- name="BehaviourExecutionSpecification"
- figure="ExecutionSpecificationRectangleFigure"
- resizeConstraint="NORTH_SOUTH"/>
- <nodes
- name="InteractionUseNode"
- figure="CustomInteractionUse"/>
- <nodes
- name="CombinedFragmentNode"
- figure="CustomCombinedFragmentFigureDescriptor"/>
- <nodes
- name="InteractionOperandNode"
- figure="CustomInteractionOperandFigure"
- resizeConstraint="SOUTH"/>
- <nodes
- name="ContinuationNode"
- figure="ContinuationFigure"
- affixedParentSide="NORTH_SOUTH"/>
- <nodes
- name="StateInvariantNode"
- figure="ContinuationFigure"
- affixedParentSide="NSEW"/>
- <nodes
- name="CoregionNode"
- figure="CoregionFigure"/>
- <nodes
- name="TimeMarkElementNode"
- figure="TimeMarkElementFigure"
- affixedParentSide="EAST_WEST"/>
- <nodes
- name="DurationConstraintNode"
- figure="DurationConstraintFigure"
- affixedParentSide="EAST_WEST"/>
- <nodes
- name="DestructionEventNode"
- figure="DestructionEventFigureDesc"
- resizeConstraint="NONE"
- affixedParentSide="SOUTH"/>
- <nodes
- name="DurationObservationConstraintNode"
- figure="DurationObservationConstraint"/>
- <connections
- name="CallSynLink"
- figure="MessageSync"/>
- <connections
- name="CallAsyncLink"
- figure="MessageAsync"/>
- <connections
- name="ReplyLink"
- figure="MessageReply"/>
- <connections
- name="CreateLink"
- figure="MessageCreate"/>
- <connections
- name="DeleteLink"
- figure="MessageDelete"/>
- <connections
- name="LostLink"
- figure="MessageLost"/>
- <connections
- name="FoundLink"
- figure="MessageFound"/>
- <connections
- name="GeneralOrderingLink"
- figure="GeneralOrderingDescriptor"/>
- <compartments
- name="InteractionCompartment"
- figure="CustomInteractionRectangleFigure"
- accessor="//@figures.0/@descriptors.0/@accessors.0"/>
- <compartments
- name="ExecutionCompartment"
- figure="LifelineFigure"/>
- <compartments
- name="CombinedFragmentCompartment"
- figure="CustomCombinedFragmentFigureDescriptor"
- accessor="//@figures.0/@descriptors.4/@accessors.0"/>
- <labels
- name="InteractionName"
- figure="CustomInteractionRectangleFigure"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.0/@accessors.1"/>
- <labels
- name="LifelineLabel"
- figure="LifelineFigure"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.1/@accessors.0"/>
- <labels
- name="InteractionUseName"
- figure="CustomInteractionUse"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.3/@accessors.0"/>
- <labels
- name="InteractionUseRef"
- figure="CustomInteractionUse"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.3/@accessors.1"/>
- <labels
- name="MessageSyncLabel"
- figure="MessageSync"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.6/@accessors.0">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-13"/>
- </labels>
- <labels
- name="MessageSyncStereotypeLabel"
- figure="MessageSync"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.6/@accessors.1">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-33"/>
- </labels>
- <labels
- name="MessageAsyncLabel"
- figure="MessageAsync"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.7/@accessors.0">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-13"/>
- </labels>
- <labels
- name="MessageAsyncStereotypeLabel"
- figure="MessageAsync"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.7/@accessors.1">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-33"/>
- </labels>
- <labels
- name="MessageReplyLabel"
- figure="MessageReply"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.8/@accessors.0">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-13"/>
- </labels>
- <labels
- name="MessageReplyStereotypeLabel"
- figure="MessageReply"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.8/@accessors.1">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-33"/>
- </labels>
- <labels
- name="MessageCreateLabel"
- figure="MessageCreate"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.9/@accessors.0">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-13"/>
- </labels>
- <labels
- name="MessageCreateStereotypeLabel"
- figure="MessageCreate"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.9/@accessors.1">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-33"/>
- </labels>
- <labels
- name="MessageDeleteLabel"
- figure="MessageDelete"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.10/@accessors.0">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-13"/>
- </labels>
- <labels
- name="MessageDeleteStereotypeLabel"
- figure="MessageDelete"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.10/@accessors.1">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-33"/>
- </labels>
- <labels
- name="MessageLostLabel"
- figure="MessageLost"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.11/@accessors.0">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-13"/>
- </labels>
- <labels
- name="MessageLostStereotypeLabel"
- figure="MessageLost"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.11/@accessors.1">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-33"/>
- </labels>
- <labels
- name="MessageFoundLabel"
- figure="MessageFound"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.12/@accessors.0">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-13"/>
- </labels>
- <labels
- name="MessageFoundStereotypeLabel"
- figure="MessageFound"
- accessor="//@figures.0/@descriptors.12/@accessors.1">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-33"/>
- </labels>
- <labels
- name="ContinuationLabel"
- figure="ContinuationFigure"
- accessor="//@figures.0/@descriptors.13/@accessors.0"/>
- <labels
- name="DurationObservationLabel"
- figure="DurationObservationConstraint"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.15/@accessors.0">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="13"/>
- </labels>
- <labels
- name="TimeMarkElementLabel"
- figure="MultilineLabelFigure"
- elementIcon="false">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="13"/>
- </labels>
- <labels
- name="DurationConstraintLabel"
- figure="MultilineLabelFigure"
- elementIcon="false">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="13"/>
- </labels>
- <labels
- name="DurationConstraintOnMessage"
- figure="DurationObservationConstraint"
- elementIcon="false"
- accessor="//@figures.0/@descriptors.15/@accessors.0">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="13"/>
- </labels>
- <labels
- name="AppliedStereotypeExternalLabel"
- figure="AppliedStereotypeWrappingLabelFigure"/>
- <labels
- name="GeneralOrderingStereotypeLabel"
- figure="GeneralOrderingDescriptor"
- accessor="//@figures.0/@descriptors.21/@accessors.0">
- <facets
- xsi:type="gmfgraph:AlignmentFacet"
- alignment="CENTER"/>
- <facets
- xsi:type="gmfgraph:LabelOffsetFacet"
- x="1"
- y="-33"/>
- </labels>
-</gmfgraph:Canvas>
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfmap b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfmap
deleted file mode 100644
index cb779da942e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmfmap
+++ /dev/null
@@ -1,1066 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gmfmap:Mapping
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:gmfmap="http://www.eclipse.org/gmf/2008/mappings"
- xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
- <nodes>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Package/packagedElement"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- viewPattern="sd: {0}"
- editorPattern="{0}"
- editPattern="{0}">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#InteractionName"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <diagramNode
- href="sequenceDiagram.gmfgraph#InteractionNode"/>
- <children
- compartment="//@nodes.0/@ownedChild/@compartments.0">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/fragment"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//ConsiderIgnoreFragment"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.4"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#CombinedFragmentNode"/>
- </ownedChild>
- </children>
- <children
- compartment="//@nodes.0/@ownedChild/@compartments.0">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/fragment"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//CombinedFragment"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.4"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#CombinedFragmentNode"/>
- <children
- compartment="//@nodes.0/@ownedChild/@children.1/@ownedChild/@compartments.0"
- referencedChild="//@nodes.0/@ownedChild/@children.1/@ownedChild/@children.0/@ownedChild">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//CombinedFragment/operand"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//InteractionOperand"/>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.5"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#InteractionOperandNode"/>
- <children
- referencedChild="//@nodes.0/@ownedChild/@children.3/@ownedChild">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/fragment"/>
- </children>
- <children
- referencedChild="//@nodes.0/@ownedChild/@children.0/@ownedChild">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/fragment"/>
- </children>
- <children
- referencedChild="//@nodes.0/@ownedChild/@children.1/@ownedChild">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/fragment"/>
- </children>
- <children
- referencedChild="//@nodes.0/@ownedChild/@children.1/@ownedChild/@children.0/@ownedChild/@children.3/@ownedChild">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//InteractionOperand/fragment"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Continuation"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- viewPattern="">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#ContinuationLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.6"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#ContinuationNode"/>
- </ownedChild>
- </children>
- </ownedChild>
- </children>
- <compartments
- children="//@nodes.0/@ownedChild/@children.1/@ownedChild/@children.0">
- <compartment
- href="sequenceDiagram.gmfgraph#CombinedFragmentCompartment"/>
- </compartments>
- </ownedChild>
- </children>
- <children
- compartment="//@nodes.0/@ownedChild/@compartments.0">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/lifeline"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Lifeline"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- viewPattern="{0}"
- editorPattern="{0}"
- editPattern="{0}">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#LifelineLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.0"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#LifelineNode"/>
- <children>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/fragment"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//ActionExecutionSpecification"/>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.1"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#ActionExecutionSpecificationNode"/>
- </ownedChild>
- </children>
- <children>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/fragment"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//BehaviorExecutionSpecification"/>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.2"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#BehaviourExecutionSpecification"/>
- </ownedChild>
- </children>
- <children>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/fragment"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//StateInvariant"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#ContinuationLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.7"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#StateInvariantNode"/>
- </ownedChild>
- </children>
- <children>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/fragment"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//CombinedFragment"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.10"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#CoregionNode"/>
- </ownedChild>
- </children>
- <children
- referencedChild="//@nodes.0/@ownedChild/@children.2/@ownedChild/@children.0/@ownedChild">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Namespace/ownedRule"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//TimeConstraint"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:ReferenceNewElementSpec">
- <feature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//TimeInterval"/>
- </newElementInitializers>
- </initializers>
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <labelMappings>
- <diagramLabel
- href="sequenceDiagram.gmfgraph#TimeMarkElementLabel"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#AppliedStereotypeExternalLabel"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.12"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#TimeMarkElementNode"/>
- </ownedChild>
- </children>
- <children
- referencedChild="//@nodes.0/@ownedChild/@children.2/@ownedChild/@children.0/@ownedChild">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Package/packagedElement"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//TimeObservation"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, &quot;t&quot;, &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <labelMappings>
- <diagramLabel
- href="sequenceDiagram.gmfgraph#TimeMarkElementLabel"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#AppliedStereotypeExternalLabel"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.13"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#TimeMarkElementNode"/>
- </ownedChild>
- </children>
- <children
- referencedChild="//@nodes.0/@ownedChild/@children.2/@ownedChild/@children.0/@ownedChild">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Namespace/ownedRule"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//DurationConstraint"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:ReferenceNewElementSpec">
- <feature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//DurationInterval"/>
- </newElementInitializers>
- </initializers>
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <labelMappings>
- <diagramLabel
- href="sequenceDiagram.gmfgraph#DurationConstraintLabel"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#AppliedStereotypeExternalLabel"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.14"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#DurationConstraintNode"/>
- </ownedChild>
- </children>
- <children>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/fragment"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//DestructionOccurrenceSpecification"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.15"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#DestructionEventNode"/>
- </ownedChild>
- </children>
- </ownedChild>
- </children>
- <children
- compartment="//@nodes.0/@ownedChild/@compartments.0">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/fragment"/>
- <ownedChild
- relatedDiagrams="//@diagram">
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//InteractionUse"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- readOnly="true"
- viewPattern="Ref"
- editorPattern=""
- editPattern="">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#InteractionUseName"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- readOnly="true"
- viewPattern=""
- editorPattern="">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#InteractionUseRef"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.3"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#InteractionUseNode"/>
- </ownedChild>
- </children>
- <children
- compartment="//@nodes.0/@ownedChild/@compartments.0">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Namespace/ownedRule"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Constraint"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:ReferenceNewElementSpec">
- <feature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//LiteralString/value"/>
- <value
- body="return &quot;&quot;;"
- language="java"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//LiteralString"/>
- </newElementInitializers>
- </initializers>
- </domainInitializer>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- editPattern="">
- <diagramLabel
- href="../../org.eclipse.papyrus.uml.diagram.common/model/Constraint.gmfgraph#ConstraintNameDiagramLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <labelMappings>
- <diagramLabel
- href="../../org.eclipse.papyrus.uml.diagram.common/model/Constraint.gmfgraph#ConstraintBodyDiagramLabel"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.9"/>
- <diagramNode
- href="../../org.eclipse.papyrus.uml.diagram.common/model/Constraint.gmfgraph#ConstraintNode"/>
- </ownedChild>
- </children>
- <children
- compartment="//@nodes.0/@ownedChild/@compartments.0">
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedComment"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Comment"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Comment/body"/>
- <value
- body="' '"/>
- </initializers>
- </domainInitializer>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- editPattern="">
- <diagramLabel
- href="../../org.eclipse.papyrus.uml.diagram.common/model/Comment.gmfgraph#CornerBentContentDiagramLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Comment/body"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.8"/>
- <diagramNode
- href="../../org.eclipse.papyrus.uml.diagram.common/model/Comment.gmfgraph#CornerBentNode"/>
- </ownedChild>
- </children>
- <children>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Namespace/ownedRule"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//DurationConstraint"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:ReferenceNewElementSpec">
- <feature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//DurationInterval"/>
- </newElementInitializers>
- </initializers>
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <labelMappings>
- <diagramLabel
- href="sequenceDiagram.gmfgraph#DurationConstraintOnMessage"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#AppliedStereotypeExternalLabel"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.14"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#DurationObservationConstraintNode"/>
- </ownedChild>
- </children>
- <children>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Package/packagedElement"/>
- <ownedChild>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//DurationObservation"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, &quot;d&quot;, &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <labelMappings>
- <diagramLabel
- href="sequenceDiagram.gmfgraph#DurationObservationLabel"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#AppliedStereotypeExternalLabel"/>
- </labelMappings>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.0/@tools.11"/>
- <diagramNode
- href="sequenceDiagram.gmfgraph#DurationObservationConstraintNode"/>
- </ownedChild>
- </children>
- <compartments
- children="//@nodes.0/@ownedChild/@children.2 //@nodes.0/@ownedChild/@children.3 //@nodes.0/@ownedChild/@children.0 //@nodes.0/@ownedChild/@children.1 //@nodes.0/@ownedChild/@children.4 //@nodes.0/@ownedChild/@children.5">
- <compartment
- href="sequenceDiagram.gmfgraph#InteractionCompartment"/>
- </compartments>
- </ownedChild>
- </nodes>
- <links
- relatedDiagrams="//@diagram">
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Message"/>
- <domainSpecialization
- body="self.messageSort=MessageSort::synchCall and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- editorPattern=""
- editPattern="">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageSyncLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageSyncStereotypeLabel"/>
- </labelMappings>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/message"/>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.1/@tools.0"/>
- <diagramLink
- href="sequenceDiagram.gmfgraph#CallSynLink"/>
- <sourceMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/owner"/>
- <linkMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedElement"/>
- <creationConstraints>
- <sourceEnd
- body="self.oclIsKindOf(uml::InteractionFragment)"/>
- <targetEnd
- body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
- </creationConstraints>
- </links>
- <links
- relatedDiagrams="//@diagram">
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Message"/>
- <domainSpecialization
- body="(self.messageSort=MessageSort::asynchCall or self.messageSort=MessageSort::asynchSignal) and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- editPattern="">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageAsyncLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageAsyncStereotypeLabel"/>
- </labelMappings>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/message"/>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.1/@tools.1"/>
- <diagramLink
- href="sequenceDiagram.gmfgraph#CallAsyncLink"/>
- <sourceMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/owner"/>
- <linkMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedElement"/>
- <creationConstraints>
- <sourceEnd
- body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
- <targetEnd
- body="true&#xD;&#xA;-- The following rule is completely false : check can not be performed with only source and target (depends on the the location on the lifeline). Anyway, job is previously done by method CommandHelper.hasValidContainer(IEditCommandRequest)&#xD;&#xA;--(self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)) and (self.owner = oppositeEnd.owner or self.owner = oppositeEnd or self = oppositeEnd.owner)"/>
- </creationConstraints>
- </links>
- <links
- relatedDiagrams="//@diagram">
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Message"/>
- <domainSpecialization
- body="self.messageSort=MessageSort::reply and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- editPattern="">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageReplyLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageReplyStereotypeLabel"/>
- </labelMappings>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/message"/>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.1/@tools.2"/>
- <diagramLink
- href="sequenceDiagram.gmfgraph#ReplyLink"/>
- <sourceMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/owner"/>
- <linkMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedElement"/>
- <creationConstraints>
- <sourceEnd
- body="self.oclIsKindOf(uml::InteractionFragment)"/>
- <targetEnd
- body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
- </creationConstraints>
- </links>
- <links
- relatedDiagrams="//@diagram">
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Message"/>
- <domainSpecialization
- body="self.messageSort=MessageSort::createMessage and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- editorPattern=""
- editPattern="">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageCreateLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageCreateStereotypeLabel"/>
- </labelMappings>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/message"/>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.1/@tools.3"/>
- <diagramLink
- href="sequenceDiagram.gmfgraph#CreateLink"/>
- <sourceMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/owner"/>
- <linkMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedElement"/>
- <creationConstraints>
- <sourceEnd
- body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
- <targetEnd
- body="self.oclIsKindOf(uml::Lifeline)"/>
- </creationConstraints>
- </links>
- <links
- relatedDiagrams="//@diagram">
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Message"/>
- <domainSpecialization
- body="self.messageSort=MessageSort::deleteMessage and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- editPattern="">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageDeleteLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageDeleteStereotypeLabel"/>
- </labelMappings>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/message"/>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.1/@tools.4"/>
- <diagramLink
- href="sequenceDiagram.gmfgraph#DeleteLink"/>
- <sourceMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/owner"/>
- <linkMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedElement"/>
- <creationConstraints>
- <sourceEnd
- body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
- <targetEnd
- body="self.oclIsKindOf(uml::DestructionOccurenceSpecification) or self.oclIsKindOf(uml::Lifeline)"/>
- </creationConstraints>
- </links>
- <links
- relatedDiagrams="//@diagram">
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Message"/>
- <domainSpecialization
- body="self.receiveEvent=null"/>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- editorPattern=""
- editPattern="">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageLostLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageLostStereotypeLabel"/>
- </labelMappings>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/message"/>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.1/@tools.5"/>
- <diagramLink
- href="sequenceDiagram.gmfgraph#LostLink"/>
- <sourceMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/owner"/>
- <linkMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedElement"/>
- <creationConstraints>
- <sourceEnd
- body="self.oclIsKindOf(uml::Lifeline) or self.oclIsKindOf(uml::InteractionFragment)"/>
- <targetEnd
- body="self.oclIsKindOf(uml::Interaction)"/>
- </creationConstraints>
- </links>
- <links
- relatedDiagrams="//@diagram">
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Message"/>
- <domainSpecialization
- body="self.sendEvent=null"/>
- <labelMappings
- xsi:type="gmfmap:FeatureLabelMapping"
- editPattern="">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageFoundLabel"/>
- <features
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- </labelMappings>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#MessageFoundStereotypeLabel"/>
- </labelMappings>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction/message"/>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.1/@tools.6"/>
- <diagramLink
- href="sequenceDiagram.gmfgraph#FoundLink"/>
- <sourceMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/owner"/>
- <linkMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedElement"/>
- <creationConstraints>
- <sourceEnd
- body="self.oclIsKindOf(uml::Interaction)"/>
- <targetEnd
- body="(self.oclIsKindOf(uml::Lifeline) or self.oclIsKindOf(uml::InteractionFragment))"/>
- </creationConstraints>
- </links>
- <links
- relatedDiagrams="//@diagram">
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.1/@tools.8"/>
- <diagramLink
- href="../../org.eclipse.papyrus.uml.diagram.common/model/Comment.gmfgraph#CommentLinkConnection"/>
- <linkMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Comment/annotatedElement"/>
- </links>
- <links
- relatedDiagrams="//@diagram">
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.1/@tools.9"/>
- <diagramLink
- href="../../org.eclipse.papyrus.uml.diagram.common/model/Constraint.gmfgraph#ConstraintLinkConnection"/>
- <linkMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Constraint/constrainedElement"/>
- </links>
- <links
- relatedDiagrams="//@diagram">
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//GeneralOrdering"/>
- <domainInitializer
- xsi:type="gmfmap:FeatureSeqInitializer">
- <initializers
- xsi:type="gmfmap:FeatureValueSpec">
- <feature
- xsi:type="ecore:EAttribute"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement/name"/>
- <value
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"
- language="java"/>
- </initializers>
- </domainInitializer>
- <labelMappings
- readOnly="true">
- <diagramLabel
- href="sequenceDiagram.gmfgraph#GeneralOrderingStereotypeLabel"/>
- </labelMappings>
- <containmentFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//InteractionFragment/generalOrdering"/>
- <tool
- xsi:type="gmftool:CreationTool"
- href="sequenceDiagram.gmftool#//@palette/@tools.1/@tools.7"/>
- <diagramLink
- href="sequenceDiagram.gmfgraph#GeneralOrderingLink"/>
- <sourceMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//GeneralOrdering/before"/>
- <linkMetaFeature
- xsi:type="ecore:EReference"
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//GeneralOrdering/after"/>
- </links>
- <diagram>
- <diagramCanvas
- href="sequenceDiagram.gmfgraph#uml"/>
- <domainModel
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#/"/>
- <domainMetaElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Package"/>
- <palette
- href="sequenceDiagram.gmftool#//@palette"/>
- </diagram>
- <audits
- id="org.eclipse.uml2.uml.util.UMLValidator.validate"
- name="validateUMLModel"
- description="Validate the UML model">
- <childContainers
- id="org.eclipse.papyrus.uml.diagram.sequence.validation.FragmentOrderingKeeper"
- name="fragmentsOrder"
- description="Fragments order">
- <audits
- name="Interaction fragment ordering"
- description="The fragment property of an Interaction must be ordered as a valid trace."
- id="FragmentOrderingKeeper.Interaction"
- useInLiveMode="true"
- message="There is no valid trace sequencing the InteractionFragments in the fragment property. Some of them can not be organized as a valid sequence :{0}">
- <rule
- body="return UMLValidationHelper.validateFragmentsOrder(context, ctx);"
- language="java"/>
- <target
- xsi:type="gmfmap:DomainElementTarget">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interaction"/>
- </target>
- </audits>
- <audits
- name="InteractionOperand fragment ordering"
- description="The fragment property of an InteractionOperand must be ordered as a valid trace."
- id="FragmentOrderingKeeper.InteractionOperand"
- useInLiveMode="true"
- message="There is no valid trace sequencing the InteractionFragments in the fragment property. Some of them can not be organized as a valid sequence :{0}">
- <rule
- body="return UMLValidationHelper.validateFragmentsOrder(context, ctx);"
- language="java"/>
- <target
- xsi:type="gmfmap:DomainElementTarget">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//InteractionOperand"/>
- </target>
- </audits>
- <audits
- name="Fragment ordering"
- description="The fragment property of an Interaction or InteractionOperand must be ordered as a valid trace."
- id="FragmentOrderingKeeper.LifelineFigure"
- useInLiveMode="true"
- message="There is no valid trace sequencing the InteractionFragments in the fragment property. Some of them can not be organized as a valid sequence :{0}">
- <rule
- body="return UMLValidationHelper.validateFragmentsOrder(context, ctx);"
- language="java"/>
- <target
- xsi:type="gmfmap:DiagramElementTarget"
- element="//@nodes.0/@ownedChild/@children.2/@ownedChild"/>
- </audits>
- </childContainers>
- </audits>
-</gmfmap:Mapping>
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmftool b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmftool
deleted file mode 100644
index 3df665439b4..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.gmftool
+++ /dev/null
@@ -1,376 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gmftool:ToolRegistry
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
- <palette
- title="umlPalette">
- <tools
- xsi:type="gmftool:ToolGroup"
- title="Nodes"
- description=""
- collapsible="true">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/group.gif"
- bundle="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/group.gif"
- bundle="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui"/>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Lifeline"
- description="Create a Lifeline">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Lifeline.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Lifeline.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Action Execution Specification"
- description="Create an Action Execution Specification">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/ActionExecutionSpecification.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/ActionExecutionSpecification.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title=" Behavior Execution Specification"
- description="Create an BehaviorExecutionSpecification">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/BehaviorExecutionSpecification.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/BehaviorExecutionSpecification.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="InteractionUse"
- description="Create InteractionUse">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/InteractionUse.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/InteractionUse.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Combined Fragment"
- description="Create Combined Fragment">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/CombinedFragment.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/CombinedFragment.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Interaction Operand"
- description="Create Interaction Operand">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/InteractionOperand.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/InteractionOperand.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Continuation"
- description="Create Continuation">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Continuation.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Continuation.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="StateInvariant"
- description="Create StateInvariant">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/StateInvariant.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/StateInvariant.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Comment"
- description="Create a comment">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Comment.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Comment.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Constraint"
- description="Create a constraint">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Constraint.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Constraint.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="CoRegion"
- description="Create a CoRegion">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/CombinedFragment.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/CombinedFragment.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Duration Observation"
- description="Create a Duration Observation on a Message">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/DurationObservation.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/DurationObservation.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Time Constraint"
- description="Create a Time Constraint">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/TimeConstraint.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/TimeConstraint.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Time Observation"
- description="Create a Time Observation">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/TimeObservation.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/TimeObservation.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Duration Constraint"
- description="Create a Duration Constraint">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/DurationConstraint.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/DurationConstraint.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Destruction Event"
- description="Create a Destruction Event">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/DestructionEvent.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/DestructionEvent.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- </tools>
- <tools
- xsi:type="gmftool:ToolGroup"
- title="Edges"
- description="Message tools"
- collapsible="true">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/group.gif"
- bundle="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/group.gif"
- bundle="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui"/>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Message Sync"
- description="Create MessageSync">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message_synchCall.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message_synchCall.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Message Async"
- description="Create MessageAsync">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message_asynchCall.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message_asynchCall.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Message Reply"
- description="Create MessageReply">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message_reply.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message_reply.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Message Create"
- description="Create MessageCreate">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message_createMessage.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message_createMessage.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Message Delete"
- description="Create MessageDelete">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message_deleteMessage.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message_deleteMessage.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Message Lost"
- description="Create MessageLost">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Message Found"
- description="Create MessageFound">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Message.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="General Ordering"
- description="Create GeneralOrdering">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/GeneralOrdering.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/GeneralOrdering.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Comment link"
- description="Create a comment link">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Comment.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Comment.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- <tools
- xsi:type="gmftool:CreationTool"
- title="Constraint link"
- description="Create a constraint link">
- <smallIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Constraint.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- <largeIcon
- xsi:type="gmftool:BundleImage"
- path="/icons/full/obj16/Constraint.gif"
- bundle="platform:/plugin/org.eclipse.uml2.uml.edit"/>
- </tools>
- </tools>
- </palette>
-</gmftool:ToolRegistry>
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.trace b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.trace
deleted file mode 100644
index 8dcf7918e8b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/model/sequenceDiagram.trace
+++ /dev/null
@@ -1,221 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<trace:TraceModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:trace="http://www.eclipse.org/gmf/2006/Trace">
- <nodeTraces
- visualID="2001"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Interaction') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Package') and _containmentMF_.name = 'packagedElement')">
- <nodeLabelTraces
- visualID="5001"
- queryText="true"/>
- <compartmentTraces
- visualID="7001"
- queryText="true"/>
- </nodeTraces>
- <childNodeTraces
- visualID="3001"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Lifeline') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Interaction') and _containmentMF_.name = 'lifeline')">
- <nodeLabelTraces
- visualID="5002"
- queryText="true"/>
- </childNodeTraces>
- <childNodeTraces
- visualID="3002"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'InteractionUse') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Interaction') and _containmentMF_.name = 'fragment')">
- <nodeLabelTraces
- visualID="5003"
- queryText="true"/>
- <nodeLabelTraces
- visualID="5004"
- queryText="true"/>
- </childNodeTraces>
- <childNodeTraces
- visualID="3003"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'BehaviorExecutionSpecification') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Interaction') and _containmentMF_.name = 'fragment')"/>
- <childNodeTraces
- visualID="3004"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'CombinedFragment') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Interaction') and _containmentMF_.name = 'fragment')">
- <compartmentTraces
- visualID="7004"
- queryText="true"/>
- </childNodeTraces>
- <childNodeTraces
- visualID="3005"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'InteractionOperand') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'CombinedFragment') and _containmentMF_.name = 'operand')"/>
- <childNodeTraces
- visualID="3006"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'ActionExecutionSpecification') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Interaction') and _containmentMF_.name = 'fragment')"/>
- <childNodeTraces
- visualID="3007"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'ConsiderIgnoreFragment') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Interaction') and _containmentMF_.name = 'fragment')"/>
- <childNodeTraces
- visualID="3008"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Constraint') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Namespace') and _containmentMF_.name = 'ownedRule')">
- <nodeLabelTraces
- visualID="5005"
- queryText="true"/>
- <nodeLabelTraces
- visualID="5012"
- queryText="true"/>
- </childNodeTraces>
- <childNodeTraces
- visualID="3009"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Comment') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Element') and _containmentMF_.name = 'ownedComment')">
- <nodeLabelTraces
- visualID="5006"
- queryText="true"/>
- </childNodeTraces>
- <childNodeTraces
- visualID="3016"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Continuation') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'InteractionOperand') and _containmentMF_.name = 'fragment')">
- <nodeLabelTraces
- visualID="5007"
- queryText="true"/>
- </childNodeTraces>
- <childNodeTraces
- visualID="3017"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'StateInvariant') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Interaction') and _containmentMF_.name = 'fragment')">
- <nodeLabelTraces
- visualID="5008"
- queryText="true"/>
- </childNodeTraces>
- <childNodeTraces
- visualID="3018"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'CombinedFragment') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Interaction') and _containmentMF_.name = 'fragment')"/>
- <childNodeTraces
- visualID="3019"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'TimeConstraint') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Namespace') and _containmentMF_.name = 'ownedRule')">
- <nodeLabelTraces
- visualID="5009"
- queryText="true"/>
- <nodeLabelTraces
- visualID="5013"
- queryText="true"/>
- </childNodeTraces>
- <childNodeTraces
- visualID="3020"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'TimeObservation') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Package') and _containmentMF_.name = 'packagedElement')">
- <nodeLabelTraces
- visualID="5010"
- queryText="true"/>
- <nodeLabelTraces
- visualID="5014"
- queryText="true"/>
- </childNodeTraces>
- <childNodeTraces
- visualID="3021"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'DurationConstraint') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Namespace') and _containmentMF_.name = 'ownedRule')">
- <nodeLabelTraces
- visualID="5011"
- queryText="true"/>
- <nodeLabelTraces
- visualID="5015"
- queryText="true"/>
- </childNodeTraces>
- <childNodeTraces
- visualID="3022"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'DestructionEvent') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Package') and _containmentMF_.name = 'packagedElement')"/>
- <childNodeTraces
- visualID="3023"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'DurationConstraint') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Namespace') and _containmentMF_.name = 'ownedRule')">
- <nodeLabelTraces
- visualID="5018"
- queryText="true"/>
- <nodeLabelTraces
- visualID="5019"
- queryText="true"/>
- </childNodeTraces>
- <childNodeTraces
- visualID="3024"
- queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'DurationObservation') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Package') and _containmentMF_.name = 'packagedElement')">
- <nodeLabelTraces
- visualID="5016"
- queryText="true"/>
- <nodeLabelTraces
- visualID="5017"
- queryText="true"/>
- </childNodeTraces>
- <linkTraces
- visualID="4003"
- queryText="modelFacet.oclIsKindOf(gmfgen::TypeLinkModelFacet) and (let _eClass_:ecore::EClass = modelFacet.oclAsType(gmfgen::TypeLinkModelFacet).metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Message')">
- <linkLabelTraces
- visualID="6001"
- queryText="true"/>
- <linkLabelTraces
- visualID="6008"
- queryText="true"/>
- </linkTraces>
- <linkTraces
- visualID="4004"
- queryText="modelFacet.oclIsKindOf(gmfgen::TypeLinkModelFacet) and (let _eClass_:ecore::EClass = modelFacet.oclAsType(gmfgen::TypeLinkModelFacet).metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Message')">
- <linkLabelTraces
- visualID="6002"
- queryText="true"/>
- <linkLabelTraces
- visualID="6009"
- queryText="true"/>
- </linkTraces>
- <linkTraces
- visualID="4005"
- queryText="modelFacet.oclIsKindOf(gmfgen::TypeLinkModelFacet) and (let _eClass_:ecore::EClass = modelFacet.oclAsType(gmfgen::TypeLinkModelFacet).metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Message')">
- <linkLabelTraces
- visualID="6003"
- queryText="true"/>
- <linkLabelTraces
- visualID="6010"
- queryText="true"/>
- </linkTraces>
- <linkTraces
- visualID="4006"
- queryText="modelFacet.oclIsKindOf(gmfgen::TypeLinkModelFacet) and (let _eClass_:ecore::EClass = modelFacet.oclAsType(gmfgen::TypeLinkModelFacet).metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Message')">
- <linkLabelTraces
- visualID="6004"
- queryText="true"/>
- <linkLabelTraces
- visualID="6011"
- queryText="true"/>
- </linkTraces>
- <linkTraces
- visualID="4007"
- queryText="modelFacet.oclIsKindOf(gmfgen::TypeLinkModelFacet) and (let _eClass_:ecore::EClass = modelFacet.oclAsType(gmfgen::TypeLinkModelFacet).metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Message')">
- <linkLabelTraces
- visualID="6005"
- queryText="true"/>
- <linkLabelTraces
- visualID="6012"
- queryText="true"/>
- </linkTraces>
- <linkTraces
- visualID="4008"
- queryText="modelFacet.oclIsKindOf(gmfgen::TypeLinkModelFacet) and (let _eClass_:ecore::EClass = modelFacet.oclAsType(gmfgen::TypeLinkModelFacet).metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Message')">
- <linkLabelTraces
- visualID="6006"
- queryText="true"/>
- <linkLabelTraces
- visualID="6013"
- queryText="true"/>
- </linkTraces>
- <linkTraces
- visualID="4009"
- queryText="modelFacet.oclIsKindOf(gmfgen::TypeLinkModelFacet) and (let _eClass_:ecore::EClass = modelFacet.oclAsType(gmfgen::TypeLinkModelFacet).metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Message')">
- <linkLabelTraces
- visualID="6007"
- queryText="true"/>
- <linkLabelTraces
- visualID="6014"
- queryText="true"/>
- </linkTraces>
- <linkTraces
- visualID="4010"
- queryText="modelFacet.oclIsKindOf(gmfgen::FeatureLinkModelFacet) and (let _feature_:ecore::EStructuralFeature = modelFacet.oclAsType(gmfgen::FeatureLinkModelFacet).metaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _feature_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Comment') and _feature_.name = 'annotatedElement')"/>
- <linkTraces
- visualID="4011"
- queryText="modelFacet.oclIsKindOf(gmfgen::FeatureLinkModelFacet) and (let _feature_:ecore::EStructuralFeature = modelFacet.oclAsType(gmfgen::FeatureLinkModelFacet).metaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _feature_.eContainingClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'Constraint') and _feature_.name = 'constrainedElement')"/>
- <linkTraces
- visualID="4012"
- queryText="modelFacet.oclIsKindOf(gmfgen::TypeLinkModelFacet) and (let _eClass_:ecore::EClass = modelFacet.oclAsType(gmfgen::TypeLinkModelFacet).metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://www.eclipse.org/uml2/3.0.0/UML' and _eClass_.name = 'GeneralOrdering')">
- <linkLabelTraces
- visualID="6015"
- queryText="true"/>
- </linkTraces>
-</trace:TraceModel>
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/plugin.properties b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/plugin.properties
deleted file mode 100644
index ad0982e1c3c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/plugin.properties
+++ /dev/null
@@ -1,78 +0,0 @@
-#################################################################################
-# Copyright (c) 2010 Atos Origin.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Atos Origin - Initial API and implementation
-##################################################################################
-pluginName=Papyrus Sequence Diagram (Incubation)
-providerName=Eclipse Modeling Project
-
-context.description=UML Diagram Editing
-context.name=In UML Diagram Editor
-
-
-
-navigatorContentName=*.uml_diagram diagram contents
-domainNavigatorContentName=*.uml model contents
-update.diagram.name=Update UML diagram
-update.diagram.description=Perform UML diagram update
-
-
-# Property Sheet
-tab.appearance=Appearance
-tab.diagram=Rulers & Grid
-tab.domain=Core
-
-# Preferences
-prefpage.org.eclipse.uml2.uml.diagram.printing=Printing
-prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid=Rulers And Grid
-
-
-# Providers
-metatype.name.Package_1000=Undefined
-metatype.name.Interaction_2001=Interaction
-
-# Commands and menu actions
-cmdcategory.name=UML Editor Commands
-cmdcategory.desc=UML Editor Commands
-
-metatype.name.Lifeline_3001=Lifeline
-metatype.name.InteractionUse_3002=InteractionUse
-metatype.name.BehaviorExecutionSpecification_3003=BehaviorExecutionSpecification
-metatype.name.ActionExecutionSpecification_3006=ActionExecutionSpecification
-metatype.name.CombinedFragment_3004=CombinedFragment
-metatype.name.InteractionOperand_3005=InteractionOperand
-metatype.name.ConsiderIgnoreFragment_3007=ConsiderIgnoreFragment
-metatype.name.Message_4003=Message
-metatype.name.Message_4004=Message
-metatype.name.Message_4005=Message
-metatype.name.Message_4006=Message
-metatype.name.Message_4007=Message
-metatype.name.Message_4008=Message
-metatype.name.Message_4009=Message
-metatype.name.Constraint_3008=Constraint
-metatype.name.Comment_3009=Comment
-metatype.name.CommentAnnotatedElement_4010=Undefined
-metatype.name.ConstraintConstrainedElement_4011=Undefined
-metatype.name.Continuation_3016=Continuation
-metatype.name.StateInvariant_3017=StateInvariant
-metatype.name.CombinedFragment_3018=CombinedFragment
-metatype.name.TimeConstraint_3019=TimeConstraint
-metatype.name.TimeObservation_3020=TimeObservation
-metatype.name.DurationConstraint_3021=DurationConstraint
-metatype.name.DestructionEvent_3022=DestructionEvent
-metatype.name.DurationConstraint_3023=DurationConstraint
-metatype.name.DurationObservation_3024=DurationObservation
-editorName=PapyrusUMLSequenceDiagram Diagram Editing
-newWizardName=PapyrusUMLSequenceDiagram Diagram
-newWizardDesc=Creates PapyrusUMLSequenceDiagram diagram.
-initDiagramActionLabel=Initialize PapyrusUMLSequence_diagram diagram file
-prefpage.org.eclipse.uml2.uml.diagram.general=UML Diagram
-prefpage.org.eclipse.uml2.uml.diagram.appearance=Appearance
-prefpage.org.eclipse.uml2.uml.diagram.connections=Connections
-metatype.name.GeneralOrdering_4012=GeneralOrdering
-metatype.name.DestructionOccurrenceSpecification_3022=DestructionOccurrenceSpecification
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/plugin.xml b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/plugin.xml
deleted file mode 100644
index 706481d3346..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/plugin.xml
+++ /dev/null
@@ -1,1533 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension point="org.eclipse.papyrus.views.properties.context">
- <context contextModel="model/prop/seq.ctx">
- </context>
- </extension>
- <extension
- point="org.eclipse.papyrus.views.properties.environment">
- <environment
- environmentModel="model/prop/Environment.xmi">
- </environment>
- </extension>
-
- <extension point="org.eclipse.ui.contexts" id="ui-context">
- <?gmfgen generated="true"?>
- <context
- description="%context.description"
- id="org.eclipse.papyrus.uml.diagram.sequence.ui.diagramContext"
- name="%context.name"
- parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
- </context>
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.papyrus.editor.category"
- description="Create a new Sequence Diagram"
- id="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramCommand"
- name="Create a new Sequence Diagram">
- </command>
- </extension>
-
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramCommand">
- <activeWhen>
- <or>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </or>
- </activeWhen>
- </handler>
- </extension>
-
- <extension
- point="org.eclipse.ui.menus">
-
- <menuContribution
- locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar
- id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramCommand"
- icon="icons/obj16/Diagram_Sequence.gif"
- label="Create a new Sequence Diagram"
- style="push"
- tooltip="Create a new Sequence Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution
- locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu
- id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramCommand"
- icon="icons/obj16/Diagram_Sequence.gif"
- label="Create a new Sequence Diagram"
- style="push"
- tooltip="Create a new Sequence Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution
- locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramCommand"
- icon="icons/obj16/Diagram_Sequence.gif"
- label="Create a new Sequence Diagram"
- style="push"
- tooltip="Create a new Sequence Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
-
- </extension>
-
- <extension
- point="org.eclipse.papyrus.infra.core.papyrusDiagram">
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
- contextId="com.cea.papyrus.gmf.editor.context"
- factoryClass="org.eclipse.papyrus.uml.diagram.sequence.SequenceDiagramEditorFactory"
- icon="icons/obj16/Diagram_Sequence.gif">
- </editorDiagram>
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramCommand"
- creationCondition="org.eclipse.papyrus.uml.diagram.sequence.SequenceDiagramCreationCondition"
- icon="icons/obj16/Diagram_Sequence.gif"
- id="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramCommand"
- label="UML Sequence Diagram"
- language="uml">
- </creationCommand>
- </extension>
-
-
-
-
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
- <?gmfgen generated="true"?>
- <propertyContributor
- contributorId="org.eclipse.papyrus.uml.diagram.sequence"
- labelProvider="org.eclipse.papyrus.uml.diagram.sequence.sheet.UMLSheetLabelProvider">
- <propertyCategory category="domain"/>
- <propertyCategory category="visual"/>
- <propertyCategory category="extra"/>
- </propertyContributor>
- </extension>
-
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
- <?gmfgen generated="true"?>
- <propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.sequence">
- <propertyTab
- category="visual"
- id="property.tab.AppearancePropertySection"
- label="%tab.appearance"/>
- <propertyTab
- category="visual"
- id="property.tab.DiagramPropertySection"
- label="%tab.diagram"/>
- <propertyTab
- category="domain"
- id="property.tab.domain"
- label="%tab.domain"/>
- </propertyTabs>
- </extension>
-
- <extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
- <?gmfgen generated="true"?>
- <propertySections contributorId="org.eclipse.papyrus.uml.diagram.sequence">
- <propertySection id="property.section.ConnectorAppearancePropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.ShapeColorAndFontPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.RulerGridPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
- tab="property.tab.DiagramPropertySection">
- </propertySection>
- <propertySection
- id="property.section.domain"
- tab="property.tab.domain"
- class="org.eclipse.papyrus.uml.diagram.sequence.sheet.UMLPropertySection">
- <input type="org.eclipse.gmf.runtime.notation.View"/>
- <input type="org.eclipse.gef.EditPart"/>
- <input type="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLAbstractNavigatorItem"/>
- </propertySection>
- </propertySections>
- </extension>
-
-
-<?gmfgen generated="true"?>
-
- <extension point="org.eclipse.core.runtime.preferences">
- <?gmfgen generated="true"?>
- <initializer class="org.eclipse.papyrus.uml.diagram.sequence.preferences.DiagramPreferenceInitializer"/>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
- <?gmfgen generated="true"?>
- <viewProvider class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLViewProvider">
- <Priority name="Lowest"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLSequenceDiagram"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2001,3007,3004,3005,3002,3016,3001,3006,3003,3017,3018,3019,3020,3021,3022,3008,3009,3023,3024"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4003,4004,4005,4006,4007,4008,4009,4010,4011,4012"/>
- </viewProvider>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
- <?gmfgen generated="true"?>
- <editpartProvider class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLEditPartProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
- <method name="getType()" value="PapyrusUMLSequenceDiagram"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
- <method name="getType()" value="2001,3007,3004,3005,3002,3016,3001,3006,3003,3017,3018,3019,3020,3021,3022,3008,3009,3023,3024"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
- <method name="getType()" value="4003,4004,4005,4006,4007,4008,4009,4010,4011,4012"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
- <method name="getType()" value="5001,5003,5004,5007,5002,5008,5009,5013,5010,5014,5011,5015,5005,5012,5006,5018,5019,5016,5017"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
- <method name="getType()" value="7001,7004"/>
- </object>
- <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
- </editpartProvider>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders" id="modelassist-provider">
- <?gmfgen generated="true"?>
- <modelingAssistantProvider class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLModelingAssistantProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart" id="Package_1000"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart" id="Interaction_2001"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart" id="ConsiderIgnoreFragment_3007"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart" id="CombinedFragment_3004"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart" id="InteractionOperand_3005"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart" id="InteractionUse_3002"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart" id="Continuation_3016"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart" id="Lifeline_3001"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart" id="ActionExecutionSpecification_3006"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart" id="BehaviorExecutionSpecification_3003"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart" id="StateInvariant_3017"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart" id="CombinedFragment_3018"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart" id="TimeConstraint_3019"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart" id="TimeObservation_3020"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart" id="DurationConstraint_3021"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart" id="DestructionOccurrenceSpecification_3022"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart" id="Constraint_3008"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart" id="Comment_3009"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart" id="DurationConstraint_3023"/>
- <object class="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart" id="DurationObservation_3024"/>
- <context elements="Package_1000,Interaction_2001,ConsiderIgnoreFragment_3007,CombinedFragment_3004,InteractionOperand_3005,InteractionUse_3002,Continuation_3016,Lifeline_3001,ActionExecutionSpecification_3006,BehaviorExecutionSpecification_3003,StateInvariant_3017,CombinedFragment_3018,TimeConstraint_3019,TimeObservation_3020,DurationConstraint_3021,DestructionOccurrenceSpecification_3022,Constraint_3008,Comment_3009,DurationConstraint_3023,DurationObservation_3024"/>
- </modelingAssistantProvider>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
- <?gmfgen generated="true"?>
- <IconProvider class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLIconProvider">
- <Priority name="Low"/>
- </IconProvider>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
- <?gmfgen generated="true"?>
- <ParserProvider class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider">
- <Priority name="Lowest"/>
- </ParserProvider>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
- <?gmfgen generated="true"?>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.Package_1000"
- name="%metatype.name.Package_1000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Package"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.PackageEditHelper">
- <param name="semanticHint" value="1000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.Interaction_2001"
- name="%metatype.name.Interaction_2001"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Interaction"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.InteractionEditHelper">
- <param name="semanticHint" value="2001"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.ConsiderIgnoreFragment_3007"
- name="%metatype.name.ConsiderIgnoreFragment_3007"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ConsiderIgnoreFragment"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.ConsiderIgnoreFragmentEditHelper">
- <param name="semanticHint" value="3007"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_3004"
- name="%metatype.name.CombinedFragment_3004"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="CombinedFragment"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.CombinedFragmentEditHelper">
- <param name="semanticHint" value="3004"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.InteractionOperand_3005"
- name="%metatype.name.InteractionOperand_3005"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InteractionOperand"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.InteractionOperandEditHelper">
- <param name="semanticHint" value="3005"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.InteractionUse_3002"
- name="%metatype.name.InteractionUse_3002"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InteractionUse"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.InteractionUseEditHelper">
- <param name="semanticHint" value="3002"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.Continuation_3016"
- name="%metatype.name.Continuation_3016"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Continuation"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.ContinuationEditHelper">
- <param name="semanticHint" value="3016"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.Lifeline_3001"
- name="%metatype.name.Lifeline_3001"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Lifeline"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.LifelineEditHelper">
- <param name="semanticHint" value="3001"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.ActionExecutionSpecification_3006"
- name="%metatype.name.ActionExecutionSpecification_3006"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ActionExecutionSpecification"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.ActionExecutionSpecificationEditHelper">
- <param name="semanticHint" value="3006"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.BehaviorExecutionSpecification_3003"
- name="%metatype.name.BehaviorExecutionSpecification_3003"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="BehaviorExecutionSpecification"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.BehaviorExecutionSpecificationEditHelper">
- <param name="semanticHint" value="3003"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.StateInvariant_3017"
- name="%metatype.name.StateInvariant_3017"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="StateInvariant"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.StateInvariantEditHelper">
- <param name="semanticHint" value="3017"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_3018"
- name="%metatype.name.CombinedFragment_3018"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_3004"/>
- <param name="semanticHint" value="3018"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.TimeConstraint_3019"
- name="%metatype.name.TimeConstraint_3019"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TimeConstraint"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.TimeConstraintEditHelper">
- <param name="semanticHint" value="3019"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.TimeObservation_3020"
- name="%metatype.name.TimeObservation_3020"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TimeObservation"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.TimeObservationEditHelper">
- <param name="semanticHint" value="3020"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_3021"
- name="%metatype.name.DurationConstraint_3021"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="DurationConstraint"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.DurationConstraintEditHelper">
- <param name="semanticHint" value="3021"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.DestructionOccurrenceSpecification_3022"
- name="%metatype.name.DestructionOccurrenceSpecification_3022"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="DestructionOccurrenceSpecification"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.DestructionEventEditHelper">
- <param name="semanticHint" value="3022"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.Constraint_3008"
- name="%metatype.name.Constraint_3008"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Constraint"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.ConstraintEditHelper">
- <param name="semanticHint" value="3008"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.Comment_3009"
- name="%metatype.name.Comment_3009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Comment"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.CommentEditHelper">
- <param name="semanticHint" value="3009"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_3023"
- name="%metatype.name.DurationConstraint_3023"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_3021"/>
- <param name="semanticHint" value="3023"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.DurationObservation_3024"
- name="%metatype.name.DurationObservation_3024"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="DurationObservation"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.DurationObservationEditHelper">
- <param name="semanticHint" value="3024"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_4003"
- name="%metatype.name.Message_4003"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Message"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.MessageEditHelper">
- <param name="semanticHint" value="4003"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_4004"
- name="%metatype.name.Message_4004"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_4003"/>
- <param name="semanticHint" value="4004"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_4005"
- name="%metatype.name.Message_4005"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_4003"/>
- <param name="semanticHint" value="4005"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_4006"
- name="%metatype.name.Message_4006"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_4003"/>
- <param name="semanticHint" value="4006"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_4007"
- name="%metatype.name.Message_4007"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_4003"/>
- <param name="semanticHint" value="4007"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_4008"
- name="%metatype.name.Message_4008"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_4003"/>
- <param name="semanticHint" value="4008"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.Message_4009"
- name="%metatype.name.Message_4009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.sequence.Message_4003"/>
- <param name="semanticHint" value="4009"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.CommentAnnotatedElement_4010"
- name="%metatype.name.CommentAnnotatedElement_4010"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4010"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.sequence.ConstraintConstrainedElement_4011"
- name="%metatype.name.ConstraintConstrainedElement_4011"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4011"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.sequence.GeneralOrdering_4012"
- name="%metatype.name.GeneralOrdering_4012"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="GeneralOrdering"
- edithelper="org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.GeneralOrderingEditHelper">
- <param name="semanticHint" value="4012"/>
- </metamodelType>
- </metamodel>
- </extension>
-
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
- <?gmfgen generated="true"?>
- <clientContext id="org.eclipse.papyrus.uml.diagram.sequence.TypeContext">
- <enablement>
- <test
- property="org.eclipse.gmf.runtime.emf.core.editingDomain"
- value="org.eclipse.papyrus.uml.diagram.sequence.EditingDomain"/>
- </enablement>
- </clientContext>
- <binding context="org.eclipse.papyrus.uml.diagram.sequence.TypeContext">
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Package_1000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Interaction_2001"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.ConsiderIgnoreFragment_3007"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_3004"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.InteractionOperand_3005"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.InteractionUse_3002"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Continuation_3016"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Lifeline_3001"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.ActionExecutionSpecification_3006"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.BehaviorExecutionSpecification_3003"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.StateInvariant_3017"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_3018"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.TimeConstraint_3019"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.TimeObservation_3020"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_3021"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.DestructionOccurrenceSpecification_3022"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Constraint_3008"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Comment_3009"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_3023"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.DurationObservation_3024"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Message_4003"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Message_4004"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Message_4005"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Message_4006"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Message_4007"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Message_4008"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.Message_4009"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.CommentAnnotatedElement_4010"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.ConstraintConstrainedElement_4011"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.sequence.GeneralOrdering_4012"/>
- <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
- </binding>
- </extension>
- <extension point="org.eclipse.core.expressions.propertyTesters" id="navigator-proptest.isURIEditorInput">
- <?gmfgen generated="true"?>
- <propertyTester
- id="org.eclipse.papyrus.uml.diagram.sequence.URIEditorInputPropertyTester"
- type="org.eclipse.emf.common.ui.URIEditorInput"
- namespace="org.eclipse.papyrus.uml.diagram.sequence"
- properties="isURIEditorInput"
- class="org.eclipse.papyrus.uml.diagram.sequence.part.UMLUriEditorInputTester">
- </propertyTester>
- </extension>
-
- <extension point="org.eclipse.ui.navigator.viewer" id="navigator-viewbinding">
- <?gmfgen generated="true"?>
- <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.sequence.resourceContent"/>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.sequence.domainResourceContent"/>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.sequence.navigatorLinkHelper"/>
- </includes>
- </viewerContentBinding>
- <viewerActionBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <actionExtension pattern="org.eclipse.papyrus.uml.diagram.sequence.navigatorActionProvider"/>
- </includes>
- </viewerActionBinding>
- </extension>
-
- <extension point="org.eclipse.ui.navigator.navigatorContent" id="navigator-content">
- <?gmfgen generated="true"?>
- <navigatorContent
- id="org.eclipse.papyrus.uml.diagram.sequence.resourceContent"
- name="%navigatorContentName"
- priority="normal"
- contentProvider="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorContentProvider"
- labelProvider="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorLabelProvider"
- icon="icons/obj16/UMLDiagramFile.gif"
- activeByDefault="true">
- <triggerPoints>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLSequence_diagram"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <or>
- <instanceof value="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </possibleChildren>
- <commonSorter
- id="org.eclipse.papyrus.uml.diagram.sequence.navigatorSorter"
- class="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorSorter">
- <parentExpression>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLSequence_diagram"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </parentExpression>
- </commonSorter>
- </navigatorContent>
- <navigatorContent
- id="org.eclipse.papyrus.uml.diagram.sequence.domainResourceContent"
- name="%domainNavigatorContentName"
- priority="normal"
- contentProvider="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLDomainNavigatorContentProvider"
- labelProvider="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLDomainNavigatorLabelProvider"
- icon="icons/obj16/UMLDiagramFile.gif"
- activeByDefault="true">
- <triggerPoints>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLSequence"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLDomainNavigatorItem"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <instanceof value="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLDomainNavigatorItem"/>
- </possibleChildren>
- </navigatorContent>
- <actionProvider
- id="org.eclipse.papyrus.uml.diagram.sequence.navigatorActionProvider"
- class="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorActionProvider">
- <enablement>
- <or>
- <instanceof value="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </enablement>
- </actionProvider>
- </extension>
-
- <extension point="org.eclipse.ui.navigator.linkHelper" id="navigator-linkhelper">
- <?gmfgen generated="true"?>
- <linkHelper
- id="org.eclipse.papyrus.uml.diagram.sequence.navigatorLinkHelper"
- class="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorLinkHelper">
- <editorInputEnablement>
- <and>
- <instanceof value="org.eclipse.emf.common.ui.URIEditorInput"/>
- <test property="org.eclipse.papyrus.uml.diagram.sequence.isURIEditorInput"/>
- </and>
- </editorInputEnablement>
- <selectionEnablement>
- <instanceof value="org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLAbstractNavigatorItem"/>
- </selectionEnablement>
- </linkHelper>
- </extension>
- <extension point="org.eclipse.ui.commands" id="update-cmd">
- <?gmfgen generated="true"?>
- <command
- categoryId="org.eclipse.ui.category.edit"
- defaultHandler="org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramUpdateCommand"
- description="%update.diagram.description"
- id="org.eclipse.papyrus.uml.diagram.sequence.updateDiagram"
- name="%update.diagram.name"/>
- </extension>
-
- <extension point="org.eclipse.ui.bindings" id="update-cmd-binding">
- <?gmfgen generated="true"?>
- <key
- commandId="org.eclipse.papyrus.uml.diagram.sequence.updateDiagram"
- contextId="org.eclipse.papyrus.uml.diagram.sequence.ui.diagramContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="F5"/>
- </extension>
-
- <extension point="org.eclipse.ui.menus" id="context-menus">
- <?gmfgen generated="true"?>
- <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
- </menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
- </menuContribution -->
- <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
- <command commandId="org.eclipse.papyrus.uml.diagram.sequence.LoadResourceAction">
- <visibleWhen>
- <and>
- <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorID"/></with>
- <with variable="selection"><iterate ifEmpty="false">
- <instanceof value="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart"/>
- </iterate></with>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
-
- <extension point="org.eclipse.ui.commands" id="menu-commands">
- <?gmfgen generated="true"?>
- <category id="org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
- <command id="org.eclipse.papyrus.uml.diagram.sequence.LoadResourceAction"
- name="Load Resource"
- categoryId="org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorID"
- defaultHandler="org.eclipse.papyrus.uml.diagram.sequence.part.LoadResourceAction"/>
- </extension>
-
- <extension point="org.eclipse.ui.handlers" id="menu-handlers">
- <?gmfgen generated="true"?>
- </extension>
-
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
- <?gmfgen generated="true"?>
- <page
- id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- name="PapyrusUMLSequenceDiagram Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.DiagramGeneralPreferencePage">
- </page>
-
-
-
- <page
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.DiagramPrintingPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.DiagramPrintingPreferencePage">
- </page>
-
- <page
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.DiagramRulersAndGridPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.DiagramRulersAndGridPreferencePage">
- </page>
-
- </extension>
-
-<extension point="org.eclipse.ui.preferencePages">
-
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.InteractionPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.InteractionPreferencePage"
- name="Interaction Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.TimeConstraintPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.TimeConstraintPreferencePage"
- name="TimeConstraint Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.TimeObservationPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.TimeObservationPreferencePage"
- name="TimeObservation Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.CommentPreferencePage"
- name="Comment Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.ConstraintPreferencePage"
- name="Constraint Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.LifelinePreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.LifelinePreferencePage"
- name="Lifeline Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.InteractionUsePreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.InteractionUsePreferencePage"
- name="InteractionUse Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.CombinedFragmentPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.CombinedFragmentPreferencePage"
- name="CombinedFragment Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.DurationConstraintPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.DurationConstraintPreferencePage"
- name="DurationConstraint Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.BehaviorExecutionSpecificationPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.BehaviorExecutionSpecificationPreferencePage"
- name="BehaviorExecutionSpecification Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.DurationObservationPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.DurationObservationPreferencePage"
- name="DurationObservation Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.ActionExecutionSpecificationPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.ActionExecutionSpecificationPreferencePage"
- name="ActionExecutionSpecification Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.InteractionOperandPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.InteractionOperandPreferencePage"
- name="InteractionOperand Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.ContinuationPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.ContinuationPreferencePage"
- name="Continuation Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.StateInvariantPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.StateInvariantPreferencePage"
- name="StateInvariant Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.DestructionOccurrenceSpecificationPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.DestructionOccurrenceSpecificationPreferencePage"
- name="DestructionOccurrenceSpecification Node" />
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.ConsiderIgnoreFragmentPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.ConsiderIgnoreFragmentPreferencePage"
- name="ConsiderIgnoreFragment Node" />
-
-
-
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.MessagePreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.MessagePreferencePage"
- name="Message Link" />
-
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLSequenceDiagram"
- class="org.eclipse.papyrus.uml.diagram.sequence.preferences.GeneralOrderingPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.sequence.preferences.GeneralOrderingPreferencePage"
- name="GeneralOrdering Link" />
-
-
-
-
-</extension>
-<extension
- id="UML Plugin.palettedefinition"
- name="UML Plugin Predefined Entries"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Lowest"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.sequence.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
- <entry
- defineOnly="true"
- description="Create a Lifeline"
- id="createLifeline1CreationTool"
- kind="tool"
- label="Lifeline"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an Action Execution Specification"
- id="createActionExecutionSpecification2CreationTool"
- kind="tool"
- label="Action Execution Specification"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActionExecutionSpecification.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActionExecutionSpecification.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an BehaviorExecutionSpecification"
- id="createBehaviorExecutionSpecification3CreationTool"
- kind="tool"
- label=" Behavior Execution Specification"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/BehaviorExecutionSpecification.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/BehaviorExecutionSpecification.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create InteractionUse"
- id="createInteractionUse4CreationTool"
- kind="tool"
- label="InteractionUse"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionUse.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Combined Fragment"
- id="createCombinedFragment5CreationTool"
- kind="tool"
- label="Combined Fragment"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif">
- </entry>
- <!-- add -->
- <entry
- defineOnly="true"
- description="Create Consider Ignore Fragment"
- id="createConsiderIgnoreFragment5CreationTool"
- kind="tool"
- label="Consider Ignore Fragment"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConsiderIgnoreFragment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConsiderIgnoreFragment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Interaction Operand"
- id="createInteractionOperand6CreationTool"
- kind="tool"
- label="Interaction Operand"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionOperand.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionOperand.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Continuation"
- id="createContinuation7CreationTool"
- kind="tool"
- label="Continuation"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Continuation.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Continuation.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create StateInvariant"
- id="createStateInvariant8CreationTool"
- kind="tool"
- label="StateInvariant"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateInvariant.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StateInvariant.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a comment"
- id="createComment9CreationTool"
- kind="tool"
- label="Comment"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a constraint"
- id="createConstraint10CreationTool"
- kind="tool"
- label="Constraint"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a CoRegion"
- id="createCoRegion11CreationTool"
- kind="tool"
- label="CoRegion"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CombinedFragment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Duration Observation on a Message"
- id="createDurationObservation12CreationTool"
- kind="tool"
- label="Duration Observation"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Time Constraint"
- id="createTimeConstraint13CreationTool"
- kind="tool"
- label="Time Constraint"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Time Observation"
- id="createTimeObservation14CreationTool"
- kind="tool"
- label="Time Observation"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Duration Constraint"
- id="createDurationConstraint15CreationTool"
- kind="tool"
- label="Duration Constraint"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Destruction Event"
- id="createDestructionEvent16CreationTool"
- kind="tool"
- label="Destruction Event"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestroyObjectAction.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestroyObjectAction.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create MessageSync"
- id="createMessageSync1CreationTool"
- kind="tool"
- label="Message Sync"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_synchCall.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_synchCall.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create MessageAsync"
- id="createMessageAsync2CreationTool"
- kind="tool"
- label="Message Async"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_asynchCall.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_asynchCall.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create MessageReply"
- id="createMessageReply3CreationTool"
- kind="tool"
- label="Message Reply"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_reply.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_reply.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create MessageCreate"
- id="createMessageCreate4CreationTool"
- kind="tool"
- label="Message Create"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create MessageDelete"
- id="createMessageDelete5CreationTool"
- kind="tool"
- label="Message Delete"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_deleteMessage.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_deleteMessage.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create MessageLost"
- id="createMessageLost6CreationTool"
- kind="tool"
- label="Message Lost"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create MessageFound"
- id="createMessageFound7CreationTool"
- kind="tool"
- label="Message Found"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create GeneralOrdering"
- id="createGeneralOrdering8CreationTool"
- kind="tool"
- label="General Ordering"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralOrdering.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralOrdering.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a comment link"
- id="createCommentlink9CreationTool"
- kind="tool"
- label="Comment link"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a constraint link"
- id="createConstraintlink10CreationTool"
- kind="tool"
- label="Constraint link"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
- </entry>
- <?gmfgen generated="false"?>
- <entry
- defineOnly="true"
- description="Create an Observation Link"
- id="createObservationLinkCreationTool"
- kind="tool"
- label="Observation Link"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message.gif">
- </entry>
-
- </contribution>
- </paletteProvider>
-
- </extension>
-
-<extension
- id="UML Plugin.standard"
- name="UML Plugin Standard Palette"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Low"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.sequence.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
- <entry
- description=""
- id="createNodes1Group"
- kind="drawer"
- label="Nodes"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
-
- <predefinedEntry
- id="createLifeline1CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createActionExecutionSpecification2CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createBehaviorExecutionSpecification3CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createInteractionUse4CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createCombinedFragment5CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <!-- add -->
- <predefinedEntry
- id="createConsiderIgnoreFragment5CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
-
- <predefinedEntry
- id="createInteractionOperand6CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createContinuation7CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createStateInvariant8CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createComment9CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createConstraint10CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createCoRegion11CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createDurationObservation12CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createTimeConstraint13CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createTimeObservation14CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createDurationConstraint15CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
- <predefinedEntry
- id="createDestructionEvent16CreationTool"
- path="/createNodes1Group">
- </predefinedEntry>
-
- <entry
- description="Message tools"
- id="createEdges2Group"
- kind="drawer"
- label="Edges"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
-
- <predefinedEntry
- id="createMessageSync1CreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- <predefinedEntry
- id="createMessageAsync2CreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- <predefinedEntry
- id="createMessageReply3CreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- <predefinedEntry
- id="createMessageCreate4CreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- <predefinedEntry
- id="createMessageDelete5CreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- <predefinedEntry
- id="createMessageLost6CreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- <predefinedEntry
- id="createMessageFound7CreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- <predefinedEntry
- id="createGeneralOrdering8CreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- <?gmfgen generated="false"?>
- <predefinedEntry
- id="createObservationLinkCreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- <predefinedEntry
- id="createCommentlink9CreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- <predefinedEntry
- id="createConstraintlink10CreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
-
-
- </contribution>
- <editor id="org.eclipse.papyrus.uml.diagram.sequence"/>
- </paletteProvider>
-
- </extension>
-
-
-<extension
- point="org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders">
- <modelingAssistantProvider
- class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLModelingAssistantProvider">
- <Priority
- name="Lowest">
- </Priority>
- </modelingAssistantProvider>
-</extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
- <?gmfgen generated="true"?>
- <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLMarkerNavigationProvider">
- <MarkerType name="org.eclipse.papyrus.uml.diagram.sequence.diagnostic"/>
- <Priority name="Lowest"/>
- </MarkerNavigationProvider>
- </extension>
-
-<extension id="diagnostic" name="UML Plugin problems" point="org.eclipse.core.resources.markers">
- <?gmfgen generated="true"?>
- <super type="org.eclipse.core.resources.problemmarker"/>
- <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
- <persistent value="true"/>
- </extension>
- <extension point="org.eclipse.emf.validation.constraintProviders">
- <?gmfgen generated="false"?>
- <category id="org.eclipse.uml2.uml.util.UMLValidator.validate" mandatory="false" name="validateUMLModel">
- <![CDATA[Validate the UML model]]>
- </category>
- <category id="org.eclipse.uml2.uml.util.UMLValidator.validate/org.eclipse.papyrus.uml.diagram.sequence.validation.FragmentOrderingKeeper" mandatory="false" name="fragmentsOrder">
- <![CDATA[Fragments order]]>
- </category>
- <constraintProvider cache="true">
- <package namespaceUri="http://www.eclipse.org/uml2/3.0.0/UML"/>
- <package namespaceUri="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
- <constraints categories="org.eclipse.uml2.uml.util.UMLValidator.validate">
- </constraints>
- <constraints categories="org.eclipse.uml2.uml.util.UMLValidator.validate/org.eclipse.papyrus.uml.diagram.sequence.validation.FragmentOrderingKeeper">
- <constraint id="FragmentOrderingKeeper.Interaction"
- lang="Java" class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLValidationProvider$Adapter1"
- name="Interaction fragment ordering"
- mode="Live"
- severity="ERROR" statusCode="200">
-
- <description><![CDATA[The fragment property of an Interaction must be ordered as a valid trace.]]></description>
- <message><![CDATA[There is no valid trace sequencing the InteractionFragments in the fragment property. Some of them can not be organized as a valid sequence :{0}]]></message>
- <target class="uml.Interaction"/>
- </constraint>
- <constraint id="FragmentOrderingKeeper.InteractionOperand"
- lang="Java" class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLValidationProvider$Adapter2"
- name="InteractionOperand fragment ordering"
- mode="Live"
- severity="ERROR" statusCode="200">
-
- <description><![CDATA[The fragment property of an InteractionOperand must be ordered as a valid trace.]]></description>
- <message><![CDATA[There is no valid trace sequencing the InteractionFragments in the fragment property. Some of them can not be organized as a valid sequence :{0}]]></message>
- <target class="uml.InteractionOperand"/>
- </constraint>
- <constraint id="FragmentOrderingKeeper.LifelineFigure"
- lang="Java" class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLValidationProvider$Adapter3"
- name="Fragment ordering"
- mode="Live"
- severity="ERROR" statusCode="200">
-
- <description><![CDATA[The fragment property of an Interaction or InteractionOperand must be ordered as a valid trace.]]></description>
- <message><![CDATA[There is no valid trace sequencing the InteractionFragments in the fragment property. Some of them can not be organized as a valid sequence :{0}]]></message>
- <?use View and Bounds to detect moves?>
- <target class="notation.View"/>
- <target class="notation.Bounds"/>
- </constraint>
- </constraints>
- </constraintProvider>
- </extension>
-
-<extension point="org.eclipse.emf.validation.constraintBindings">
- <?gmfgen generated="true"?>
- <clientContext default="false" id="org.eclipse.papyrus.uml.diagram.sequenceDefaultCtx">
- <selector class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLValidationProvider$DefaultCtx"/>
- </clientContext>
- <binding context="org.eclipse.papyrus.uml.diagram.sequenceDefaultCtx">
- <constraint ref="org.eclipse.papyrus.uml.diagram.sequence.FragmentOrderingKeeper.Interaction"/>
- <constraint ref="org.eclipse.papyrus.uml.diagram.sequence.FragmentOrderingKeeper.InteractionOperand"/>
- </binding>
-
- <clientContext default="false" id="org.eclipse.papyrus.uml.diagram.sequenceCtx_3001">
- <selector class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLValidationProvider$Ctx_3001"/>
- </clientContext>
- <binding context="org.eclipse.papyrus.uml.diagram.sequenceCtx_3001">
- <constraint ref="org.eclipse.papyrus.uml.diagram.sequence.FragmentOrderingKeeper.LifelineFigure"/>
- </binding>
-
- </extension>
-<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
- <?gmfgen generated="true"?>
- <decoratorProvider class="org.eclipse.papyrus.uml.diagram.sequence.providers.UMLValidationDecoratorProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
- <context decoratorTargets="PRIMARY_VIEW"/>
- </decoratorProvider>
- </extension>
-
-<extension point="org.eclipse.emf.validation.ui.UIRegisteredClientContext">
- <?gmfgen generated="true"?>
- <clientContext id="org.eclipse.papyrus.uml.diagram.sequenceDefaultCtx"/>
- <clientContext id="org.eclipse.papyrus.uml.diagram.sequenceCtx_3001"/>
- </extension>
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.uml.diagram.sequence.providers.CustomEditPolicyProvider">
- <Priority
- name="Lowest">
- </Priority>
- </editpolicyProvider>
-</extension>
-
-
-
-
-
-
- <!-- optionally, specify keybindings -->
-</plugin>
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/Activator.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/Activator.java
deleted file mode 100644
index af8fc74988e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/Activator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.sequence";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext )
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext )
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java
deleted file mode 100644
index 303f8f980f4..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class ActionExecutionSpecificationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static ActionExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActionExecutionSpecificationCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- return true;
-
- }
-
- /**
- * To add the lifeline to the attribute covered of the AES
- *
- * @generated NOT
- */
- @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);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ActionExecutionSpecification newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java
deleted file mode 100644
index 3e0646b47f5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class BehaviorExecutionSpecificationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public BehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static BehaviorExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new BehaviorExecutionSpecificationCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public BehaviorExecutionSpecificationCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- return true;
-
- }
-
- /**
- * To add the lifeline to the attribute covered of the AES
- *
- * @generated NOT
- */
- @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);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(BehaviorExecutionSpecification newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java
deleted file mode 100644
index c6055446d62..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class CombinedFragment2CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public CombinedFragment2CreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static CombinedFragment2CreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CombinedFragment2CreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public CombinedFragment2CreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
-
- return true;
-
- }
-
- /**
- * Create a CoRegion :
- * - creates two operands
- * - set the Interaction Operator to parallel
- *
- * @generated NOT
- */
- 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("");
-
- }
-
- /**
- * @generated
- */
- protected void doConfigure(CombinedFragment newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java
deleted file mode 100644
index a82cac8cb4e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import 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.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class CombinedFragmentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public CombinedFragmentCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static CombinedFragmentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CombinedFragmentCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public CombinedFragmentCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
- *
- * @generated NOT
- */
- public boolean canExecute() {
- return getElementToEdit() instanceof Interaction || getElementToEdit() instanceof InteractionOperand;
- }
-
- /**
- * Handle creation on InteractionOperand
- *
- * @generated NOT
- */
- @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_3004(newElement);
-
- Set<InteractionFragment> coveredInteractionFragments = (Set<InteractionFragment>)getRequest().getParameters().get(SequenceRequestConstant.COVERED_INTERACTIONFRAGMENTS);
-
- InteractionOperandCreateCommand.createInteractionOperand(newElement, coveredInteractionFragments);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(CombinedFragment newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementCreateCommand.java
deleted file mode 100644
index cbe70f29b36..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementCreateCommand.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Element;
-
-/**
- * @generated
- */
-public class CommentAnnotatedElementCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- public CommentAnnotatedElementCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if(source == null && target == null) {
- return false;
- }
- if(source != null && false == source instanceof Comment) {
- return false;
- }
- if(target != null && false == target instanceof Element) {
- return false;
- }
- if(getSource() == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- // target may be null here but it's possible to check constraint
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateCommentAnnotatedElement_4010(getSource(), getTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
-
- if(getSource() != null && getTarget() != null) {
- getSource().getAnnotatedElements().add(getTarget());
- }
- return CommandResult.newOKCommandResult();
-
- }
-
- /**
- * @generated
- */
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Comment getSource() {
- return (Comment)source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element)target;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementReorientCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementReorientCommand.java
deleted file mode 100644
index 742e89bf1c2..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentAnnotatedElementReorientCommand.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEndEditPart.MessageEndHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.MessageEnd;
-
-/**
- * @generated
- */
-public class CommentAnnotatedElementReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject referenceOwner;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public CommentAnnotatedElementReorientCommand(ReorientReferenceRelationshipRequest request) {
- super(request.getLabel(), null, request);
- reorientDirection = request.getDirection();
- referenceOwner = request.getReferenceOwner();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if(false == referenceOwner instanceof Comment) {
- return false;
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if(!(oldEnd instanceof Element && newEnd instanceof Comment)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistCommentAnnotatedElement_4010(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistCommentAnnotatedElement_4010(getOldSource(), getNewTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- getOldSource().getAnnotatedElements().remove(getOldTarget());
- getNewSource().getAnnotatedElements().add(getOldTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated NOT
- */
- 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(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected Comment getOldSource() {
- return (Comment)referenceOwner;
- }
-
- /**
- * @generated
- */
- protected Comment getNewSource() {
- return (Comment)newEnd;
- }
-
- /**
- * @generated
- */
- protected Element getOldTarget() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewTarget() {
- return (Element)newEnd;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java
deleted file mode 100644
index d08b4f484f0..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class CommentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public CommentCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static CommentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public CommentCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
-
- return true;
-
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Comment newElement = UMLFactory.eINSTANCE.createComment();
-
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
-
- ElementInitializers.getInstance().init_Comment_3009(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Comment newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java
deleted file mode 100644
index c421658987b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import 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.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class ConsiderIgnoreFragmentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static ConsiderIgnoreFragmentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConsiderIgnoreFragmentCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public ConsiderIgnoreFragmentCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
- *
- * @generated NOT
- */
- public boolean canExecute() {
- return getElementToEdit() instanceof Interaction || getElementToEdit() instanceof InteractionOperand;
- }
-
- /**
- * Handle creation on InteractionOperand
- *
- * @generated NOT
- */
- @SuppressWarnings("unchecked")
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- ConsiderIgnoreFragment newElement = UMLFactory.eINSTANCE.createConsiderIgnoreFragment();
-
- ElementInitializers.getInstance().init_ConsiderIgnoreFragment_3007(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);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ConsiderIgnoreFragment newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementCreateCommand.java
deleted file mode 100644
index f8fcc68e626..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementCreateCommand.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Element;
-
-/**
- * @generated
- */
-public class ConstraintConstrainedElementCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- public ConstraintConstrainedElementCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if(source == null && target == null) {
- return false;
- }
- if(source != null && false == source instanceof Constraint) {
- return false;
- }
- if(target != null && false == target instanceof Element) {
- return false;
- }
- if(getSource() == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- // target may be null here but it's possible to check constraint
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateConstraintConstrainedElement_4011(getSource(), getTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
-
- if(getSource() != null && getTarget() != null) {
- getSource().getConstrainedElements().add(getTarget());
- }
- return CommandResult.newOKCommandResult();
-
- }
-
- /**
- * @generated
- */
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Constraint getSource() {
- return (Constraint)source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element)target;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementReorientCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementReorientCommand.java
deleted file mode 100644
index 7635cdd103f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintConstrainedElementReorientCommand.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEndEditPart.MessageEndHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.MessageEnd;
-
-/**
- * @generated
- */
-public class ConstraintConstrainedElementReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject referenceOwner;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public ConstraintConstrainedElementReorientCommand(ReorientReferenceRelationshipRequest request) {
- super(request.getLabel(), null, request);
- reorientDirection = request.getDirection();
- referenceOwner = request.getReferenceOwner();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if(false == referenceOwner instanceof Constraint) {
- return false;
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if(!(oldEnd instanceof Element && newEnd instanceof Constraint)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraintConstrainedElement_4011(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraintConstrainedElement_4011(getOldSource(), getNewTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- getOldSource().getConstrainedElements().remove(getOldTarget());
- getNewSource().getConstrainedElements().add(getOldTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated NOT
- */
- 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(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected Constraint getOldSource() {
- return (Constraint)referenceOwner;
- }
-
- /**
- * @generated
- */
- protected Constraint getNewSource() {
- return (Constraint)newEnd;
- }
-
- /**
- * @generated
- */
- protected Element getOldTarget() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewTarget() {
- return (Element)newEnd;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java
deleted file mode 100644
index 5dbafea075f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class ConstraintCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public ConstraintCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- 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);
- }
-
- /**
- * @generated NOT
- */
- public boolean canExecute() {
- return getElementToEdit() instanceof Namespace;
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
-
- Namespace owner = (Namespace) getElementToEdit();
- owner.getOwnedRules().add(newElement);
-
- ElementInitializers.getInstance().init_Constraint_3008(newElement);
-
- 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 Lifeline){
- return ((Lifeline) element).getInteraction();
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Constraint newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java
deleted file mode 100644
index f10cad81a38..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class ContinuationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public ContinuationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static ContinuationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ContinuationCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public ContinuationCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated NOT
- */
- 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.
- *
- * @generated NOT
- */
- 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_3016(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Continuation newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java
deleted file mode 100644
index bf14b9699b0..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class DestructionOccurrenceSpecificationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static DestructionOccurrenceSpecificationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DestructionOccurrenceSpecificationCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public DestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * A DestructionEvent on a lifeline can only be created if it doesn't exist yet a destructionEvent on that lifeline.
- *
- * @generated NOT
- */
- 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;
-
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // Get the model container
- Object modelContainer = ((CreateElementRequest)getRequest()).getParameters().get(SequenceRequestConstant.INTERACTIONFRAGMENT_CONTAINER);
-
- DestructionOccurrenceSpecification destructionSpecification = (DestructionOccurrenceSpecification)CommandHelper.doCreateDestructionOccurrenceSpecification((Lifeline)getElementToEdit(), modelContainer);
-
- ElementInitializers.getInstance().init_DestructionOccurrenceSpecification_3022(destructionSpecification);
-
- doConfigure(destructionSpecification, monitor, info);
-
- ((CreateElementRequest)getRequest()).setNewElement(destructionSpecification);
- return CommandResult.newOKCommandResult(destructionSpecification);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DestructionOccurrenceSpecification newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java
deleted file mode 100644
index bca9a70faa6..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
-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.DurationConstraint;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class DurationConstraintCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DurationConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static DurationConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationConstraintCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public DurationConstraintCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated NOT enable only if there is occurrence specifications
- */
- 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;
- }
-
- /**
- * @generated NOT get the Lifeline parent as owner, assign the occurrence specifications
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
-
- // get the Lifeline parent as owner
- Namespace owner = (Namespace)getElementToEdit().eContainer();
- owner.getOwnedRules().add(newElement);
-
- ElementInitializers.getInstance().init_DurationConstraint_3021(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);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DurationConstraint newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java
deleted file mode 100644
index 29e3298aafc..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class DurationConstraintInMessageCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DurationConstraintInMessageCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static DurationConstraintInMessageCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationConstraintInMessageCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public DurationConstraintInMessageCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated NOT disable, use {@link DurationConstraintCreateCommand} instead
- */
- public boolean canExecute() {
- // disable, use {@link DurationConstraintCreateCommand} instead
- return false;
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
-
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
-
- ElementInitializers.getInstance().init_DurationConstraint_3023(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DurationConstraint newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java
deleted file mode 100644
index 252dbf6da0c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import 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.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class DurationObservationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public DurationObservationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static DurationObservationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationObservationCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public DurationObservationCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated NOT enable only if there is occurrence specifications
- */
- 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;
- }
-
- /**
- * @generated NOT get the parent package as owner, assign the occurrence specifications
- */
- 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_3024(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);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(DurationObservation newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingCreateCommand.java
deleted file mode 100644
index 56530d45201..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingCreateCommand.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.GeneralOrdering;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class GeneralOrderingCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected InteractionFragment container;
-
- /**
- * Non generated, completely redefined to find correct ends and correct container
- *
- * @generated NOT find source and target events and container
- */
- public GeneralOrderingCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- // 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);
- }
-
- /**
- * @generated
- */
- 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_4012(getContainer(), getSource(), getTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
-
- GeneralOrdering newElement = UMLFactory.eINSTANCE.createGeneralOrdering();
- getContainer().getGeneralOrderings().add(newElement);
- newElement.setBefore(getSource());
- newElement.setAfter(getTarget());
- ElementInitializers.getInstance().init_GeneralOrdering_4012(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- protected void doConfigure(GeneralOrdering newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected OccurrenceSpecification getSource() {
- return (OccurrenceSpecification)source;
- }
-
- /**
- * @generated
- */
- protected OccurrenceSpecification getTarget() {
- return (OccurrenceSpecification)target;
- }
-
- /**
- * @generated
- */
- public InteractionFragment getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container.
- * Modify with appropriate logic.
- *
- * @generated
- */
- protected InteractionFragment deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null; element = element.eContainer()) {
- if(element instanceof InteractionFragment) {
- return (InteractionFragment)element;
- }
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingReorientCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingReorientCommand.java
deleted file mode 100644
index 2fad8bf5376..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/GeneralOrderingReorientCommand.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.GeneralOrdering;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * @generated
- */
-public class GeneralOrderingReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public GeneralOrderingReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if(false == getElementToEdit() instanceof GeneralOrdering) {
- return false;
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if(!(oldEnd instanceof OccurrenceSpecification && newEnd instanceof OccurrenceSpecification)) {
- return false;
- }
- OccurrenceSpecification target = getLink().getAfter();
- if(!(getLink().eContainer() instanceof InteractionFragment)) {
- return false;
- }
- InteractionFragment container = (InteractionFragment)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistGeneralOrdering_4012(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if(!(oldEnd instanceof OccurrenceSpecification && newEnd instanceof OccurrenceSpecification)) {
- return false;
- }
- OccurrenceSpecification source = getLink().getBefore();
- if(!(getLink().eContainer() instanceof InteractionFragment)) {
- return false;
- }
- InteractionFragment container = (InteractionFragment)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistGeneralOrdering_4012(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- getLink().setBefore(getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getLink().setAfter(getNewTarget());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected GeneralOrdering getLink() {
- return (GeneralOrdering)getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected OccurrenceSpecification getOldSource() {
- return (OccurrenceSpecification)oldEnd;
- }
-
- /**
- * @generated
- */
- protected OccurrenceSpecification getNewSource() {
- return (OccurrenceSpecification)newEnd;
- }
-
- /**
- * @generated
- */
- protected OccurrenceSpecification getOldTarget() {
- return (OccurrenceSpecification)oldEnd;
- }
-
- /**
- * @generated
- */
- protected OccurrenceSpecification getNewTarget() {
- return (OccurrenceSpecification)newEnd;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java
deleted file mode 100644
index 8d9d79c24ed..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class InteractionCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public InteractionCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static InteractionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InteractionCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public InteractionCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
-
- return true;
-
- }
-
- /**
- * @generated-NOT
- */
- 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_2001(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Interaction newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java
deleted file mode 100644
index 1586274ea86..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import 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.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class InteractionOperandCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public InteractionOperandCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static InteractionOperandCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InteractionOperandCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public InteractionOperandCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
-
- return true;
-
- }
-
- /**
- * Generated not for add combined fragment's covered lifelines on interaction operand
- *
- * @generated NOT
- */
- @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);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(InteractionOperand newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- @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((EList)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/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java
deleted file mode 100644
index b46e094042f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class InteractionUseCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public InteractionUseCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static InteractionUseCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InteractionUseCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public InteractionUseCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * The creation command can only be executed if the elementToEdit (i.e the container) is an Interaction or an InteractionOperand
- *
- * @generated NOT
- */
- public boolean canExecute() {
- return getElementToEdit() instanceof Interaction || getElementToEdit() instanceof InteractionOperand;
- }
-
- /**
- * Handle creation on InteractionOperand
- *
- * @generated NOT
- */
- 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_3002(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(InteractionUse newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java
deleted file mode 100644
index 68461d31f18..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import 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.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class LifelineCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * The list of the available properties
- */
- private List<Property> availableProperties;
-
- /**
- * @generated
- */
- public LifelineCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static LifelineCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new LifelineCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public LifelineCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * Add generated NOT to constrain the creation of a lifeline
- *
- * @generated NOT
- */
- public boolean canExecute() {
- return !(getElementToEdit() instanceof InteractionOperand);
-
- }
-
- /**
- * Generated not for add lifelines on lifeline
- *
- * @generated NOT
- */
- 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_3001(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated NOT
- */
- 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/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2CreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2CreateCommand.java
deleted file mode 100644
index b3799fa4a64..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2CreateCommand.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import 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.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message2CreateCommand extends EditElementCommand {
-
- /**
- * 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$
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message2CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated NOT
- */
- @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 UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_4004(getContainer(), getSource(), getTarget());
- }
-
- /**
- * added code to create the gate , message occurence and event when a Async message is created.
- *
- * @generated NOT
- */
- @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);
- if(message != null) {
- doConfigure(message, monitor, info);
- ((CreateElementRequest)getRequest()).setNewElement(message);
- return CommandResult.newOKCommandResult(message);
- }
-
- return CommandResult.newErrorCommandResult(NO_CONTAINER_ERROR_MSG);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Element getSource() {
- return (Element)source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element)target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- return (Interaction)element;
- }
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2ReorientCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2ReorientCommand.java
deleted file mode 100644
index c5cc3688a8b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message2ReorientCommand.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.ReconnectMessageHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message2ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message2ReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if(false == getElementToEdit() instanceof Message) {
- return false;
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated NOT
- */
- protected boolean canReorientSource() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4004(container, getLink(), getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4004(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated NOT
- */
- protected CommandResult reorientSource() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getSendEvent(), getOldSource(), getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated NOT
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getReceiveEvent(), getOldTarget(), getNewTarget());
- ReconnectMessageHelper.updateMessage(getLink());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message)getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element)newEnd;
- }
-
- /**
- * @generated
- */
- protected Element getOldTarget() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewTarget() {
- return (Element)newEnd;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3CreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3CreateCommand.java
deleted file mode 100644
index 11eae7d7cdc..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3CreateCommand.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class Message3CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message3CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated NOT
- */
- @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 UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_4005(getContainer(), getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @generated NOT
- */
- @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) {
- 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$
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Element getSource() {
- return (Element)source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element)target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- return (Interaction)element;
- }
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3ReorientCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3ReorientCommand.java
deleted file mode 100644
index eb3f866f7e8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message3ReorientCommand.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.ReconnectMessageHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message3ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message3ReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if(false == getElementToEdit() instanceof Message) {
- return false;
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated NOT
- */
- protected boolean canReorientSource() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4005(container, getLink(), getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4005(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated NOT
- */
- protected CommandResult reorientSource() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getSendEvent(), getOldSource(), getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated NOT
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getReceiveEvent(), getOldTarget(), getNewTarget());
- ReconnectMessageHelper.updateMessage(getLink());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message)getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element)newEnd;
- }
-
- /**
- * @generated
- */
- protected Element getOldTarget() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewTarget() {
- return (Element)newEnd;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4CreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4CreateCommand.java
deleted file mode 100644
index 773207b32e7..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4CreateCommand.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class Message4CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message4CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated NOT
- */
- @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 UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_4006(getContainer(), getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @generated NOT
- */
- @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$
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Element getSource() {
- return (Element)source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element)target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- return (Interaction)element;
- }
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4ReorientCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4ReorientCommand.java
deleted file mode 100644
index 99ec7ba3497..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message4ReorientCommand.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.ReconnectMessageHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message4ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message4ReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if(false == getElementToEdit() instanceof Message) {
- return false;
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated NOT
- */
- protected boolean canReorientSource() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
-
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4006(container, getLink(), getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4006(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated NOT
- */
- protected CommandResult reorientSource() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getSendEvent(), getOldSource(), getNewSource());
-
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated NOT
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getReceiveEvent(), getOldTarget(), getNewTarget());
- ReconnectMessageHelper.updateMessage(getLink());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message)getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element)newEnd;
- }
-
- /**
- * @generated
- */
- protected Element getOldTarget() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewTarget() {
- return (Element)newEnd;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5CreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5CreateCommand.java
deleted file mode 100644
index 01307db6765..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5CreateCommand.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import 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.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.common.commands.EObjectInheritanceCopyCommand;
-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.SequenceRequestConstant;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.MessageSort;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.util.UMLUtil;
-
-/**
- * @generated
- */
-public class Message5CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message5CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated NOT
- */
- @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 UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_4007(getContainer(), getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @generated NOT
- */
- @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);
- 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 = UMLUtil.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;
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Element getSource() {
- return (Element)source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element)target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- return (Interaction)element;
- }
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5ReorientCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5ReorientCommand.java
deleted file mode 100644
index 8eda001f848..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message5ReorientCommand.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.ReconnectMessageHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message5ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message5ReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if(false == getElementToEdit() instanceof Message) {
- return false;
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated NOT
- */
- protected boolean canReorientSource() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4007(container, getLink(), getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4007(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated NOT
- */
- protected CommandResult reorientSource() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getSendEvent(), getOldSource(), getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated NOT
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getReceiveEvent(), getOldTarget(), getNewTarget());
- ReconnectMessageHelper.updateMessage(getLink());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message)getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element)newEnd;
- }
-
- /**
- * @generated
- */
- protected Element getOldTarget() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewTarget() {
- return (Element)newEnd;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6CreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6CreateCommand.java
deleted file mode 100644
index 17967b2fb0d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6CreateCommand.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class Message6CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message6CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated NOT
- */
- @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 UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_4008(getContainer(), getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @generated NOT
- */
- @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$
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Element getSource() {
- return (Element)source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element)target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- return (Interaction)element;
- }
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6ReorientCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6ReorientCommand.java
deleted file mode 100644
index 9460f3f796a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message6ReorientCommand.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message6ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message6ReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * Block reorient target
- *
- * @generated NOT do not reorient target
- */
- public boolean canExecute() {
- if(false == getElementToEdit() instanceof Message) {
- return false;
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- // do not reorient target
- // return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- if(getLink().getOwnedElements().size() != 1) {
- return false;
- }
- Element target = (Element)getLink().getOwnedElements().get(0);
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4008(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4008(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message)getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element)newEnd;
- }
-
- /**
- * @generated
- */
- protected Element getOldTarget() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewTarget() {
- return (Element)newEnd;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7CreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7CreateCommand.java
deleted file mode 100644
index d0ac59f1435..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7CreateCommand.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class Message7CreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public Message7CreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated NOT
- */
- @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 UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_4009(getContainer(), getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @generated NOT
- */
- @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$
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Element getSource() {
- return (Element)source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element)target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- return (Interaction)element;
- }
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7ReorientCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7ReorientCommand.java
deleted file mode 100644
index b6c15c53d9f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/Message7ReorientCommand.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class Message7ReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public Message7ReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * Block reorient source
- *
- * @generated NOT do not reorient source
- */
- public boolean canExecute() {
- if(false == getElementToEdit() instanceof Message) {
- return false;
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- // do not reorient source
- // return canReorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- if(getLink().getOwnedElements().size() != 1) {
- return false;
- }
- Element target = (Element)getLink().getOwnedElements().get(0);
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4009(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4009(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message)getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element)newEnd;
- }
-
- /**
- * @generated
- */
- protected Element getOldTarget() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewTarget() {
- return (Element)newEnd;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageCreateCommand.java
deleted file mode 100644
index 5e62881f04e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageCreateCommand.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class MessageCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Interaction container;
-
- /**
- * @generated
- */
- public MessageCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * Add a condition on the MOS container
- *
- * @generated NOT
- */
- @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 UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateMessage_4003(getContainer(), getSource(), getTarget());
- }
-
- /**
- * Create a MessageOccurenceSpecification and the call event when a message is created
- *
- * @generated NOT
- */
- @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.SYNCH_CALL_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$
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Element getSource() {
- return (Element)source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element)target;
- }
-
- /**
- * @generated
- */
- public Interaction getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container. Modify
- * with appropriate logic.
- *
- * @generated
- */
- protected Interaction deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- return (Interaction)element;
- }
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageReorientCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageReorientCommand.java
deleted file mode 100644
index b5d6144a65b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/MessageReorientCommand.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.ReconnectMessageHelper;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.Message;
-
-/**
- * @generated
- */
-public class MessageReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public MessageReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
- if(false == getElementToEdit() instanceof Message) {
- return false;
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated NOT
- */
- protected boolean canReorientSource() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- boolean canExistMessage = UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4003(container, getLink(), getNewSource(), getOldTarget());
- if(!canExistMessage) {
- return false;
- }
- //Fixed bug about reconnect messages.
- return ReconnectMessageHelper.canReorientSource(getLink(), getNewSource());
- }
-
- /**
- * @generated NOT
- */
- protected boolean canReorientTarget() {
- if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- Element source = getLink().getOwner();
- if(!(getLink().eContainer() instanceof Interaction)) {
- return false;
- }
- Interaction container = (Interaction)getLink().eContainer();
- if(!UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4003(container, getLink(), source, getNewTarget())) {
- return false;
- }
- return ReconnectMessageHelper.canReorientTarget(getLink(), getNewTarget());
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated NOT
- */
- protected CommandResult reorientSource() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getSendEvent(), getOldSource(), getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated NOT
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- ReconnectMessageHelper.updateMessageEnd(getLink().getReceiveEvent(), getOldTarget(), getNewTarget());
- ReconnectMessageHelper.updateMessage(getLink());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Message getLink() {
- return (Message)getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Element getOldSource() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewSource() {
- return (Element)newEnd;
- }
-
- /**
- * @generated
- */
- protected Element getOldTarget() {
- return (Element)oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewTarget() {
- return (Element)newEnd;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java
deleted file mode 100644
index fc402b2789d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class StateInvariantCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public StateInvariantCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static StateInvariantCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new StateInvariantCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public StateInvariantCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated
- */
- public boolean canExecute() {
-
- return true;
-
- }
-
- /**
- * The StateInvariant is created on the lifeline and not on its container
- *
- * @generated NOT
- */
- 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);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(StateInvariant newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java
deleted file mode 100644
index 2dd0e628648..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import 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.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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;
-
-/**
- * @generated
- */
-public class TimeConstraintCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public TimeConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static TimeConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeConstraintCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public TimeConstraintCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated NOT enable only if there is an occurrence specification
- */
- 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.getReceiveEvent().equals(occurrence) && 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;
- }
-
- /**
- * @generated NOT get the Lifeline parent as owner, assign the occurrence specification
- */
- 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_3019(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.getReceiveEvent().equals(occurrence) && 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);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(TimeConstraint newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java
deleted file mode 100644
index 43c70f38dc1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import 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.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-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.OccurrenceSpecification;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.TimeObservation;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class TimeObservationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private EClass eClass = null;
-
- /**
- * @generated
- */
- private EObject eObject = null;
-
- /**
- * @generated
- */
- public TimeObservationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
-
- /**
- * @generated
- */
- public static TimeObservationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeObservationCreateCommand(req, eObject);
- }
-
- /**
- * @generated
- */
- public TimeObservationCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- protected EObject getElementToEdit() {
-
- EObject container = ((CreateElementRequest)getRequest()).getContainer();
- if(container instanceof View) {
- container = ((View)container).getElement();
- }
- if(container != null) {
- return container;
- }
- return eObject;
- }
-
- /**
- * @generated NOT enable only if there is an occurrence specification
- */
- 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.getReceiveEvent().equals(occurrence) && 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;
- }
-
- /**
- * @generated NOT get the Lifeline grand parent as owner, assign the occurrence specification
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- TimeObservation newElement = UMLFactory.eINSTANCE.createTimeObservation();
-
- // 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_TimeObservation_3020(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.getReceiveEvent().equals(occurrence) && 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.setEvent(occurrence);
- break;
- }
- }
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(TimeObservation newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if(configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/UMLReorientConnectionViewCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/UMLReorientConnectionViewCommand.java
deleted file mode 100644
index 91a4bc44e46..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/UMLReorientConnectionViewCommand.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.commands;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class UMLReorientConnectionViewCommand extends AbstractTransactionalCommand {
-
- /**
- * @generated
- */
- private IAdaptable edgeAdaptor;
-
- /**
- * @generated
- */
- public UMLReorientConnectionViewCommand(TransactionalEditingDomain editingDomain, String label) {
- super(editingDomain, label, null);
- }
-
- /**
- * @generated
- */
- public List getAffectedFiles() {
- View view = (View)edgeAdaptor.getAdapter(View.class);
- if(view != null) {
- return getWorkspaceFiles(view);
- }
- return super.getAffectedFiles();
- }
-
- /**
- * @generated
- */
- public IAdaptable getEdgeAdaptor() {
- return edgeAdaptor;
- }
-
- /**
- * @generated
- */
- public void setEdgeAdaptor(IAdaptable edgeAdaptor) {
- this.edgeAdaptor = edgeAdaptor;
- }
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) {
- assert null != edgeAdaptor : "Null child in UMLReorientConnectionViewCommand"; //$NON-NLS-1$
- Edge edge = (Edge)getEdgeAdaptor().getAdapter(Edge.class);
- assert null != edge : "Null edge in UMLReorientConnectionViewCommand"; //$NON-NLS-1$
- View tempView = edge.getSource();
- edge.setSource(edge.getTarget());
- edge.setTarget(tempView);
- return CommandResult.newOKCommandResult();
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ActionExecutionSpecificationEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ActionExecutionSpecificationEditHelper.java
deleted file mode 100644
index 1f7e2033b0f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ActionExecutionSpecificationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class ActionExecutionSpecificationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/AnchorHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/AnchorHelper.java
deleted file mode 100644
index a08b28ebedb..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/AnchorHelper.java
+++ /dev/null
@@ -1,195 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.PrecisionPoint;
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DropRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.util.Log;
-import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIPlugin;
-import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIStatusCodes;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.SlidableAnchor;
-import org.eclipse.gmf.runtime.notation.Anchor;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.IdentityAnchor;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.anchors.FixedAnchor;
-
-
-public class AnchorHelper {
-
- public static String getAnchorId(TransactionalEditingDomain domain, ConnectionEditPart connEditPart, final boolean isSource) {
- final org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connection =
- (org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart)connEditPart;
-
- String t = ""; //$NON-NLS-1$
- try {
- t = (String) domain.runExclusive(
- new RunnableWithResult.Impl() {
-
- public void run() {
- Anchor a = null;
- if(isSource)
- a = ((Edge)connection.getModel()).getSourceAnchor();
- else
- a = ((Edge)connection.getModel()).getTargetAnchor();
- if (a instanceof IdentityAnchor)
- setResult(((IdentityAnchor) a).getId());
- else
- setResult(""); //$NON-NLS-1$
- }
- });
- } catch (InterruptedException e) {
- Log.error(DiagramUIPlugin.getInstance(),
- DiagramUIStatusCodes.IGNORED_EXCEPTION_WARNING,
- "getTargetConnectionAnchor", e); //$NON-NLS-1$
- }
- return t;
- }
-
-
- public static Point getRequestLocation(Request request){
- if (request instanceof ReconnectRequest) {
- if (((DropRequest) request).getLocation() != null) {
- Point pt = ((DropRequest) request).getLocation().getCopy();
- return pt;
- }
- }
- else if (request instanceof DropRequest){
- return ((DropRequest) request).getLocation();
- }
- return null;
- }
-
- public static class CombinedFragmentNodeFigure extends DefaultSizeNodeFigure{
-
- public CombinedFragmentNodeFigure(int width, int height) {
- super(width, height);
- }
-
- protected ConnectionAnchor createAnchor(PrecisionPoint p) {
- if (p==null)
- // If the old terminal for the connection anchor cannot be resolved (by SlidableAnchor) a null
- // PrecisionPoint will passed in - this is handled here
- return createDefaultAnchor();
- return new AnchorHelper.IntersectionPointAnchor(this, p);
- }
- }
-
- public static class IntersectionPointAnchor extends SlidableAnchor{
-
- public IntersectionPointAnchor(IFigure fig, PrecisionPoint p) {
- super(fig,p);
- }
-
- public IntersectionPointAnchor(IFigure fig) {
- super(fig);
- }
-
- protected Point getLocation(Point ownReference, Point foreignReference) {
- PointList intersections = getIntersectionPoints(ownReference, foreignReference);
- if (intersections!=null && intersections.size()!=0) {
- int size = intersections.size();
- double dist = foreignReference.getDistance(ownReference);
- for(int i = 0; i < size; i ++){
- Point loc = intersections.getPoint(i);
- if(isInOrder(foreignReference,ownReference,dist, loc)){
- return loc;
- }
- }
- return intersections.getFirstPoint();
- }
- return null;
- }
-
- private boolean isInOrder(Point start, Point end, double dist, Point loc) {
- double total = loc.getDistance(start);
- double dist2 = loc.getDistance(end);
- if(total < dist || total < dist2)
- return false;
-
- if(Math.abs(total - dist - dist2) < 0.01)
- return true;
-
- return false;
- }
- }
-
- public static class FixedAnchorEx extends FixedAnchor {
-
- private int location;
-
- public FixedAnchorEx(IFigure f, int location) {
- super(f, location);
- this.location = location;
- }
-
- public Point getLocation(Point reference) {
- if(location == TOP)
- return getBox().getTop();
- else if(location == BOTTOM)
- return getBox().getBottom();
-
- return super.getLocation(reference);
- }
- }
-
- public static class SideAnchor extends SlidableAnchor{
-
- private boolean isRight;
-
- public SideAnchor(NodeFigure nodeFigure, PrecisionPoint pt,
- boolean isRight) {
- super(nodeFigure, pt);
- this.isRight = isRight;
- }
-
- public boolean isRight() {
- return isRight;
- }
-
- public String getTerminal() {
- String side = isRight? "R": "L";
- return super.getTerminal() + "{" + side + "}";
- }
- }
-
- public static class InnerPointAnchor extends SlidableAnchor{
- private PrecisionPoint percent;
- private IFigure figure;
-
- public InnerPointAnchor(IFigure fig, PrecisionPoint percent) {
- super(fig,percent);
- this.figure = fig;
- this.percent = percent;
- }
-
- public static InnerPointAnchor createAnchorAtLocation(IFigure fig, PrecisionPoint loc) {
- PrecisionPoint p = loc.getPreciseCopy();
- Rectangle b = fig.getBounds().getCopy();
- fig.translateToAbsolute(b);
-
- Dimension d = p.getDifference(b.getTopLeft());
- PrecisionPoint per = new PrecisionPoint( d.preciseWidth()/ b.width , d.preciseHeight() / b.height);
- return new InnerPointAnchor(fig, per);
- }
-
- protected Point getLocation(Point ownReference, Point foreignReference) {
- PrecisionRectangle bounds = new PrecisionRectangle(figure.getBounds());
- bounds.setPreciseWidth((bounds.width * percent.preciseX()));
- bounds.setPreciseHeight((bounds.height * percent.preciseY()));
- figure.translateToAbsolute(bounds);
- return bounds.getBottomRight();
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/BehaviorExecutionSpecificationEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/BehaviorExecutionSpecificationEditHelper.java
deleted file mode 100644
index 632e5169635..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/BehaviorExecutionSpecificationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class BehaviorExecutionSpecificationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CombinedFragmentEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CombinedFragmentEditHelper.java
deleted file mode 100644
index bd95d17d287..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CombinedFragmentEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class CombinedFragmentEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CommentEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CommentEditHelper.java
deleted file mode 100644
index 14b0ed26794..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/CommentEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class CommentEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConsiderIgnoreFragmentEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConsiderIgnoreFragmentEditHelper.java
deleted file mode 100644
index 820de4da51d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConsiderIgnoreFragmentEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class ConsiderIgnoreFragmentEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConstraintEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConstraintEditHelper.java
deleted file mode 100644
index 146c842b412..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ConstraintEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class ConstraintEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ContinuationEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ContinuationEditHelper.java
deleted file mode 100644
index beb13efa889..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/ContinuationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class ContinuationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DestructionEventEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DestructionEventEditHelper.java
deleted file mode 100644
index 89f03153df4..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DestructionEventEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class DestructionEventEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintEditHelper.java
deleted file mode 100644
index bfc2643c00c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class DurationConstraintEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintInMessageEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintInMessageEditHelper.java
deleted file mode 100644
index 925b55aa640..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationConstraintInMessageEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class DurationConstraintInMessageEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationObservationEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationObservationEditHelper.java
deleted file mode 100644
index 63c6e4e092b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/DurationObservationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class DurationObservationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/GeneralOrderingEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/GeneralOrderingEditHelper.java
deleted file mode 100644
index 2d5b1e6efe1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/GeneralOrderingEditHelper.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class GeneralOrderingEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionEditHelper.java
deleted file mode 100644
index 9859e4b0b9c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class InteractionEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionOperandEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionOperandEditHelper.java
deleted file mode 100644
index a4e911c7042..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionOperandEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class InteractionOperandEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionUseEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionUseEditHelper.java
deleted file mode 100644
index df0a5499ac6..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/InteractionUseEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class InteractionUseEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/LifelineEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/LifelineEditHelper.java
deleted file mode 100644
index 96b9be45a9e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/LifelineEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class LifelineEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageEditHelper.java
deleted file mode 100644
index de5e06b32c7..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class MessageEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageOccurrenceSpecificationEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageOccurrenceSpecificationEditHelper.java
deleted file mode 100644
index 8dc9947252d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageOccurrenceSpecificationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class MessageOccurrenceSpecificationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/PackageEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/PackageEditHelper.java
deleted file mode 100644
index 71336a0a8a5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/PackageEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class PackageEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/StateInvariantEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/StateInvariantEditHelper.java
deleted file mode 100644
index f33dc2536d6..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/StateInvariantEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class StateInvariantEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeConstraintEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeConstraintEditHelper.java
deleted file mode 100644
index 3991142022f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeConstraintEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class TimeConstraintEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeObservationEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeObservationEditHelper.java
deleted file mode 100644
index 418bc5d6a01..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/TimeObservationEditHelper.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-/**
- * @generated
- */
-public class TimeObservationEditHelper extends UMLBaseEditHelper {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java
deleted file mode 100644
index 88d30b19638..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper;
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.papyrus.uml.diagram.common.commands.UnapplyAllStereotypesCommand;
-import org.eclipse.uml2.uml.Element;
-
-/**
- * @generated
- */
-public class UMLBaseEditHelper extends AbstractEditHelper {
-
- /**
- * @generated
- */
- public static final String EDIT_POLICY_COMMAND = "edit policy command"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final String CONTEXT_ELEMENT_TYPE = "context element type"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- protected IEditHelperAdvice[] getEditHelperAdvice(IEditCommandRequest req) {
- if(req.getParameter(CONTEXT_ELEMENT_TYPE) instanceof IElementType) {
- return ElementTypeRegistry.getInstance().getEditHelperAdvice((IElementType)req.getParameter(CONTEXT_ELEMENT_TYPE));
- }
- return super.getEditHelperAdvice(req);
- }
-
- /**
- * @generated
- */
- protected ICommand getInsteadCommand(IEditCommandRequest req) {
- ICommand epCommand = (ICommand)req.getParameter(EDIT_POLICY_COMMAND);
- req.setParameter(EDIT_POLICY_COMMAND, null);
- ICommand ehCommand = super.getInsteadCommand(req);
- if(epCommand == null) {
- return ehCommand;
- }
- if(ehCommand == null) {
- return epCommand;
- }
- CompositeCommand command = new CompositeCommand(null);
- command.add(epCommand);
- command.add(ehCommand);
- return command;
- }
-
- /**
- * @generated
- */
- protected ICommand getCreateCommand(CreateElementRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected ICommand getCreateRelationshipCommand(CreateRelationshipRequest req) {
- return null;
- }
-
- /**
- * @generated NOT
- * handle unapply stereotypes before delete
- */
- protected ICommand getDestroyElementCommand(DestroyElementRequest req) {
- EObject elementToDestroy = req.getElementToDestroy();
- if(elementToDestroy instanceof Element) {
- UnapplyAllStereotypesCommand command = new UnapplyAllStereotypesCommand(req.getEditingDomain(), req.getLabel(), (Element)elementToDestroy);
- if(!command.isEmpty()) {
- return command;
- }
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected ICommand getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return null;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java
deleted file mode 100644
index c5fa0ef157a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationEditPart.java
+++ /dev/null
@@ -1,1120 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.DelegatingLayout;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.ConnectionEditPart;
-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.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.anchors.FixedAnchor;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ActionExecutionSpecificationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ElementCreationWithMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ActionExecutionSpecificationEditPart extends
-
-AbstractExecutionSpecificationEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3006;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActionExecutionSpecificationItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ElementCreationWithMessageEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new ExecutionSpecificationComponentEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new ExecutionSpecificationRectangleFigure();
- }
-
- /**
- * @generated
- */
- public ExecutionSpecificationRectangleFigure getPrimaryShape() {
- return (ExecutionSpecificationRectangleFigure)primaryShape;
- }
-
- /**
- * Overrides to disable the defaultAnchorArea. The edge is now more stuck with the middle of the
- * figure.
- *
- * @generated NOT
- */
- protected NodeFigure createNodePlate() {
- return super.createNodePlate();
- }
-
- /**
- * @generated
- */
- @Override
- 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 NOT
- */
- @Override
- protected NodeFigure createNodeFigure() {
- final NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new DelegatingLayout());
- //figure.setLayoutManager(new StackLayout());
-
- IFigure shape = createNodeShape();
- figure.add(shape, new FillParentLocator());
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane. Respects layout one may have set
- * for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if(contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if(primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- // /**
- // * @generated
- // */
- // @Override
- // protected void setLineWidth(int width) {
- // if(primaryShape instanceof Shape) {
- // ((Shape)primaryShape).setLineWidth(width);
- // }
- // }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- // /**
- // * @generated
- // */
- // public class ExecutionSpecificationRectangleFigure extends RectangleFigure {
- //
- // /**
- // * @generated
- // */
- // public ExecutionSpecificationRectangleFigure() {
- // this.setPreferredSize(new Dimension(getMapMode().DPtoLP(16), getMapMode().DPtoLP(60)));
- // this.setMinimumSize(new Dimension(getMapMode().DPtoLP(16), getMapMode().DPtoLP(20)));
- // }
- //
- // }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("ActionExecutionSpecification", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("ActionExecutionSpecification", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("ActionExecutionSpecification", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("ActionExecutionSpecification", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * Add connection on top off the figure during the feedback.
- */
-
- public ConnectionAnchor getTargetConnectionAnchor(Request request) {
- if(request instanceof CreateUnspecifiedTypeConnectionRequest) {
- CreateUnspecifiedTypeConnectionRequest createRequest = (CreateUnspecifiedTypeConnectionRequest)request;
- List<?> relationshipTypes = createRequest.getElementTypes();
- for(Object obj : relationshipTypes) {
- if(UMLElementTypes.Message_4003.equals(obj)) {
- // Sync Message
- if(!createRequest.getTargetEditPart().equals(createRequest.getSourceEditPart())) {
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.TOP);
- }
- // otherwise, this is a recursive call, let destination free
- }
- }
- } else if(request instanceof ReconnectRequest) {
- ReconnectRequest reconnectRequest = (ReconnectRequest)request;
- ConnectionEditPart connectionEditPart = reconnectRequest.getConnectionEditPart();
- if(connectionEditPart instanceof MessageEditPart) {
- // Sync Message
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.TOP);
- }
- }
-
- return super.getTargetConnectionAnchor(request);
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart)
- *
- * @param connEditPart
- * The connection edit part.
- * @return The anchor.
- */
-
- @Override
- public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connEditPart) {
- if(connEditPart instanceof MessageEditPart) {
- // Sync Message
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.TOP);
- }
- return super.getTargetConnectionAnchor(connEditPart);
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getSourceConnectionAnchor(org.eclipse.gef.Request)
- *
- * @param request
- * The request
- * @return The anchor
- */
-
- @Override
- public ConnectionAnchor getSourceConnectionAnchor(Request request) {
- if(request instanceof CreateUnspecifiedTypeConnectionRequest) {
- CreateUnspecifiedTypeConnectionRequest createRequest = (CreateUnspecifiedTypeConnectionRequest)request;
- List<?> relationshipTypes = createRequest.getElementTypes();
- for(Object obj : relationshipTypes) {
- if(UMLElementTypes.Message_4005.equals(obj)) {
- // Reply Message
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.BOTTOM);
- }
- }
- } else if(request instanceof ReconnectRequest) {
- ReconnectRequest reconnectRequest = (ReconnectRequest)request;
- ConnectionEditPart connectionEditPart = reconnectRequest.getConnectionEditPart();
- if(connectionEditPart instanceof Message3EditPart) {
- // Reply Message
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.BOTTOM);
- }
- }
- return super.getSourceConnectionAnchor(request);
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart)
- *
- * @param connEditPart
- * The connection edit part.
- * @return The anchor.
- */
-
- @Override
- public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connEditPart) {
- if(connEditPart instanceof Message3EditPart) {
- // Reply Message
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.BOTTOM);
- }
- return super.getSourceConnectionAnchor(connEditPart);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationNameEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationNameEditPart.java
deleted file mode 100644
index 9e9db056031..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ActionExecutionSpecificationNameEditPart.java
+++ /dev/null
@@ -1,753 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gef.handles.NonResizableHandleKit;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.NamedElement;
-
-/**
- * @generated
- */
-public class ActionExecutionSpecificationNameEditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5005;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {
-
- protected List createSelectionHandles() {
- List handles = new ArrayList();
- NonResizableHandleKit.addMoveHandle((GraphicalEditPart)getHost(), handles);
- ((MoveHandle)handles.get(0)).setBorder(null);
- return handles;
- }
-
- public Command getCommand(Request request) {
- return null;
- }
-
- public boolean understandsRequest(Request request) {
- return false;
- }
- });
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.ActionExecutionSpecification_3006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationNameEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new TextDirectEditManager(this, TextDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager().getClass() == TextDirectEditManager.class) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- final ExtendedDirectEditionDialog dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), dialog.getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (resolveSemanticElement() instanceof NamedElement);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java
deleted file mode 100644
index fb201b5a638..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/BehaviorExecutionSpecificationEditPart.java
+++ /dev/null
@@ -1,1117 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.DelegatingLayout;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.ConnectionEditPart;
-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.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.anchors.FixedAnchor;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.BehaviorExecutionSpecificationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ElementCreationWithMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExecutionSpecificationComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class BehaviorExecutionSpecificationEditPart extends AbstractExecutionSpecificationEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3003;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public BehaviorExecutionSpecificationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BehaviorExecutionSpecificationItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ElementCreationWithMessageEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new ExecutionSpecificationComponentEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new ExecutionSpecificationRectangleFigure();
- }
-
- /**
- * @generated
- */
- public ExecutionSpecificationRectangleFigure getPrimaryShape() {
- return (ExecutionSpecificationRectangleFigure)primaryShape;
- }
-
- /**
- * Overrides to disable the defaultAnchorArea. The edge is no more stuck with the middle of the
- * figure.
- *
- * @generated NOT
- */
- protected NodeFigure createNodePlate() {
- return super.createNodePlate();
- }
-
- /**
- * @generated
- */
- @Override
- 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 NOT
- */
- @Override
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- //figure.setLayoutManager(new StackLayout());
- figure.setLayoutManager(new DelegatingLayout());
- IFigure shape = createNodeShape();
- figure.add(shape, new FillParentLocator());
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane. Respects layout one may have set
- * for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if(contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if(primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
-// /**
-// * @generated
-// */
-// @Override
-// protected void setLineWidth(int width) {
-// if(primaryShape instanceof Shape) {
-// ((Shape)primaryShape).setLineWidth(width);
-// }
-// }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
-// /**
-// * @generated
-// */
-// public class ExecutionSpecificationRectangleFigure extends RectangleFigure {
-//
-// /**
-// * @generated
-// */
-// public ExecutionSpecificationRectangleFigure() {
-// this.setPreferredSize(new Dimension(getMapMode().DPtoLP(16), getMapMode().DPtoLP(60)));
-// this.setMinimumSize(new Dimension(getMapMode().DPtoLP(16), getMapMode().DPtoLP(20)));
-// }
-//
-// }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("BehaviorExecutionSpecification", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("BehaviorExecutionSpecification", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("BehaviorExecutionSpecification", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("BehaviorExecutionSpecification", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * Add connection on top off the figure
- */
- @Override
- public ConnectionAnchor getTargetConnectionAnchor(Request request) {
- if(request instanceof CreateUnspecifiedTypeConnectionRequest) {
- CreateUnspecifiedTypeConnectionRequest createRequest = (CreateUnspecifiedTypeConnectionRequest)request;
- List<?> relationshipTypes = createRequest.getElementTypes();
- for(Object obj : relationshipTypes) {
- if(UMLElementTypes.Message_4003.equals(obj)) {
- // Sync Message
- if(!createRequest.getTargetEditPart().equals(createRequest.getSourceEditPart())) {
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.TOP);
- }
- // otherwise, this is a recursive call, let destination free
- }
- }
- } else if(request instanceof ReconnectRequest) {
- ReconnectRequest reconnectRequest = (ReconnectRequest)request;
- ConnectionEditPart connectionEditPart = reconnectRequest.getConnectionEditPart();
- if(connectionEditPart instanceof MessageEditPart) {
- // Sync Message
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.TOP);
- }
- }
-
- return super.getTargetConnectionAnchor(request);
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart)
- *
- * @param connEditPart
- * The connection edit part.
- * @return The anchor.
- */
-
- @Override
- public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connEditPart) {
- if(connEditPart instanceof MessageEditPart) {
- // Sync Message
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.TOP);
- }
- return super.getTargetConnectionAnchor(connEditPart);
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getSourceConnectionAnchor(org.eclipse.gef.Request)
- *
- * @param request
- * The request
- * @return The anchor
- */
-
- @Override
- public ConnectionAnchor getSourceConnectionAnchor(Request request) {
- if(request instanceof CreateUnspecifiedTypeConnectionRequest) {
- CreateUnspecifiedTypeConnectionRequest createRequest = (CreateUnspecifiedTypeConnectionRequest)request;
- List<?> relationshipTypes = createRequest.getElementTypes();
- for(Object obj : relationshipTypes) {
- if(UMLElementTypes.Message_4005.equals(obj)) {
- // Reply Message
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.BOTTOM);
- }
- }
- } else if(request instanceof ReconnectRequest) {
- ReconnectRequest reconnectRequest = (ReconnectRequest)request;
- ConnectionEditPart connectionEditPart = reconnectRequest.getConnectionEditPart();
- if(connectionEditPart instanceof Message3EditPart) {
- // Reply Message
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.BOTTOM);
- }
- }
- return super.getSourceConnectionAnchor(request);
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart)
- *
- * @param connEditPart
- * The connection edit part.
- * @return The anchor.
- */
-
- @Override
- public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connEditPart) {
- if(connEditPart instanceof Message3EditPart) {
- // Reply Message
- return new AnchorHelper.FixedAnchorEx(getFigure(), FixedAnchor.BOTTOM);
- }
- return super.getSourceConnectionAnchor(connEditPart);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java
deleted file mode 100644
index 3b9f91c816c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragment2EditPart.java
+++ /dev/null
@@ -1,1033 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragment2ItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.CoRegionCombinedFragmentFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Lifeline;
-
-/**
- * @generated
- */
-public class CombinedFragment2EditPart extends
-
-ShapeNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3018;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public CombinedFragment2EditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CombinedFragment2ItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new LifelineChildGraphicalNodeEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new CoRegionCombinedFragmentFigure();
- }
-
- /**
- * @generated
- */
- public CoRegionCombinedFragmentFigure getPrimaryShape() {
- return (CoRegionCombinedFragmentFigure)primaryShape;
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "CombinedFragment";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- 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) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("CombinedFragment", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("CombinedFragment", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("CombinedFragment", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("CombinedFragment", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * Overrides to return a ghost central vertical line which will be used for creating message (message will be bound to the lifeline and not the
- * outline of this shape).
- */
- @Override
- protected NodeFigure getNodeFigure() {
- NodeFigure centerFigure = null;
- if(getContentPane() instanceof CoRegionCombinedFragmentFigure) {
- centerFigure = ((CoRegionCombinedFragmentFigure)getContentPane()).getCentralVerticalLine();
- }
- return centerFigure;
- }
-
- /**
- * Get the lifeline element where the CoRegion is drawn
- *
- * @return the attached lifeline
- */
- public Lifeline getAttachedLifeline() {
- Lifeline attachedLifeline = null;
- EditPart editPartParent = getParent();
- if(editPartParent instanceof LifelineEditPart) {
- attachedLifeline = (Lifeline)((LifelineEditPart)editPartParent).resolveSemanticElement();
- }
- return attachedLifeline;
- }
-
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
-
- Object feature = notification.getFeature();
- if((getModel() != null) && (getModel() == notification.getNotifier())) {
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
- }
-
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLineWidth();
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentCombinedFragmentCompartmentEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentCombinedFragmentCompartmentEditPart.java
deleted file mode 100644
index 7b9aaac04d1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentCombinedFragmentCompartmentEditPart.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- * Soyatec - add the DnD support
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.ScrollPane;
-import org.eclipse.draw2d.XYLayout;
-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.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-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.editparts.ListCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
-import org.eclipse.gmf.runtime.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.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy;
-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.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OperandBoundsComputeHelper;
-
-/**
- * @generated
- */
-public class CombinedFragmentCombinedFragmentCompartmentEditPart extends ListCompartmentEditPart {
-
- /**
- * Children string for notification event type.
- */
- private static final String CHILDREN_TYPE = "children";
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7004;
-
- /**
- * @generated
- */
- public CombinedFragmentCombinedFragmentCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected boolean hasModelChildrenChanged(Notification evt) {
- return false;
- }
-
- /**
- * @generated
- */
- public String getCompartmentName() {
- return Messages.CombinedFragmentCombinedFragmentCompartmentEditPart_title;
- }
-
- /**
- * Not generated for delete borders add stretch children figures.
- *
- * @generated NOT
- */
- public IFigure createFigure() {
- ResizableCompartmentFigure result = (ResizableCompartmentFigure)super.createFigure();
- result.getScrollPane().setVerticalScrollBarVisibility(ScrollPane.NEVER);
- result.setTitleVisibility(false);
- result.setBorder(null);
- IFigure contentPane = result.getContentPane();
- if(contentPane != null) {
- contentPane.setBorder(null);
- //fix Scroll bars(https://bugs.eclipse.org/bugs/show_bug.cgi?id=364697)
- contentPane.setLayoutManager(new XYLayout());
-// LayoutManager layout = contentPane.getLayoutManager();
-// if(layout instanceof ConstrainedToolbarLayout) {
-// ConstrainedToolbarLayout constrainedToolbarLayout = (ConstrainedToolbarLayout)layout;
-// constrainedToolbarLayout.setStretchMajorAxis(true);
-// constrainedToolbarLayout.setStretchMinorAxis(true);
-// }
- }
- return result;
- }
-
- /**
- * Add RemoveOrphanView role
- *
- * @generated NOT
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, createCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
-
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCombinedFragmentCompartmentCanonicalEditPolicy());
-
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- private EditPolicy createCreationEditPolicy() {
- return new CreationEditPolicy(){
- protected Command getCreateElementAndViewCommand(CreateViewAndElementRequest request) {
- ICommandProxy commandProxy = (ICommandProxy)super.getCreateElementAndViewCommand(request);
- CompositeCommand command = (CompositeCommand)commandProxy.getICommand();
-
- IHintedType type = (IHintedType)UMLElementTypes.InteractionOperand_3005;
- if(type.getSemanticHint().equals(request.getViewAndElementDescriptor().getSemanticHint())) {
- //fix Scroll bars(https://bugs.eclipse.org/bugs/show_bug.cgi?id=364697), note that we use XYLayout
- //to relocate both its bounds and combined fragment bounds when operand is added to combined fragment
- OperandBoundsComputeHelper.addUpdateBoundsForIOCreationCommand(CombinedFragmentCombinedFragmentCompartmentEditPart.this, request.getViewAndElementDescriptor(), command);
- }
- return commandProxy;
- }
-
- protected Command getCreateCommand(CreateViewRequest request) {
- ICommandProxy commandProxy = (ICommandProxy)super.getCreateCommand(request);
- ICommand command = commandProxy.getICommand();
- CompositeCommand compositeCommand = null;
- if (command instanceof CompositeCommand) {
- compositeCommand = (CompositeCommand) command;
- } else {
- compositeCommand = new CompositeCommand(commandProxy.getLabel());
- compositeCommand.add(command);
- }
-
- for (ViewDescriptor viewDescriptor : request.getViewDescriptors()) {
- IHintedType type = (IHintedType)UMLElementTypes.InteractionOperand_3005;
- if(type.getSemanticHint().equals(viewDescriptor.getSemanticHint())) {
- //fix Scroll bars(https://bugs.eclipse.org/bugs/show_bug.cgi?id=364697), note that we use XYLayout
- //to relocate both its bounds and combined fragment bounds when operand is added to combined fragment
- OperandBoundsComputeHelper.addUpdateBoundsForIOCreationCommand(CombinedFragmentCombinedFragmentCompartmentEditPart.this, viewDescriptor, compositeCommand);
- }
- }
- return new ICommandProxy(compositeCommand.reduce());
- }
- };
- }
-
- /**
- * Not generated for handle the first InteractionOperand case (no LineSeparator) {@inheritDoc}
- *
- * @generataed NOT
- */
- @Override
- protected EditPart createChild(Object model) {
- EditPart child = super.createChild(model);
- if(getChildren() == null || getChildren().isEmpty() && child instanceof InteractionOperandEditPart) {
- ((InteractionOperandEditPart)child).setFirstOperand(true);
- }
- return child;
- }
-
- /**
- * @generated
- */
- protected void setRatio(Double ratio) {
- if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * Handle the first InteractionOperand deletion case (change FirstOperand attribute)
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
-
- if(feature instanceof EStructuralFeature) {
- EStructuralFeature ref = (EStructuralFeature)feature;
- String typeName = ref.getName();
- if(CHILDREN_TYPE.equals(typeName)) {
- if(event.getEventType() == Notification.UNSET || event.getEventType() == Notification.REMOVE) {
- List<?> children = getChildren();
- if(children != null && children.size() > 1) {
- Object firstChild = children.get(0);
- if(firstChild instanceof InteractionOperandEditPart) {
- InteractionOperandEditPart firstOperandChild = (InteractionOperandEditPart)firstChild;
- Object firstChildModel = firstOperandChild.getModel();
- if(firstChildModel != null && firstChildModel.equals(event.getOldValue())) {
- InteractionOperandEditPart secondOperandChild = (InteractionOperandEditPart)children.get(1);
- secondOperandChild.setFirstOperand(true);
- }
- }
- }
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected void refreshBounds() {
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- Dimension size = new Dimension(width, height);
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- Point loc = new Point(x, y);
- ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-
- public boolean ignoreRequest(Request request) {
- if(request instanceof ChangeBoundsRequest && (request.getType().equals(RequestConstants.REQ_ADD) || request.getType().equals(RequestConstants.REQ_DROP))){
- List parts = ((ChangeBoundsRequest) request).getEditParts();
- if(parts != null){
- for(Object obj : parts)
- if(obj instanceof CommentEditPart || obj instanceof ConstraintEditPart || obj instanceof TimeObservationEditPart){
- return true;
- }
- }
- }
-
- return false;
- }
-
- public void showTargetFeedback(Request request) {
- if(ignoreRequest(request)) {
- return;
- }
-
- super.showTargetFeedback(request);
- }
-
- public Command getCommand(Request request) {
- if(ignoreRequest(request))
- return null;
-
- return super.getCommand(request);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentEditPart.java
deleted file mode 100644
index e51aac94137..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CombinedFragmentEditPart.java
+++ /dev/null
@@ -1,1733 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-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.DirectEditPolicy;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
-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.requests.CreateViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;
-import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.internal.parts.TextCellEditorEx;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.FillStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.datatype.GradientData;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.papyrus.infra.emf.appearance.helper.ShadowFigureHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentItemComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.CombinedFragmentFigure;
-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.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.InteractionOperatorKindCompatibleMapping;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineCoveredByUpdater;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.InteractionOperatorKind;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CombinedFragmentEditPart extends InteractionFragmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3004;
-
- /**
- * Title for dialog of bloc operator modification error
- */
- private static final String FORBIDDEN_ACTION = "Forbidden action"; //$NON-NLS-1$
-
- /**
- * Message for dialog of block operator modification
- */
- private static final String BLOCK_OPERATOR_MODIFICATION_MSG = "It's impossible to change the operator kind of the combined fragment\nbecause the combined fragment has more than one operand"; //$NON-NLS-1$
-
- /**
- * Message for dialog of block forbidden operator modification
- */
- private static final String FORBIDEN_OPERATOR_MODIFICATION_MSG = "It's impossible to configure combined fragment as consider or ignore.\nUse ConsiderIgnoreFragment instead"; //$NON-NLS-1$
-
- /**
- * Message for dialog of block forbidden operand addition
- */
- private static final String BLOCK_OPERAND_ADDITION_MSG = "It's impossible to add more than one operand on opt, loop, break, neg combined fragment"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public CombinedFragmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CombinedFragmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new CombinedFragmentItemComponentEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new SequenceGraphicalNodeEditPolicy());
- // 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);
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new CombinedFragmentDirectEditPolicy());
- }
-
- /**
- * @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 not for handle operator kind
- *
- * @generated NOT
- */
- protected IFigure createNodeShape() {
- primaryShape = new CombinedFragmentFigure();
- updateHeaderLabel();
- return primaryShape;
- }
-
- /**
- * @generated
- */
- public CombinedFragmentFigure getPrimaryShape() {
- return (CombinedFragmentFigure)primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
-
- if(childEditPart instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((CombinedFragmentCombinedFragmentCompartmentEditPart)childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.remove(((CombinedFragmentCombinedFragmentCompartmentEditPart)childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if(editPart instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
- return getPrimaryShape().getCompartmentFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "CombinedFragment";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new AnchorHelper.CombinedFragmentNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model so you may safely remove
- * <i>generated</i> tag and modify it.
- *
- * @generated
- */
- @Override
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane. Respects layout one may have set
- * for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if(nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if(contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if(primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated NOT
- */
- @Override
- protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- } else if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("CombinedFragment", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("CombinedFragment", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("CombinedFragment", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("CombinedFragment", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
- if(request instanceof CreateViewAndElementRequest) {
- CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
- IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
- if(type == UMLElementTypes.InteractionOperand_3005) {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID));
- }
- }
- return super.getTargetEditPart(request);
- }
-
- public List<InteractionOperandEditPart> getOperandChildrenEditParts() {
- List<InteractionOperandEditPart> children = new LinkedList<InteractionOperandEditPart>();
-
- IGraphicalEditPart compartment = getChildBySemanticHint(String.valueOf(CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID));
- if(compartment instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
-
- for(Object ep : compartment.getChildren()) {
- if(ep instanceof InteractionOperandEditPart) {
- children.add((InteractionOperandEditPart)ep);
- }
- }
- }
- return children;
- }
-
- /**
- * Handle for interaction operator, operator kind and covered lifelines
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- Object feature = notification.getFeature();
-
- if(UMLPackage.eINSTANCE.getCombinedFragment_InteractionOperator().equals(feature)) {
- CombinedFragment combinedFragment = (CombinedFragment)resolveSemanticElement();
- String newStringValue = notification.getNewStringValue();
- if(notification.getOldValue() instanceof InteractionOperatorKind && !isAllowedInteractionOperator(newStringValue)) {
- MessageDialog.openError(Display.getCurrent().getActiveShell(), FORBIDDEN_ACTION, FORBIDEN_OPERATOR_MODIFICATION_MSG);
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), SetCommand.create(getEditingDomain(), combinedFragment, feature, notification.getOldValue()), true);
- return;
- }
- EList<InteractionOperand> operands = combinedFragment.getOperands();
- if(operands == null || operands.size() <= 1) {
- // If CombinedFragment have no operand, we can change the
- // OperatorKind
- updateHeaderLabel();
- } else {
- if(notification.getOldValue() instanceof InteractionOperatorKind) {
- InteractionOperatorKind newValue = (InteractionOperatorKind)notification.getNewValue();
- if(!InteractionOperatorKindCompatibleMapping.supportMultiOperand(newValue)) {
- MessageDialog.openError(Display.getCurrent().getActiveShell(), FORBIDDEN_ACTION, BLOCK_OPERATOR_MODIFICATION_MSG);
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), SetCommand.create(getEditingDomain(), combinedFragment, feature, notification.getOldValue()), true);
- } else {
- updateHeaderLabel();
- }
- }
- }
- /*
- * else if(notification.getOldValue() instanceof InteractionOperatorKind &&
- * !newStringValue.equals(getPrimaryShape().getHeaderLabel().getText())) {
- * MessageDialog.openError(Display.getCurrent().getActiveShell(), FORBIDDEN_ACTION, BLOCK_OPERATOR_MODIFICATION_MSG);
- * CommandHelper.executeCommandWithoutHistory(getEditingDomain(), SetCommand.create(getEditingDomain(), combinedFragment, feature,
- * notification.getOldValue()));
- * return;
- * }
- */
- // update guards on enclosed operands
- for(InteractionOperandEditPart ioep : getOperandChildrenEditParts()) {
- ioep.getPrimaryShape().updateConstraintLabel();
- }
- } else if(UMLPackage.eINSTANCE.getCombinedFragment_Operand().equals(feature)) {
- // Case only call by the model explorer
- CombinedFragment combinedFragment = (CombinedFragment)resolveSemanticElement();
- InteractionOperatorKind interactionOperator = combinedFragment.getInteractionOperator();
- Object newValue = notification.getNewValue();
- if(interactionOperator != null && newValue != null) {
- if(InteractionOperatorKind.OPT_LITERAL.equals(interactionOperator) || InteractionOperatorKind.LOOP_LITERAL.equals(interactionOperator) || InteractionOperatorKind.BREAK_LITERAL.equals(interactionOperator) || InteractionOperatorKind.NEG_LITERAL.equals(interactionOperator)) {
- EList<InteractionOperand> operands = combinedFragment.getOperands();
- if(operands != null && operands.size() > 1) {
- // Case of there is already an operand on opt, loop, break and neg
- // CombinedFragment type
- MessageDialog.openError(Display.getCurrent().getActiveShell(), FORBIDDEN_ACTION, BLOCK_OPERAND_ADDITION_MSG);
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), RemoveCommand.create(getEditingDomain(), combinedFragment, feature, newValue), true);
- return;
- }
- }
- }
- } else if(UMLPackage.eINSTANCE.getInteractionFragment_Covered().equals(feature)) {
- if(notification.getNotifier() instanceof CombinedFragment) {
- // Synchronize operands' covered lifelines with combined fragment's covered lifelines
- CombinedFragment combinedFragment = (CombinedFragment)notification.getNotifier();
- EList<Lifeline> combinedFragmentCoveredLifelines = combinedFragment.getCovereds();
- for(InteractionOperand operand : combinedFragment.getOperands()) {
- EList<Lifeline> operandCoveredLifelines = operand.getCovereds();
- if(!operandCoveredLifelines.equals(combinedFragmentCoveredLifelines)) {
- // Add new covered lifelines (not already covered)
- List<Lifeline> coveredLifelinesToAdd = new ArrayList<Lifeline>(combinedFragmentCoveredLifelines);
- coveredLifelinesToAdd.removeAll(operandCoveredLifelines);
- if(!coveredLifelinesToAdd.isEmpty()) {
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), AddCommand.create(getEditingDomain(), operand, UMLPackage.eINSTANCE.getInteractionFragment_Covered(), coveredLifelinesToAdd), true);
- }
-
- // Delete old covered lifelines (not covered anymore)
- List<Lifeline> coveredLifelinesToRemove = new ArrayList<Lifeline>(operandCoveredLifelines);
- coveredLifelinesToRemove.removeAll(combinedFragmentCoveredLifelines);
- if(!coveredLifelinesToRemove.isEmpty()) {
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), RemoveCommand.create(getEditingDomain(), operand, UMLPackage.eINSTANCE.getInteractionFragment_Covered(), coveredLifelinesToRemove), true);
- }
- }
- }
- }
- } else if(UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature)) {
- if(notification.getNotifier() instanceof CombinedFragment) {
- refreshLabel();
- }
- }
- super.handleNotificationEvent(notification);
- //fixed bug (id=364711) when bounds changed update coveredBys with the figure's bounds.
- if(notification.getNotifier() instanceof Bounds) {
- if(notification.getNotifier() instanceof Bounds) {
- Display.getDefault().asyncExec(new Runnable() {
-
- public void run() {
- LifelineCoveredByUpdater updater = new LifelineCoveredByUpdater();
- updater.update(CombinedFragmentEditPart.this);
- }
- });
- }
- }
-
- if((getModel() != null) && (getModel() == notification.getNotifier())) {
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
-
- if(resolveSemanticElement() != null) {
- refreshShadow();
- }
- }
-
- protected void refreshShadow() {
- getPrimaryShape().setShadow(ShadowFigureHelper.getShadowFigureValue((View)getModel()));
- }
-
- /**
- * Override to set the transparency to the correct figure
- */
- @Override
- protected void setTransparency(int transp) {
- getPrimaryShape().setTransparency(transp);
- }
-
- /**
- * Override to set the gradient data to the correct figure
- */
- @Override
- protected void setGradient(GradientData gradient) {
- IPapyrusNodeFigure fig = getPrimaryShape();
- FillStyle style = (FillStyle)getPrimaryView().getStyle(NotationPackage.Literals.FILL_STYLE);
- if(gradient != null) {
- fig.setIsUsingGradient(true);;
- fig.setGradientData(style.getFillColor(), gradient.getGradientColor1(), gradient.getGradientStyle());
- } else {
- fig.setIsUsingGradient(false);
- }
- }
-
- @Override
- public boolean supportsGradient() {
- return true;
- }
-
- @Override
- protected void setBackgroundColor(Color c) {
- PapyrusNodeFigure fig = getPrimaryShape();
- fig.setBackgroundColor(c);
- fig.setIsUsingGradient(false);
- fig.setGradientData(-1, -1, 0);
- }
-
- /**
- * Update header label
- */
- protected void updateHeaderLabel() {
- Object element = resolveSemanticElement();
- if(element instanceof CombinedFragment) {
- CombinedFragment combinedFragment = (CombinedFragment)element;
- String operatorKind = combinedFragment.getInteractionOperator().getName();
- getPrimaryShape().getHeaderLabel().setText(operatorKind);
- }
- }
-
- /**
- * Return true if the InteractionOperatorKind is allowed
- *
- * @param interactionOperatorLiteral
- * The InteractionOperator to test
- * @return true if allowed
- */
- protected boolean isAllowedInteractionOperator(String interactionOperatorLiteral) {
- return !(InteractionOperatorKind.CONSIDER_LITERAL.getLiteral().equals(interactionOperatorLiteral) || InteractionOperatorKind.IGNORE_LITERAL.getLiteral().equals(interactionOperatorLiteral));
- }
-
- IEclipsePreferences.IPreferenceChangeListener propertyListener;
-
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- if(this.propertyListener == null) {
- this.propertyListener = new IEclipsePreferences.IPreferenceChangeListener() {
-
- public void preferenceChange(PreferenceChangeEvent event) {
- handlePreferenceChange(event);
- }
- };
- InstanceScope.INSTANCE.getNode("org.eclipse.papyrus.infra.gmfdiag.preferences").addPreferenceChangeListener(this.propertyListener);
- }
- }
-
- protected void handlePreferenceChange(PreferenceChangeEvent event) {
- if(getParent() == null) {
- return;
- }
-
- String key = event.getKey();
- if(key.equals(getTitlePreferenceKey())) {
- refreshLabel();
- }
- }
-
- public String getTitlePreferenceKey() {
- return "ELEMENT_PapyrusUMLSequenceDiagram_CombinedFragment_CombinedFragmentCompartment.compartment_name.visibility";
- }
-
- public WrappingLabel getTitleLabel() {
- return getPrimaryShape().getTitleLabel();
- }
-
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- }
-
- // update label visibility and text
- private void refreshLabel() {
- Object element = resolveSemanticElement();
- if(element instanceof CombinedFragment) {
- CombinedFragment combinedFragment = (CombinedFragment)element;
- String name = combinedFragment.getName();
- WrappingLabel label = getPrimaryShape().getTitleLabel();
- label.setText(name);
-
- ScopedPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.papyrus.infra.gmfdiag.preferences");
- String visible = store.getString(getTitlePreferenceKey());
- label.setVisible("true".equals(visible));
- }
- }
-
- private DirectEditManager manager;
-
- private IParser parser;
-
- protected DirectEditManager getManager() {
- if(manager == null) {
- WrappingLabel label = this.getPrimaryShape().getTitleLabel();
- manager = new TextDirectEditManager(this, TextCellEditorEx.class, new UMLEditPartFactory.TextCellEditorLocator(label) {
-
- @Override
- public void relocate(CellEditor celleditor) {
- Text text = (Text)celleditor.getControl();
- Rectangle rect = getWrapLabel().getBounds().getCopy();
- getWrapLabel().translateToAbsolute(rect);
- Point right = rect.getRight();
-
- if(!text.getFont().isDisposed()) {
- if(getWrapLabel().isTextWrapOn() && getWrapLabel().getText().length() > 0) {
- rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT)));
- } else {
- int avr = FigureUtilities.getFontMetrics(text.getFont()).getAverageCharWidth();
- rect.setSize(new Dimension(text.computeSize(SWT.DEFAULT, SWT.DEFAULT)).expand(avr * 2, 0));
- }
- if(rect.getRight().x > right.x) { // should not exceed right border
- rect.translate(right.x - rect.getRight().x, 0);
- }
- }
- if(!rect.equals(new Rectangle(text.getBounds()))) {
- text.setBounds(rect.x, rect.y, rect.width, rect.height);
- }
- }
- });
- }
- return manager;
- }
-
- @Override
- protected void performDirectEditRequest(Request request) {
- if(request instanceof DirectEditRequest) {
- WrappingLabel label = getPrimaryShape().getTitleLabel();
- Point location = ((DirectEditRequest)request).getLocation().getCopy();
- label.translateToRelative(location); // convert request location to relative
- if(label.containsPoint(location)) {
- getManager().show();
- }
- }
- }
-
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- public IParser getParser() {
- if(parser == null) {
- parser = new CombinedFragmentTitleParser();
- }
- return parser;
- }
-
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- public void setLabelText(String text) {
- WrappingLabel label = this.getPrimaryShape().getTitleLabel();
- label.setText(text);
- }
-
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- if(element != null && parser != null) {
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- }
- }
- }
- return null;
- }
- };
- }
-
- class CombinedFragmentDirectEditPolicy extends DirectEditPolicy {
-
- @Override
- protected Command getDirectEditCommand(DirectEditRequest edit) {
- String labelText = (String)edit.getCellEditor().getValue();
-
- //for CellEditor, null is always returned for invalid values
- if(labelText == null) {
- return null;
- }
-
- ITextAwareEditPart compartment = (ITextAwareEditPart)getHost();
- EObject model = (EObject)compartment.getModel();
- EObjectAdapter elementAdapter = null;
- if(model instanceof View) {
- View view = (View)model;
- elementAdapter = new EObjectAdapterEx(ViewUtil.resolveSemanticElement(view), view);
- } else {
- elementAdapter = new EObjectAdapterEx(model, null);
- }
-
- String prevText = compartment.getParser().getEditString(elementAdapter, compartment.getParserOptions().intValue());
- // check to make sure an edit has occurred before returning a command.
- if(!prevText.equals(labelText)) {
- ICommand iCommand = compartment.getParser().getParseCommand(elementAdapter, labelText, 0);
- return new ICommandProxy(iCommand);
- }
-
- return null;
- }
-
- @Override
- protected void showCurrentEditValue(DirectEditRequest request) {
- String value = (String)request.getCellEditor().getValue();
- WrappingLabel label = getPrimaryShape().getTitleLabel();
- label.setText(value);
- }
- }
-
- static class CombinedFragmentTitleParser extends MessageFormatParser implements ISemanticParser {
-
- public CombinedFragmentTitleParser() {
- super(new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- public List getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if(element instanceof CombinedFragment) {
- CombinedFragment cf = (CombinedFragment)element;
- semanticElementsBeingParsed.add(cf);
- }
- return semanticElementsBeingParsed;
- }
-
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- Object adapter = element.getAdapter(EObject.class);
- if(adapter instanceof CombinedFragment) {
- CombinedFragment cf = (CombinedFragment)adapter;
- return cf.getName();
- }
- return "";
- }
-
- @Override
- public IParserEditStatus isValidEditString(IAdaptable adapter, String editString) {
- return ParserEditStatus.EDITABLE_STATUS;
- }
-
- @Override
- public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
- EObject element = (EObject)adapter.getAdapter(EObject.class);
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(element);
- if(editingDomain == null || !(element instanceof CombinedFragment)) {
- return UnexecutableCommand.INSTANCE;
- }
- SetRequest request = new SetRequest(element, UMLPackage.eINSTANCE.getNamedElement_Name(), newString);
- return new SetValueCommand(request);
- }
-
- @Override
- public String getEditString(IAdaptable element, int flags) {
- Object adapter = element.getAdapter(EObject.class);
- if(adapter instanceof CombinedFragment) {
- CombinedFragment cf = (CombinedFragment)adapter;
- return cf.getName();
- }
- return "";
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if(notification instanceof Notification) {
- Object feature = ((Notification)notification).getFeature();
- if(feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature)feature;
- }
- }
- return featureImpl;
- }
-
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature);
- }
- }
-
- static class EObjectAdapterEx extends EObjectAdapter {
-
- private View view = null;
-
- /**
- * constructor
- *
- * @param element
- * element to be wrapped
- * @param view
- * view to be wrapped
- */
- public EObjectAdapterEx(EObject element, View view) {
- super(element);
- this.view = view;
- }
-
- @Override
- public Object getAdapter(Class adapter) {
- Object o = super.getAdapter(adapter);
- if(o != null) {
- return o;
- }
- if(adapter.equals(View.class)) {
- return view;
- }
- return null;
- }
- }
-
- @Override
- public EditPolicy getPrimaryDragEditPolicy() {
- EditPolicy policy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- return policy != null ? policy : new ResizableShapeEditPolicyEx();
- }
-
- static class ResizableShapeEditPolicyEx extends ResizableShapeEditPolicy {
-
- @Override
- protected void showChangeBoundsFeedback(ChangeBoundsRequest request) {
- IFigure feedback = getDragSourceFeedbackFigure();
-
- PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
- getHostFigure().translateToAbsolute(rect);
- Rectangle old = rect.getCopy();
- rect.translate(request.getMoveDelta());
- rect.resize(request.getSizeDelta());
-
- 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);
-
- if(min.width > rect.width) {
- rect.width = min.width;
- if(request.getMoveDelta().x > 0 && request.getSizeDelta().width < 0) { // shrinking from left
- rect.x = old.getRight().x - min.width;
- request.getMoveDelta().x = rect.x - old.getLeft().x;
- }
- } else if(max.width < rect.width) {
- rect.width = max.width;
- }
-
- if(min.height > rect.height) {
- rect.height = min.height;
- if(request.getMoveDelta().y > 0 && request.getSizeDelta().height < 0) { // shrinking from upper
- rect.y = old.getBottom().y - min.height;
- request.getMoveDelta().y = rect.y - old.getTop().y;
- }
- } else if(max.height < rect.height) {
- rect.height = max.height;
- }
-
- feedback.translateToRelative(rect);
- feedback.setBounds(rect);
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentAnnotatedElementEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentAnnotatedElementEditPart.java
deleted file mode 100644
index 8f4a97a0ea6..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentAnnotatedElementEditPart.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
-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.figures.PolylineConnectionEx;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CommentAnnotatedElementItemSemanticEditPolicy;
-
-/**
- * @generated
- */
-public class CommentAnnotatedElementEditPart extends ConnectionNodeEditPart
-
-implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4010;
-
- /**
- * @generated
- */
- public CommentAnnotatedElementEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentAnnotatedElementItemSemanticEditPolicy());
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
-
- protected Connection createConnectionFigure() {
- return new CommentLinkDescriptor();
- }
-
- /**
- * @generated
- */
- public CommentLinkDescriptor getPrimaryShape() {
- return (CommentLinkDescriptor)getFigure();
- }
-
- /**
- * @generated
- */
- public class CommentLinkDescriptor extends PolylineConnectionEx {
-
- /**
- * @generated
- */
- public CommentLinkDescriptor() {
- this.setLineStyle(Graphics.LINE_DASH);
-
- }
-
- }
-
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
- Object feature = notification.getFeature();
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
-
- protected void setLineWidth(int width) {
- getPrimaryShape().setLineWidth(width);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentBodyEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentBodyEditPart.java
deleted file mode 100644
index ea2a22ef237..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentBodyEditPart.java
+++ /dev/null
@@ -1,758 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class CommentBodyEditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5006;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public CommentBodyEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.NodeLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(HTMLCornerBentFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Comment_3009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentBodyEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentEditPart.java
deleted file mode 100644
index 677f93ee81b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CommentEditPart.java
+++ /dev/null
@@ -1,1144 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CommentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class CommentEditPart extends
-
-AbstractCommentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3009;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public CommentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- 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() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new HTMLCornerBentFigure();
- }
-
- /**
- * @generated
- */
- public HTMLCornerBentFigure getPrimaryShape() {
- return (HTMLCornerBentFigure)primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof CommentBodyEditPart) {
- ((CommentBodyEditPart)childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof CommentBodyEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "Comment";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if(nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- 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) {
- if(primaryShape instanceof NodeFigure){
- ((NodeFigure)primaryShape).setLineWidth(width);
- }else if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Comment", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Comment", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Comment", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("Comment", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConsiderIgnoreFragmentEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConsiderIgnoreFragmentEditPart.java
deleted file mode 100644
index ef41e739327..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConsiderIgnoreFragmentEditPart.java
+++ /dev/null
@@ -1,1113 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-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.CombinedFragmentItemComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ConsiderIgnoreFragmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.CombinedFragmentFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.NotificationHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.ConsiderIgnoreFragment;
-import org.eclipse.uml2.uml.InteractionOperatorKind;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.Reception;
-import org.eclipse.uml2.uml.Signal;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ConsiderIgnoreFragmentEditPart extends CombinedFragmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3007;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * Notfier for listen and unlistend model element.
- */
- private NotificationHelper notifier = new NotificationHelper(new UIAdapterImpl() {
-
- @Override
- protected void safeNotifyChanged(Notification msg) {
- handleNotificationEvent(msg);
- }
- });
-
- /**
- * @generated
- */
- public ConsiderIgnoreFragmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConsiderIgnoreFragmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new CombinedFragmentItemComponentEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- */
- protected IFigure createNodeShape() {
- primaryShape = super.createNodeShape();
- return primaryShape;
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT
- */
- public CombinedFragmentFigure getPrimaryShape() {
- return super.getPrimaryShape();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "ConsiderIgnoreFragment";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new AnchorHelper.CombinedFragmentNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model so you may safely remove
- * <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane. Respects layout one may have set
- * for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated NOT
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- return super.setupContentPane(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 NOT
- */
- protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure){
- ((NodeFigure)primaryShape).setLineWidth(width);
- }else if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("ConsiderIgnoreFragment", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("ConsiderIgnoreFragment", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("ConsiderIgnoreFragment", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("ConsiderIgnoreFragment", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * Handle for message
- */
- protected void handleNotificationEvent(Notification notification) {
- Object feature = notification.getFeature();
-
- if(UMLPackage.eINSTANCE.getConsiderIgnoreFragment_Message().equals(feature)) {
- // Handle message creation
- Object newValue = notification.getNewValue();
- // TODO Filter NamedElements type for message on higher level
- if(newValue == null || newValue instanceof Operation || newValue instanceof Reception || newValue instanceof Signal) {
- updateHeaderLabel();
- notifier.unlistenObject((Notifier)notification.getOldValue());
- notifier.listenObject((Notifier)notification.getNewValue());
- } else {
- ConsiderIgnoreFragment considerIgnoreFragment = (ConsiderIgnoreFragment)resolveSemanticElement();
- considerIgnoreFragment.getMessages().remove(newValue);
- }
- } else if(UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature)) {
- // Handle message modification
- updateHeaderLabel();
- }
-
- super.handleNotificationEvent(notification);
- }
-
- /**
- * Update operator kind
- */
- protected void updateHeaderLabel() {
- ConsiderIgnoreFragment considerIgnoreFragment = (ConsiderIgnoreFragment)resolveSemanticElement();
- StringBuilder operatorKind = new StringBuilder();
- operatorKind.append(considerIgnoreFragment.getInteractionOperator().getName());
- EList<NamedElement> messages = considerIgnoreFragment.getMessages();
- if(messages != null && messages.size() > 0) {
- StringBuilder sb = new StringBuilder();
- for(int i = 0; i < messages.size(); i++) {
- String name = messages.get(i).getName();
- if(name != null) {
- sb.append(name).append(",");
- }
- }
- if(sb.length() > 0) {
- operatorKind.append(" {").append(sb.deleteCharAt(sb.length() - 1).toString()).append("}");
- }
- }
-
- getPrimaryShape().getHeaderLabel().setText(operatorKind.toString());
- }
-
- /**
- * Return true if the InteractionOperatorKind is allowed
- *
- * @param interactionOperatorLiteral
- * The InteractionOperator to test
- * @return true if allowed
- */
- protected boolean isAllowedInteractionOperator(String interactionOperatorLiteral) {
- return InteractionOperatorKind.CONSIDER_LITERAL.getLiteral().equals(interactionOperatorLiteral) || InteractionOperatorKind.IGNORE_LITERAL.getLiteral().equals(interactionOperatorLiteral);
- }
-
- /**
- * Activate a listener for the interactionUse to Handle notification in the refered Interaction
- */
- public void activate() {
- super.activate();
- ConsiderIgnoreFragment considerIgnoreFragment = (ConsiderIgnoreFragment)resolveSemanticElement();
- for(NamedElement message : considerIgnoreFragment.getMessages()) {
- notifier.listenObject(message);
- }
- }
-
- /**
- * Deactivate a listener for the interactionUse to Handle notification in the refered
- * Interaction
- */
- public void deactivate() {
- super.deactivate();
- notifier.unlistenAll();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void removeNotify() {
- notifier.unlistenAll();
- super.removeNotify();
-
- }
-
- public String getTitlePreferenceKey(){
- return "ELEMENT_PapyrusUMLSequenceDiagram_ConsiderIgnoreFragment_CombinedFragmentCompartment.compartment_name.visibility";
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Constraint2EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Constraint2EditPart.java
deleted file mode 100644
index 51c9ca19511..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Constraint2EditPart.java
+++ /dev/null
@@ -1,759 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class Constraint2EditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5012;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public Constraint2EditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.NodeLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(ConstraintFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_3008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Constraint2EditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintConstrainedElementEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintConstrainedElementEditPart.java
deleted file mode 100644
index 378e4e264d4..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintConstrainedElementEditPart.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
-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.figures.PolylineConnectionEx;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ConstraintConstrainedElementItemSemanticEditPolicy;
-
-/**
- * @generated
- */
-public class ConstraintConstrainedElementEditPart extends ConnectionNodeEditPart
-
-implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4011;
-
- /**
- * @generated
- */
- public ConstraintConstrainedElementEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintConstrainedElementItemSemanticEditPolicy());
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
-
- protected Connection createConnectionFigure() {
- return new ConstraintLinkDescriptor();
- }
-
- /**
- * @generated
- */
- public ConstraintLinkDescriptor getPrimaryShape() {
- return (ConstraintLinkDescriptor)getFigure();
- }
-
- /**
- * @generated
- */
- public class ConstraintLinkDescriptor extends PolylineConnectionEx {
-
- /**
- * @generated
- */
- public ConstraintLinkDescriptor() {
- this.setLineStyle(Graphics.LINE_DASH);
-
- }
-
- }
-
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
- Object feature = notification.getFeature();
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
-
- protected void setLineWidth(int width) {
- getPrimaryShape().setLineWidth(width);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintEditPart.java
deleted file mode 100644
index 646edf240ee..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintEditPart.java
+++ /dev/null
@@ -1,1185 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.FillStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ConstraintItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ConstraintEditPart extends
-
-AbstractConstraintEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3008;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ConstraintEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- if(event.getFeature() instanceof EReference){
- EReference ref = (EReference) event.getFeature();
- if("specification".equals(ref.getName()) ){
- List parts = getChildren();
- for(Object p : parts)
- if(p instanceof Constraint2EditPart){
- ((Constraint2EditPart) p).handleNotificationEvent(event);
- }
- }
- }
- }
-
- protected void refreshLabel() {
- List parts = getChildren();
- for(Object p : parts)
- if(p instanceof Constraint2EditPart){
- ((Constraint2EditPart) p).refreshLabel();
- }
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new ConstraintFigure();
- }
-
- /**
- * @generated
- */
- public ConstraintFigure getPrimaryShape() {
- return (ConstraintFigure)primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof ConstraintNameEditPart) {
- ((ConstraintNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- if(childEditPart instanceof Constraint2EditPart) {
- ((Constraint2EditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof ConstraintNameEditPart) {
- return true;
- }
- if(childEditPart instanceof Constraint2EditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "Constraint";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- figure.setForegroundColor(ColorConstants.black); // fix constraint link color
- figure.setBackgroundColor(ColorConstants.black);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if(nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- 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) {
- if(primaryShape instanceof NodeFigure){
- ((NodeFigure)primaryShape).setLineWidth(width);
- }else if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Constraint", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Constraint", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Constraint", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("Constraint", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshTransparency();
- }
-
- protected void refreshTransparency() {
- FillStyle style = (FillStyle)getPrimaryView().getStyle(NotationPackage.Literals.FILL_STYLE);
- if ( style != null ) {
- setTransparency(style.getTransparency());
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintNameEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintNameEditPart.java
deleted file mode 100644
index 3a3282b3851..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ConstraintNameEditPart.java
+++ /dev/null
@@ -1,757 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class ConstraintNameEditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5005;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public ConstraintNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.NodeLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_3008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintNameEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationEditPart.java
deleted file mode 100644
index 184d7cf1d4b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationEditPart.java
+++ /dev/null
@@ -1,1144 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.RoundedRectangle;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart;
-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.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ContinuationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.locator.ContinuationLocator;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ContinuationEditPart extends
-
-AbstractBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3016;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ContinuationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ContinuationItemSemanticEditPolicy());
- 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);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new ContinuationFigure();
- }
-
- /**
- * @generated
- */
- public ContinuationFigure getPrimaryShape() {
- return (ContinuationFigure)primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof ContinuationNameEditPart) {
- ((ContinuationNameEditPart)childEditPart).setLabel(getPrimaryShape().getFigureContinuationNameLabel());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof ContinuationNameEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "Continuation";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- //FIXME: workaround for #154536
- result.getBounds().setSize(result.getPreferredSize());
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- @Override
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if(nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if(contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if(primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ContinuationNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public class ContinuationFigure extends RoundedRectangle {
-
- /**
- * @generated
- */
- private CenteredWrappedLabel fFigureContinuationNameLabel;
-
- /**
- * @generated
- */
- public ContinuationFigure() {
-
- CenterLayout layoutThis = new CenterLayout();
-
- this.setLayoutManager(layoutThis);
-
- this.setCornerDimensions(new Dimension(getMapMode().DPtoLP(50), getMapMode().DPtoLP(50)));
- createContents();
- }
-
- /**
- * @generated
- */
- private void createContents() {
-
- fFigureContinuationNameLabel = new CenteredWrappedLabel();
-
- this.add(fFigureContinuationNameLabel);
-
- }
-
- /**
- * @generated
- */
- public CenteredWrappedLabel getFigureContinuationNameLabel() {
- return fFigureContinuationNameLabel;
- }
-
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Continuation", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Continuation", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Continuation", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("Continuation", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * Overrides to manage the position of the Continuation
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
-
- if(UMLPackage.eINSTANCE.getContinuation_Setting().equals(notification.getFeature())) {
- IBorderItemLocator borderItemLocator = getBorderItemLocator();
- int newValue = (Boolean)notification.getNewValue() ? PositionConstants.SOUTH : PositionConstants.NORTH;
- if(borderItemLocator instanceof ContinuationLocator) {
- ((ContinuationLocator)borderItemLocator).setPreferredSideOfParent(newValue);
- // Refresh the position of the figure
- borderItemLocator.relocate(this.getFigure());
- }
- }
- super.handleNotificationEvent(notification);
-
- Object feature = notification.getFeature();
- if((getModel() != null) && (getModel() == notification.getNotifier())) {
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
- }
-
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLineWidth();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationNameEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationNameEditPart.java
deleted file mode 100644
index c5e7e0d898d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ContinuationNameEditPart.java
+++ /dev/null
@@ -1,778 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
-import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class ContinuationNameEditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5007;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public ContinuationNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.NodeLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(CenteredWrappedLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
-
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
- return UMLElementTypes.getImage(parserElement.eClass());
- }
- }
- return null;
-
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Continuation_3016, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationNameEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
- refreshLabel();
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java
deleted file mode 100644
index 4081d760c71..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DestructionOccurrenceSpecificationEditPart.java
+++ /dev/null
@@ -1,1042 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-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.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-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.editparts.AbstractBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DestructionEventComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DestructionOccurrenceSpecificationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.DestructionEventFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DestructionOccurrenceSpecificationEditPart extends
-
-AbstractBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3022;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DestructionOccurrenceSpecificationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DestructionOccurrenceSpecificationItemSemanticEditPolicy());
- installEditPolicy(org.eclipse.gef.EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(org.eclipse.gef.EditPolicy.COMPONENT_ROLE, new DestructionEventComponentEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected org.eclipse.gef.EditPolicy createChildEditPolicy(EditPart child) {
- org.eclipse.gef.EditPolicy result = child.getEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new DestructionEventFigure();
- }
-
- /**
- * @generated
- */
- public DestructionEventFigure getPrimaryShape() {
- return (DestructionEventFigure)primaryShape;
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "DestructionOccurrenceSpecification";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- //FIXME: workaround for #154536
- result.getBounds().setSize(result.getPreferredSize());
- return result;
- }
-
- protected void refreshBounds() {
- if (getBorderItemLocator() != null) {
- int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE
- .getLocation_X())).intValue();
- int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE
- .getLocation_Y())).intValue();
- Point loc = new Point(x, y);
-
- int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- Dimension size = new Dimension(width, height);
-
- if(width != -1 && height != -1)
- getFigure().setBounds(new Rectangle(loc, size));
- getBorderItemLocator().setConstraint(new Rectangle( loc, size));
- } else {
- super.refreshBounds();
- }
- }
-
- /**
- * @generated
- */
- public org.eclipse.gef.EditPolicy getPrimaryDragEditPolicy() {
- org.eclipse.gef.EditPolicy result = super.getPrimaryDragEditPolicy();
- if(result instanceof ResizableEditPolicy) {
- ResizableEditPolicy ep = (ResizableEditPolicy)result;
- ep.setResizeDirections(PositionConstants.NONE);
- }
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- 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) {
- getPrimaryShape().setLineWidth(width);
-// if(primaryShape instanceof Shape) {
-// ((Shape)primaryShape).setLineWidth(width);
-// }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.GeneralOrdering_4012);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.GeneralOrdering_4012);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.GeneralOrdering_4012) {
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(10);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- types.add(UMLElementTypes.GeneralOrdering_4012);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- } else if(relationshipType == UMLElementTypes.GeneralOrdering_4012) {
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DestructionOccurrenceSpecification", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DestructionOccurrenceSpecification", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DestructionOccurrenceSpecification", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("DestructionOccurrenceSpecification", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
-
- Object feature = notification.getFeature();
- if((getModel() != null) && (getModel() == notification.getNotifier())) {
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
- }
-
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLineWidth();
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java
deleted file mode 100644
index d3877b59fef..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,777 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated NOT implements IPapyrusEditPart
- */
-public class DurationConstraintAppliedStereotypeEditPart
-
-extends LabelEditPart
-
-implements ITextAwareEditPart, IBorderItemEditPart, IPapyrusEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5015;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public DurationConstraintAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
- }
-
- /**
- * @generated
- */
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if(parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator)constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- public void refreshBounds() {
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
-
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
- return UMLElementTypes.getImage(parserElement.eClass());
- }
- }
- return null;
-
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.DurationConstraint_3021, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new AppliedStereotypeWrappingLabelFigure();
- }
-
- /**
- * @generated NOT
- */
- public IFigure getPrimaryShape() {
- return getFigure();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java
deleted file mode 100644
index 234d4b31b8e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintEditPart.java
+++ /dev/null
@@ -1,1335 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PolylineShape;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart;
-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.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.LinesBorder;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DurationConstraintItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExternalLabelPrimaryDragRoleEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeRelatedSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DurationConstraintEditPart extends
-
-BorderedBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3021;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DurationConstraintEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationConstraintItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- // 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);
- }
-
-
- @Override
- protected void refreshBounds() {
- if (getBorderItemLocator() != null) {
- int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE
- .getLocation_X())).intValue();
- int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE
- .getLocation_Y())).intValue();
- Point loc = new Point(x, y);
-
- int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- if(width == -1){ // fix resize issue, the height is not able to smaller than prefer height due to width is -1
- width = getFigure().getPreferredSize(width,height).width;
- }
- Dimension size = new Dimension(width, height);
-
- getBorderItemLocator().setConstraint(new Rectangle(
- loc, size));
- } else {
- super.refreshBounds();
- }
-
- //fix combined fragment move
- this.getFigure().getParent().getLayoutManager().layout( this.getFigure().getParent());
- }
-
- /**
- * This method creates a specific edit policy for time realted elements
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart#getPrimaryDragEditPolicy()
- *
- * @return <code>EditPolicy</code>
- * @generated NOT
- */
- @Override
- public EditPolicy getPrimaryDragEditPolicy() {
- return new TimeRelatedSelectionEditPolicy();
- }
-
- /**
- * @generated NOT use ExternalLabelPrimaryDragRoleEditPolicy
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View)child.getModel();
- switch(UMLVisualIDRegistry.getVisualID(childView)) {
- case DurationConstraintLabelEditPart.VISUAL_ID:
- case DurationConstraintAppliedStereotypeEditPart.VISUAL_ID:
- // use ExternalLabelPrimaryDragRoleEditPolicy
- return new ExternalLabelPrimaryDragRoleEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new DurationConstraintFigure();
- }
-
- /**
- * @generated
- */
- public DurationConstraintFigure getPrimaryShape() {
- return (DurationConstraintFigure)primaryShape;
- }
-
- /**
- * @generated NOT use ExternalLabelPositionLocator
- */
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if(borderItemEditPart instanceof DurationConstraintLabelEditPart || borderItemEditPart instanceof DurationConstraintAppliedStereotypeEditPart) {
- //use ExternalLabelPositionLocator
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "DurationConstraint";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- //FIXME: workaround for #154536
- result.getBounds().setSize(result.getPreferredSize());
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- 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) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationConstraintLabelEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public class DurationConstraintFigure extends RectangleFigure {
-
- /**
- * Height of the arrow end
- *
- * @generated NOT
- */
- private static final int ARROW_HEIGHT = 8;
-
- /**
- * Width of the half of the arrow end
- *
- * @generated NOT
- */
- private static final int ARROW_SEMI_WIDTH = 7;
-
- /**
- * @generated
- */
- private PolylineShape fDurationArrow;
-
- /**
- * @generated
- */
- public DurationConstraintFigure() {
-
- CenterLayout layoutThis = new CenterLayout();
-
- this.setLayoutManager(layoutThis);
-
- this.setFill(false);
- this.setOutline(false);
- this.setPreferredSize(new Dimension(getMapMode().DPtoLP(40), getMapMode().DPtoLP(-1)));
- this.setBorder(createBorder0());
- createContents();
- }
-
- /**
- * Sets the bounds of this Figure to the Rectangle <i>rect</i>.
- * This also updates sub-figures.
- *
- * @see Figure#setBounds(Rectangle)
- * @param rect
- * The new bounds
- * @generated NOT
- */
- public void setBounds(Rectangle rect) {
- updateArrow(rect.width, rect.height);
- super.setBounds(rect);
- }
-
- /**
- * Update the arrow polyline taking in account new figure's size
- *
- * @param figureWidth
- * the new figure width
- * @param figureHeight
- * the new figure height
- * @generated NOT
- */
- public void updateArrow(int figureWidth, int figureHeight) {
- // handle insets to avoid figure growing indefinitely
- figureWidth -= getInsets().left + getInsets().right;
- figureHeight -= getInsets().top + getInsets().bottom;
- if(getDurationArrow() != null) {
- PointList points = new PointList(8);
- points.addPoint(figureWidth / 2 - ARROW_SEMI_WIDTH, getLineWidth() / 2 + ARROW_HEIGHT);
- points.addPoint(figureWidth / 2, getLineWidth() / 2);
- points.addPoint(figureWidth / 2 + ARROW_SEMI_WIDTH, getLineWidth() / 2 + ARROW_HEIGHT);
-
- points.addPoint(figureWidth / 2, getLineWidth() / 2);
- points.addPoint(figureWidth / 2, figureHeight - getLineWidth() /2 );
-
- points.addPoint(figureWidth / 2 - ARROW_SEMI_WIDTH, figureHeight - getLineWidth() / 2 - ARROW_HEIGHT);
- points.addPoint(figureWidth / 2, figureHeight - getLineWidth() / 2);
- points.addPoint(figureWidth / 2 + ARROW_SEMI_WIDTH, figureHeight - getLineWidth() / 2 - ARROW_HEIGHT);
- getDurationArrow().setPoints(points);
- Point topLeft = getLocation().getTranslated(getInsets().left, getInsets().top);
- getDurationArrow().setBounds(new Rectangle(topLeft, new Dimension(figureWidth, figureHeight)));
- }
- }
-
- /**
- * @generated
- */
- private void createContents() {
-
- fDurationArrow = new PolylineShape();
- fDurationArrow.addPoint(new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0)));
- fDurationArrow.addPoint(new Point(getMapMode().DPtoLP(10), getMapMode().DPtoLP(0)));
-
- this.add(fDurationArrow);
-
- }
-
- /**
- * @generated
- */
- private Border createBorder0() {
- LinesBorder result = new LinesBorder();
-
- result.setSides(PositionConstants.TOP | PositionConstants.BOTTOM);
-
- return result;
- }
-
- /**
- * @generated
- */
- public PolylineShape getDurationArrow() {
- return fDurationArrow;
- }
-
-
- public void paintFigure(Graphics graphics) {
- graphics.setLineWidth(lineWidth);
- super.paintFigure(graphics);
- }
-
- @Override
- public void setLineWidth(int w) {
- LinesBorder lb = (LinesBorder)getBorder();
- lb.setWidth(w);
- fDurationArrow.setLineWidth(w);
- super.setLineWidth(w);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DurationConstraint", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DurationConstraint", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DurationConstraint", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("DurationConstraint", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @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
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
-
- Object feature = notification.getFeature();
- if((getModel() != null) && (getModel() == notification.getNotifier())) {
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
- }
-
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLineWidth();
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java
deleted file mode 100644
index 3a4c63a51b9..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,777 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated NOT implements IPapyrusEditPart
- */
-public class DurationConstraintInMessageAppliedStereotypeEditPart
-
-extends LabelEditPart
-
-implements ITextAwareEditPart, IBorderItemEditPart, IPapyrusEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5019;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public DurationConstraintInMessageAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
- }
-
- /**
- * @generated
- */
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if(parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator)constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- public void refreshBounds() {
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
-
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
- return UMLElementTypes.getImage(parserElement.eClass());
- }
- }
- return null;
-
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.DurationConstraint_3023, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new AppliedStereotypeWrappingLabelFigure();
- }
-
- /**
- * @generated NOT
- */
- public IFigure getPrimaryShape() {
- return getFigure();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java
deleted file mode 100644
index 728d59864c7..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageEditPart.java
+++ /dev/null
@@ -1,1237 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editparts.AbstractConnectionEditPart;
-import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DurationConstraintInMessageItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExternalLabelPrimaryDragRoleEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MoveableNonResizableLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @generated
- */
-public class DurationConstraintInMessageEditPart extends AbstractBorderedShapeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3023;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DurationConstraintInMessageEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationConstraintInMessageItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new MoveableNonResizableLabelEditPolicy());
- installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- // 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);
- }
-
- /**
- * Make sure bounds are also refreshed.
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#refresh()
- * @generated NOT
- */
- @Override
- public void refresh() {
- super.refresh();
- refreshBounds();
- }
-
- /**
- * Handles refresh bounds the same way as for a non resizable label
- *
- * @generated NOT
- */
- protected void refreshBounds() {
- int dx = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int dy = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- Point offset = new Point(dx, dy);
- if(getParent() instanceof AbstractConnectionEditPart) {
- ((AbstractGraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new LabelLocator(((AbstractConnectionEditPart)getParent()).getConnectionFigure(), offset, ConnectionLocator.MIDDLE));
- } else {
- getFigure().getParent().setConstraint(getFigure(), new LabelLocator(getFigure().getParent(), offset, ConnectionLocator.MIDDLE));
- }
-
- }
-
- /**
- * @generated NOT use ExternalLabelPrimaryDragRoleEditPolicy
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View)child.getModel();
- switch(UMLVisualIDRegistry.getVisualID(childView)) {
- case DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID:
- // use ExternalLabelPrimaryDragRoleEditPolicy
- return new ExternalLabelPrimaryDragRoleEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new DurationObservationConstraint();
- }
-
- /**
- * @generated
- */
- public DurationObservationConstraint getPrimaryShape() {
- return (DurationObservationConstraint)primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof DurationConstraintInMessageLabelEditPart) {
- ((DurationConstraintInMessageLabelEditPart)childEditPart).setLabel(getPrimaryShape().getDurationLabel());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof DurationConstraintInMessageLabelEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if(editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated NOT use ExternalLabelPositionLocator
- */
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if(borderItemEditPart instanceof DurationConstraintInMessageAppliedStereotypeEditPart) {
- //use ExternalLabelPositionLocator
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated NOT use correct minimum size
- */
- protected NodeFigure createNodePlate() {
- // use correct minimum size
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(-1, -1);
- //String prefElementId = "DurationConstraint";
- //IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- //String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- //String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- //DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if(nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- 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) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationConstraintInMessageLabelEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public class DurationObservationConstraint extends WrappingLabel {
-
- /**
- * @generated
- */
- private WrappingLabel fDurationLabel;
-
- /**
- * @generated
- */
- public DurationObservationConstraint() {
-
- this.setTextWrap(true);
-
- this.setTextJustification(PositionConstants.CENTER);
-
- this.setForegroundColor(ColorConstants.black);
-
- this.setFont(THIS_FONT);
-
- }
-
- /**
- * @generated NOT use this for label
- */
- public WrappingLabel getDurationLabel() {
- // use this for label
- return this;
- }
-
- }
-
- /**
- * @generated
- */
- static final Font THIS_FONT = new Font(Display.getCurrent(), "SANS", 9, SWT.NORMAL);
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DurationConstraint", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DurationConstraint", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DurationConstraint", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("DurationConstraint", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java
deleted file mode 100644
index 61431551608..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintInMessageLabelEditPart.java
+++ /dev/null
@@ -1,772 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class DurationConstraintInMessageLabelEditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5018;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public DurationConstraintInMessageLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.NodeLabelDragPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.DurationConstraint_3023, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageLabelEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java
deleted file mode 100644
index 111a8ca5786..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationConstraintLabelEditPart.java
+++ /dev/null
@@ -1,771 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class DurationConstraintLabelEditPart extends LabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5011;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLabelEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public DurationConstraintLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- }
-
- /**
- * @generated
- */
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if(parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator)constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- public void refreshBounds() {
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.DurationConstraint_3021, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLabelEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new MultilineLabelFigure();
- }
-
- /**
- * @generated
- */
- public class MultilineLabelFigure extends WrappingLabel {
-
- /**
- * @generated
- */
- public MultilineLabelFigure() {
-
- this.setTextAlignment(PositionConstants.CENTER);
-
- this.setAlignment(PositionConstants.CENTER);
-
- this.setBackgroundColor(getBackgroundColor());
-
- this.setTextWrap(true);
-
- this.setTextJustification(PositionConstants.CENTER);
-
- }
-
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java
deleted file mode 100644
index 33c55cc408a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,777 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated NOT implements IPapyrusEditPart
- */
-public class DurationObservationAppliedStereotypeEditPart
-
-extends LabelEditPart
-
-implements ITextAwareEditPart, IBorderItemEditPart, IPapyrusEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5017;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public DurationObservationAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
- }
-
- /**
- * @generated
- */
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if(parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator)constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- public void refreshBounds() {
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
-
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
- return UMLElementTypes.getImage(parserElement.eClass());
- }
- }
- return null;
-
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.DurationObservation_3024, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new AppliedStereotypeWrappingLabelFigure();
- }
-
- /**
- * @generated NOT
- */
- public IFigure getPrimaryShape() {
- return getFigure();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java
deleted file mode 100644
index d4f94c4055d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationEditPart.java
+++ /dev/null
@@ -1,1157 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-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.DurationObservationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @generated
- */
-public class DurationObservationEditPart extends
-
-AbstractBorderedShapeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3024;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DurationObservationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated NOT
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DurationObservationItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
-
- installEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE,new CustomConnectionHandleEditPolicy());
-
- //installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new MoveableNonResizableLabelEditPolicy());
- //installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- // 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);
- }
-
- /**
- * Make sure bounds are also refreshed.
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#refresh()
- * @generated NOT
- */
- @Override
- public void refresh() {
- super.refresh();
- refreshBounds();
- }
-
-// /**
-// * Handles refresh bounds the same way as for a non resizable label
-// *
-// * @generated NOT
-// */
-// protected void refreshBounds() {
-// int dx = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
-// int dy = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
-// Point offset = new Point(dx, dy);
-// if(getParent() instanceof AbstractConnectionEditPart) {
-// ((AbstractGraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new LabelLocator(((AbstractConnectionEditPart)getParent()).getConnectionFigure(), offset, ConnectionLocator.MIDDLE));
-// } else {
-// getFigure().getParent().setConstraint(getFigure(), new LabelLocator(getFigure().getParent(), offset, ConnectionLocator.MIDDLE));
-// }
-//
-// }
-
- /**
- * @generated NOT use ExternalLabelPrimaryDragRoleEditPolicy
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected org.eclipse.gef.EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View)child.getModel();
- switch(UMLVisualIDRegistry.getVisualID(childView)) {
- case DurationObservationAppliedStereotypeEditPart.VISUAL_ID:
- // use ExternalLabelPrimaryDragRoleEditPolicy
- return new CustomExternalLabelPrimaryDragRoleEditPolicy();
- }
- org.eclipse.gef.EditPolicy result = child.getEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new DurationObservationConstraint();
- }
-
- /**
- * @generated
- */
- public DurationObservationConstraint getPrimaryShape() {
- return (DurationObservationConstraint)primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof DurationObservationLabelEditPart) {
- ((DurationObservationLabelEditPart)childEditPart).setLabel(getPrimaryShape().getDurationLabel());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof DurationObservationLabelEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if(editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated NOT use ExternalLabelPositionLocator
- */
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if(borderItemEditPart instanceof DurationObservationAppliedStereotypeEditPart) {
- //use ExternalLabelPositionLocator
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated NOT use correct minimum size
- */
- protected NodeFigure createNodePlate() {
- // use correct minimum size
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(-1, -1);
- //String prefElementId = "DurationObservation";
- //IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- //String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- //String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- //DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if(nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- 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) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationObservationLabelEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public class DurationObservationConstraint extends WrappingLabel {
-
- /**
- * @generated
- */
- private WrappingLabel fDurationLabel;
-
- /**
- * @generated
- */
- public DurationObservationConstraint() {
-
- this.setTextWrap(true);
-
- this.setTextJustification(PositionConstants.CENTER);
-
- this.setForegroundColor(ColorConstants.black);
-
- this.setFont(THIS_FONT);
-
- }
-
- /**
- * @generated NOT use this for label
- */
- public WrappingLabel getDurationLabel() {
- // use this for label
- return this;
- }
-
- }
-
- /**
- * @generated
- */
- static final Font THIS_FONT = new Font(Display.getCurrent(), "SANS", 9, SWT.NORMAL);
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DurationObservation", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DurationObservation", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("DurationObservation", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("DurationObservation", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java
deleted file mode 100644
index 821c12d4e16..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/DurationObservationLabelEditPart.java
+++ /dev/null
@@ -1,773 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class DurationObservationLabelEditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5016;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public DurationObservationLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.NodeLabelDragPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.DurationObservation_3024, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLabelEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- //return (View)getModel();
- return (View) getParent().getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingAppliedStereotypeEditPart.java
deleted file mode 100644
index 350845011a5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,730 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
-import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class GeneralOrderingAppliedStereotypeEditPart extends LabelEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6015;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingAppliedStereotypeEditPart.VISUAL_ID), new Point(1, -33));
- }
-
- /**
- * @generated
- */
- public GeneralOrderingAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
-
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
- return UMLElementTypes.getImage(parserElement.eClass());
- }
- }
- return null;
-
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.GeneralOrdering_4012, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
- refreshLabel();
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingEditPart.java
deleted file mode 100644
index 2a2710c5115..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GeneralOrderingEditPart.java
+++ /dev/null
@@ -1,258 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.ArrowLocator;
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PolygonDecoration;
-import org.eclipse.draw2d.RotatableDecoration;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
-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.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.edge.UMLEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.GeneralOrderingItemSemanticEditPolicy;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class GeneralOrderingEditPart extends ConnectionNodeEditPart
-
-implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4012;
-
- /**
- * @generated
- */
- public GeneralOrderingEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new GeneralOrderingItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof GeneralOrderingAppliedStereotypeEditPart) {
- ((GeneralOrderingAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof GeneralOrderingAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
-
- protected Connection createConnectionFigure() {
- return new GeneralOrderingDescriptor();
- }
-
- /**
- * @generated
- */
- public GeneralOrderingDescriptor getPrimaryShape() {
- return (GeneralOrderingDescriptor)getFigure();
- }
-
- /**
- * @generated NOT inherits from UMLEdgeFigure to manage stereotype label
- */
- public class GeneralOrderingDescriptor extends UMLEdgeFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fAppliedStereotypeLabel;
-
- /**
- * Decoration to place in the middle of the connection
- *
- * @generated NOT
- */
- private RotatableDecoration middleDecoration;
-
- /**
- * @generated NOT call the super constructor, create super contents, set the middle decoration
- */
- public GeneralOrderingDescriptor() {
- // call the super constructor
- super();
- // create super contents
- createContents();
-
- this.setLineStyle(Graphics.LINE_DASH);
- this.setForegroundColor(ColorConstants.black);
-
- // set the middle decoration
- setMiddleDecoration(createTargetDecoration());
- }
-
- /**
- * @generated
- */
- private RotatableDecoration createTargetDecoration() {
- PolygonDecoration df = new PolygonDecoration();
- df.setFill(true);
- df.setForegroundColor(getForegroundColor());
- df.setBackgroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
- return df;
- }
-
- /**
- * @generated NOT get the stereotype label of super class
- */
- public WrappingLabel getAppliedStereotypeLabel() {
- return super.getAppliedStereotypeLabel();
- }
-
- /**
- * Get the decoration of the middle
- *
- * @return the middle decoration - possibly null
- * @generated NOT
- */
- protected RotatableDecoration getMiddleDecoration() {
- return middleDecoration;
- }
-
- /**
- * Set the foreground background
- *
- * @see org.eclipse.draw2d.IFigure#setForegroundColor(org.eclipse.swt.graphics.Color)
- * @generated NOT
- */
- public void setForegroundColor(Color fg) {
- super.setForegroundColor(fg);
- if(getMiddleDecoration() != null) {
- getMiddleDecoration().setForegroundColor(fg);
- getMiddleDecoration().setBackgroundColor(fg);
- }
- }
-
- @Override
- public void setLineWidth(int w) {
- super.setLineWidth(w);
- if(getMiddleDecoration() instanceof Shape){
- ((Shape)getMiddleDecoration()).setLineWidth(w);
- }
- }
-
- /**
- * Set the middle decoration
- *
- * @see org.eclipse.draw2d.PolylineConnection#setTargetDecoration(org.eclipse.draw2d.RotatableDecoration)
- * @generated NOT
- */
- public void setMiddleDecoration(RotatableDecoration dec) {
- if(getMiddleDecoration() != null) {
- remove(getMiddleDecoration());
- }
- middleDecoration = dec;
- if(dec != null) {
- add(dec, new ArrowLocator(this, ConnectionLocator.MIDDLE) {
-
- /**
- * Relocates the passed in figure (which must be a {@link RotatableDecoration}) at the middle of the connection.
- *
- * @param target
- * The RotatableDecoration to relocate
- */
- public void relocate(IFigure target) {
- PointList points = getConnection().getPoints();
- RotatableDecoration arrow = (RotatableDecoration)target;
- arrow.setLocation(getLocation(points));
- Point refPoint;
- if(points.size() % 2 == 0) {
- int i = points.size() / 2;
- refPoint = points.getPoint(i - 1);
- } else {
- int i = (points.size() - 1) / 2;
- refPoint = points.getPoint(i - 1);
- }
- arrow.setReferencePoint(refPoint);
- }
- });
- }
- }
-
- }
-
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
- Object feature = notification.getFeature();
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
-
- protected void setLineWidth(int width) {
- getPrimaryShape().setLineWidth(width);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionEditPart.java
deleted file mode 100644
index d7a4d749a6a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionEditPart.java
+++ /dev/null
@@ -1,1351 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PrecisionPoint;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gef.requests.LocationRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
-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.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.SlidableAnchor;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.InteractionRectangleFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
-import org.eclipse.papyrus.uml.diagram.common.util.MessageDirection;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.AnchorHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.NotificationHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Gate;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InteractionEditPart extends ShapeNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2001;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * Notfier for listen and unlistend model element.
- */
- private NotificationHelper notifier = new NotificationHelper(new UIAdapterImpl() {
-
- @Override
- protected void safeNotifyChanged(Notification msg) {
- handleNotificationEvent(msg);
- }
- });
-
- /**
- * @generated
- */
- public InteractionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
-
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionCanonicalEditPolicy());
-
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new SequenceGraphicalNodeEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated NOT
- */
- protected IFigure createNodeShape() {
- return primaryShape = new InteractionRectangleFigure() {
- @Override
- public Dimension getMinimumSize(int wHint, int hHint) {
- Rectangle bounds = new Rectangle();
-
- for (Object child : InteractionEditPart.this.getChildren()) {
- if (child instanceof InteractionInteractionCompartmentEditPart) {
- InteractionInteractionCompartmentEditPart childEditPart = (InteractionInteractionCompartmentEditPart) child;
-
- for (Object grandChild : childEditPart.getChildren()) {
- GraphicalEditPart editPart = (GraphicalEditPart) grandChild;
- IFigure figure = editPart.getFigure();
- bounds.union(figure.getBounds());
- }
- IFigure figure = childEditPart.getFigure();
- Rectangle rectangle = figure.getBounds();
-
- IFigure parentfigure = InteractionEditPart.this.getFigure();
- Rectangle parentRectangle = parentfigure.getBounds();
-
- bounds.width += parentRectangle.width - rectangle.width + 10; // border 2x5
- bounds.height += parentRectangle.height - rectangle.height + 16; // border 2x5 + 2x3
- break;
- }
- }
- return bounds.getSize();
- }
- };
- }
-
- /**
- * @generated
- */
- public InteractionRectangleFigure getPrimaryShape() {
- return (InteractionRectangleFigure)primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof InteractionNameEditPart) {
- ((InteractionNameEditPart)childEditPart).setLabel(getPrimaryShape().getHeaderLabel());
- return true;
- }
-
- if(childEditPart instanceof InteractionInteractionCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((InteractionInteractionCompartmentEditPart)childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof InteractionNameEditPart) {
- return true;
- }
- if(childEditPart instanceof InteractionInteractionCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.remove(((InteractionInteractionCompartmentEditPart)childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if(editPart instanceof InteractionInteractionCompartmentEditPart) {
- return getPrimaryShape().getCompartmentFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "Interaction";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight)){
-
- protected ConnectionAnchor createAnchor(PrecisionPoint p) {
- if (p==null)
- // If the old terminal for the connection anchor cannot be resolved (by SlidableAnchor) a null
- // PrecisionPoint will passed in - this is handled here
- return createDefaultAnchor();
- return new AnchorHelper.IntersectionPointAnchor(this, p);
- }
- };
-
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model so you may safely remove
- * <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane. Respects layout one may have set
- * for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if(nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- public IFigure getContentPane() {
- if(contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- protected void setForegroundColor(Color color) {
- if(primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * The changement in the background color of the Container must set the forground color of the
- * ContainerCompartiment to avoid the separation line betewen the Compartiment and the
- * ContainerLablel.
- *
- * @generated-not
- */
- protected void setBackgroundColor(Color color) {
- if(primaryShape != null) {
- primaryShape.setBackgroundColor(color);
- if(primaryShape instanceof InteractionRectangleFigure) {
- InteractionRectangleFigure irf = (InteractionRectangleFigure)primaryShape;
- if(irf.getCompartmentFigure() != null) {
- irf.getCompartmentFigure().setForegroundColor(color);
- }
- }
- }
- }
-
- /**
- * @generated
- */
- protected void setLineWidth(int width) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(InteractionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Interaction", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Interaction", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Interaction", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("Interaction", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- @Override
- protected void refreshFont() {
- super.refreshFont();
- refreshBounds();
- }
-
- /**
- * Handle formal gate's name
- */
- protected void handleNotificationEvent(Notification notification) {
- Object feature = notification.getFeature();
-
- if(UMLPackage.eINSTANCE.getInteraction_FormalGate().equals(feature)) {
- // Handle formal gate
- notifier.unlistenObject((Notifier)notification.getOldValue());
- notifier.listenObject((Notifier)notification.getNewValue());
- } else if(UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) && notification.getNotifier() instanceof Gate) {
- // Handle modification of formal gate's name
- Gate gate = (Gate)notification.getNotifier();
- String oldStringValue = notification.getOldStringValue();
- String newStringValue = notification.getNewStringValue();
- if(oldStringValue != null && newStringValue != null) {
- String oldPrefix = oldStringValue.split("_")[0];
- String newPrefix = newStringValue.split("_")[0];
- if(!oldPrefix.equals(newPrefix) && (oldPrefix.equals(MessageDirection.IN.getName()) || oldPrefix.equals(MessageDirection.OUT.getName()))) {
- notifier.unlistenObject(gate);
- gate.setName(oldPrefix + "_" + gate.getName());
- notifier.listenObject(gate);
- }
- }
- }
-
- super.handleNotificationEvent(notification);
- }
-
- /**
- * Activate a listener for the interactionUse to Handle notification in the refered Interaction
- */
- public void activate() {
- super.activate();
- Interaction interaction = (Interaction)resolveSemanticElement();
- if(interaction != null) {
- for(Gate formalGate : interaction.getFormalGates()) {
- notifier.listenObject(formalGate);
- }
- }
- }
-
- /**
- * Deactivate a listener for the interactionUse to Handle notification in the refered
- * Interaction
- */
- public void deactivate() {
- super.deactivate();
- notifier.unlistenAll();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void removeNotify() {
- notifier.unlistenAll();
- super.removeNotify();
- }
-
- /**
- * Handle found message
- */
- @Override
- public ConnectionAnchor getSourceConnectionAnchor(Request request) {
- ConnectionAnchor sourceAnchor = createAnchor(request, UMLElementTypes.Message_4009, Message7EditPart.VISUAL_ID, Message7EditPart.class);
- if (sourceAnchor == null) {
- sourceAnchor = super.getSourceConnectionAnchor(request);
- }
- return sourceAnchor;
- }
-
- /**
- * Handle found message
- */
- @Override
- public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connEditPart) {
- if(connEditPart instanceof Message7EditPart){
- String terminal = AnchorHelper.getAnchorId(getEditingDomain(), connEditPart,true);
- if(terminal.length() > 0){
- PrecisionPoint pt = SlidableAnchor.parseTerminalString(terminal);
- return new AnchorHelper.InnerPointAnchor(getFigure(),pt);
- }
- }
-
- ConnectionAnchor sourceConnectionAnchor = super.getSourceConnectionAnchor(connEditPart);
-// Point referencePoint = sourceConnectionAnchor.getReferencePoint();
-// if(connEditPart instanceof Message7EditPart && referencePoint.x != 0 && referencePoint.y != 0) {
-// sourceConnectionAnchor = new XYAnchor(referencePoint);
-// }
-
- return sourceConnectionAnchor;
- }
-
- /**
- * Handle lost message
- */
- @Override
- public ConnectionAnchor getTargetConnectionAnchor(Request request) {
- ConnectionAnchor targetAnchor = createAnchor(request, UMLElementTypes.Message_4008, Message6EditPart.VISUAL_ID, Message6EditPart.class);
- if (targetAnchor == null) {
- targetAnchor = super.getTargetConnectionAnchor(request);
- }
- return targetAnchor;
- }
-
- /**
- * Handle lost message
- */
- @Override
- public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connEditPart) {
-
- if(connEditPart instanceof Message6EditPart){
- String terminal = AnchorHelper.getAnchorId(getEditingDomain(), connEditPart, false);
- if(terminal.length() > 0){
- PrecisionPoint pt = SlidableAnchor.parseTerminalString(terminal);
- return new AnchorHelper.InnerPointAnchor(getFigure(),pt);
- }
- }
-
- ConnectionAnchor targetConnectionAnchor = super.getTargetConnectionAnchor(connEditPart);
-// Point referencePoint = targetConnectionAnchor.getReferencePoint();
-// if(connEditPart instanceof Message6EditPart && referencePoint.x != 0 && referencePoint.y != 0) {
-// targetConnectionAnchor = new XYAnchor(referencePoint);
-// }
- 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, int 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 CreateConnectionViewAndElementRequest) {
- CreateConnectionViewAndElementRequest createRequest = (CreateConnectionViewAndElementRequest)request;
- ConnectionViewDescriptor connectionViewDescriptor = createRequest.getConnectionViewAndElementDescriptor();
- if(connectionViewDescriptor != null) {
- if(String.valueOf(visualId).equals(connectionViewDescriptor.getSemanticHint())) {
- return createAnchor(createRequest.getLocation().getCopy());
- }
- }
- } else if(request instanceof ReconnectRequest) {
- ReconnectRequest reconnectRequest = (ReconnectRequest)request;
- ConnectionEditPart connectionEditPart = reconnectRequest.getConnectionEditPart();
- if(messageType.equals(connectionEditPart.getClass()) && 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/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionInteractionCompartmentEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionInteractionCompartmentEditPart.java
deleted file mode 100644
index aa93af660da..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionInteractionCompartmentEditPart.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionCompartmentXYLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionInteractionCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-
-/**
- * @generated
- */
-public class InteractionInteractionCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7001;
-
- /**
- * @generated
- */
- public InteractionInteractionCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- public String getCompartmentName() {
- return Messages.InteractionInteractionCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- public IFigure createFigure() {
- ResizableCompartmentFigure result = (ResizableCompartmentFigure)super.createFigure();
- result.setTitleVisibility(false);
- return result;
- }
-
- /**
- * @generated NOT
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionInteractionCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CombinedFragmentCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
-
- //in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE,
- // new
- // org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionInteractionCompartmentCanonicalEditPolicy());
-
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new InteractionCompartmentXYLayoutEditPolicy());
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
-
- removeEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE);
- }
-
- /**
- * @generated
- */
- protected void setRatio(Double ratio) {
- if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification notification) {
- Object feature = notification.getFeature();
- if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
- refreshBounds();
- }
- super.handleNotificationEvent(notification);
- }
-
- /**
- * @generated
- */
- protected void refreshBounds() {
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- Dimension size = new Dimension(width, height);
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- Point loc = new Point(x, y);
- ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-
- /**
- * Generated not for send to back CombinedFragment and InteractionUse {@inheritDoc}
- */
- // TODO Use transparency instead of send to back method
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(childEditPart instanceof CombinedFragmentEditPart || childEditPart instanceof ConsiderIgnoreFragmentEditPart || childEditPart instanceof InteractionUseEditPart) {
- index = 0;
- }
- super.addChildVisual(childEditPart, index);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionNameEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionNameEditPart.java
deleted file mode 100644
index edb37bf4885..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionNameEditPart.java
+++ /dev/null
@@ -1,756 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class InteractionNameEditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5001;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public InteractionNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.NodeLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Interaction_2001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionNameEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = org.eclipse.papyrus.extensionpoints.editors.Activator.getDefault().getPreferenceStore().getString(org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != configuration.getLanguage()) {
- configuration = org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandEditPart.java
deleted file mode 100644
index 1a7e96d31b1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionOperandEditPart.java
+++ /dev/null
@@ -1,1879 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-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.draw2d.FreeformLayout;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.XYLayout;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-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.DirectEditPolicy;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.ResizableEditPolicy;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.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.editpolicies.XYLayoutEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.internal.parts.WrapTextCellEditor;
-import org.eclipse.gmf.runtime.notation.FillStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.datatype.GradientData;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-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.policies.CombinedFragmentCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandComponentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.SequenceGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionOperandFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.locator.ContinuationLocator;
-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.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LoopOperatorUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.util.NotificationHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Continuation;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.InteractionConstraint;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.InteractionOperatorKind;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.LiteralInteger;
-import org.eclipse.uml2.uml.LiteralString;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-/**
- * @generated
- */
-public class InteractionOperandEditPart extends
-
-AbstractBorderedShapeEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3005;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * True if this Edit Part is the first Operand of his CombinedFragment's parent
- */
- private boolean firstOperand = false;
-
- /**
- * Notfier for listen and unlistend model element.
- */
- private NotificationHelper notifierHelper = new NotificationHelper(new UIAdapterImpl() {
-
- @Override
- protected void safeNotifyChanged(Notification msg) {
- handleNotificationEvent(msg);
- }
- });
-
- /**
- * @generated
- */
- public InteractionOperandEditPart(View view) {
- super(view);
- }
-
- /**
- * Remove EditPolicyRoles.DRAG_DROP_ROLE and EditPolicy.PRIMARY_DRAG_ROLE :
- * - adding elements to an interactionOperand doesn't anymore resize the enclosing CF
- * - interactionOperand are no longer dNd
- *
- * @generated NOT
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CombinedFragmentCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionOperandItemSemanticEditPolicy());
- //installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
-
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionOperandCanonicalEditPolicy());
-
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new InteractionOperandLayoutEditPolicy());
- // installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new InteractionOperandDragDropEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new InteractionOperandComponentEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new SequenceGraphicalNodeEditPolicy());
- // 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);
-
- // Fixed bug id=364701 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=364701)
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
- new InteractionOperandDragDropEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new GuardConditionDirectEditPolicy());
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- XYLayoutEditPolicy lep = new XYLayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View)child.getModel();
- switch(UMLVisualIDRegistry.getVisualID(childView)) {
- case ContinuationEditPart.VISUAL_ID:
-
- return new BorderItemResizableEditPolicy();
-
- }
- EditPolicy result = super.createChildEditPolicy(child);
- if(result == null) {
- return new ResizableShapeEditPolicy();
- }
- return result;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new CustomInteractionOperandFigure() {
-
- protected boolean useLocalCoordinates() {
- return true;
- }
- };
- }
-
- /**
- * @generated
- */
- public CustomInteractionOperandFigure getPrimaryShape() {
- return (CustomInteractionOperandFigure)primaryShape;
- }
-
- /**
- * Overrides to return the contentPane instead of the main figure in case the editPart is not a IBorderItemEditPart.
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#getContentPaneFor(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart)
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if(editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- } else {
- return getContentPane();
- }
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "InteractionOperand";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- public EditPolicy getPrimaryDragEditPolicy() {
- EditPolicy result = super.getPrimaryDragEditPolicy();
- if(result instanceof ResizableEditPolicy) {
- ResizableEditPolicy ep = (ResizableEditPolicy)result;
- ep.setResizeDirections(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 createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane. Respects layout one may have set
- * for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if(nodeShape.getLayoutManager() == null) {
- nodeShape.setLayoutManager(new FreeformLayout() {
-
- public Object getConstraint(IFigure figure) {
- Object result = constraints.get(figure);
- if(result == null) {
- result = new Rectangle(0, 0, -1, -1);
- }
- return result;
- }
- });
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * Overrides to add a specific locator on the ContinuationEditPart
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#addBorderItem(org.eclipse.draw2d.IFigure,
- * org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if(borderItemEditPart instanceof ContinuationEditPart) {
- borderItemContainer.add(borderItemEditPart.getFigure(), new ContinuationLocator(getMainFigure(), getContinuationPosition(borderItemEditPart)));
- return;
- }
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
-
- /**
- * Get the initial position of the continuation
- *
- * @param borderItemEditPart
- * the borderItemEditPart
- * @return the initial position. ContinuationLocator.BOTTOM if none found
- */
- private int getContinuationPosition(IBorderItemEditPart borderItemEditPart) {
- Object model = borderItemEditPart.getModel();
- if(model instanceof org.eclipse.gmf.runtime.notation.Shape) {
- org.eclipse.gmf.runtime.notation.Shape shape = (org.eclipse.gmf.runtime.notation.Shape)model;
- EObject eObject = shape.getElement();
- if(eObject instanceof Continuation) {
- return ((Continuation)eObject).isSetting() ? PositionConstants.SOUTH : PositionConstants.NORTH;
- }
- }
- return PositionConstants.NORTH;
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if(contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if(primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure){
- ((NodeFigure)primaryShape).setLineWidth(width);
- }else if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public class CustomInteractionOperandFigure extends InteractionOperandFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fInteractionConstraintLabel;
-
- /**
- * @generated
- */
- public CustomInteractionOperandFigure() {
- // this.setLayoutManager(new XYLayout());
- // Fixed bug id=364701 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=364701)
- // by using StackLayout instead of XYLayout
- this.setLayoutManager(new XYLayout());
-
- this.setLineStyle(Graphics.LINE_DASH);
-
- this.setBorder(null);
-
- this.setLineSeparator(!firstOperand);
- this.setLineWidth(2);
- createContents();
- }
-
- protected void paintBackground(Graphics graphics, Rectangle rectangle) {
- graphics.pushState();
- super.paintBackground(graphics, rectangle);
- graphics.popState();
- }
-
- /**
- * @generated NOT
- */
- private void createContents() {
- fInteractionConstraintLabel = new WrappingLabel();
- fInteractionConstraintLabel.setText("");
- updateConstraintLabel();
-
- this.add(fInteractionConstraintLabel, new Rectangle(getMapMode().DPtoLP(10), getMapMode().DPtoLP(10), getMapMode().DPtoLP(200), getMapMode().DPtoLP(20)));
-
- }
-
- /**
- * Update the interaction constraint value
- *
- * @param interactionOperand
- * The UML Interaction Operand
- */
- protected void updateConstraintLabel() {
- String text = "";
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- fInteractionConstraintLabel.setText(text);
- }
-
- /**
- * @generated
- */
- public WrappingLabel getInteractionConstraintLabel() {
- return fInteractionConstraintLabel;
- }
-
- }
-
- static String getGuardLabelText(InteractionOperand interactionOperand , boolean edit ){
- CombinedFragment enclosingCF = (CombinedFragment)interactionOperand.getOwner();
- InteractionOperatorKind cfOperator = enclosingCF.getInteractionOperator();
-
- InteractionConstraint guard = interactionOperand.getGuard();
-
- String specValue = null;
-
- if(guard != null) {
- ValueSpecification specification = guard.getSpecification();
-
- if(specification != null) {
- try {
- specValue = specification.stringValue();
- } catch (Exception e) {
- }
- }
- }
-
- StringBuilder sb = new StringBuilder("");
-
- if(InteractionOperatorKind.LOOP_LITERAL.equals(cfOperator)) {
- String condition = LoopOperatorUtil.getLoopCondition(guard);
- if(condition != null) {
- sb.append(condition);
- }
- }
-
- if(specValue == null) {
- EList<InteractionOperand> operands = enclosingCF.getOperands();
- if(InteractionOperatorKind.ALT_LITERAL.equals(cfOperator) && interactionOperand.equals(operands.get(operands.size() - 1))) {
- specValue = "else";
- }
- }
-
- if(specValue != null) {
- if(!edit) sb.append('[');
- sb.append(specValue);
- if(!edit) sb.append(']');
- }
- String text = sb.toString();
- return text;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("InteractionOperand", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("InteractionOperand", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("InteractionOperand", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("InteractionOperand", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * Handle guard modification and update label.
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- Object feature = notification.getFeature();
-
- Object newValue = notification.getNewValue();
- if(UMLPackage.eINSTANCE.getInteractionOperand_Guard().equals(feature)) {
- // Case of add, change or delete guard
- if(notification.getOldValue() instanceof InteractionConstraint) {
- InteractionConstraint constraint = (InteractionConstraint)notification.getOldValue();
- notifierHelper.unlistenObject(constraint);
- notifierHelper.unlistenObject(constraint.getSpecification());
- notifierHelper.unlistenObject(constraint.getMaxint());
- notifierHelper.unlistenObject(constraint.getMinint());
- }
- if(newValue instanceof InteractionConstraint) {
- InteractionConstraint constraint = (InteractionConstraint)newValue;
- notifierHelper.listenObject(constraint);
- notifierHelper.listenObject(constraint.getSpecification());
- notifierHelper.listenObject(constraint.getMaxint());
- notifierHelper.listenObject(constraint.getMinint());
- }
- } else if(UMLPackage.eINSTANCE.getConstraint_Specification().equals(feature)) {
- // Case of add, change or delete Specification
- if(notification.getOldValue() instanceof ValueSpecification) {
- notifierHelper.unlistenObject((ValueSpecification)notification.getOldValue());
- }
- if(newValue instanceof ValueSpecification) {
- ValueSpecification newStringValue = (ValueSpecification)newValue;
- notifierHelper.listenObject(newStringValue);
- }
- } else if(UMLPackage.eINSTANCE.getInteractionConstraint_Minint().equals(feature)) {
- // Case of add, change or delete Minint
- if(notification.getOldValue() instanceof LiteralInteger) {
- notifierHelper.unlistenObject((LiteralInteger)notification.getOldValue());
- }
- if(newValue instanceof LiteralInteger) {
- LiteralInteger newIntegerValue = (LiteralInteger)newValue;
- notifierHelper.listenObject(newIntegerValue);
- }
- } else if(UMLPackage.eINSTANCE.getInteractionConstraint_Maxint().equals(feature)) {
- // Case of add, change or delete Maxint
- if(notification.getOldValue() instanceof LiteralInteger) {
- notifierHelper.unlistenObject((LiteralInteger)notification.getOldValue());
- }
- if(newValue instanceof LiteralInteger) {
- LiteralInteger newIntegerValue = (LiteralInteger)newValue;
- notifierHelper.listenObject(newIntegerValue);
- }
- }
-
- // handle modification of minint et maxint to match constraints min <= max and min >= 0
- if(notification.getNotifier() instanceof LiteralInteger && InteractionOperatorKind.LOOP_LITERAL.equals(getInteractionOperator())) {
- LiteralInteger literalIntNotifier = (LiteralInteger)notification.getNotifier();
- EStructuralFeature containingFeature = literalIntNotifier.eContainingFeature();
- if(UMLPackage.eINSTANCE.getInteractionConstraint_Minint().equals(containingFeature)) {
- InteractionConstraint constraint = (InteractionConstraint)literalIntNotifier.getOwner();
- if(newValue instanceof Integer) {
- Integer newMin = (Integer)newValue;
- if(newMin < 0) {
- literalIntNotifier.setValue(0);
- }
- if(constraint.getMaxint() instanceof LiteralInteger) {
- int max = ((LiteralInteger)constraint.getMaxint()).getValue();
- if(max != -1 && newMin > max) {
- literalIntNotifier.setValue(max);
- }
- }
- }
- } else if(UMLPackage.eINSTANCE.getInteractionConstraint_Maxint().equals(containingFeature)) {
- InteractionConstraint constraint = (InteractionConstraint)literalIntNotifier.getOwner();
- if(newValue instanceof Integer) {
- Integer newMax = (Integer)newValue;
- int min = 0;
- if(constraint.getMinint() instanceof LiteralInteger) {
- min = ((LiteralInteger)constraint.getMinint()).getValue();
- if(newMax != -1 && newMax < min) {
- literalIntNotifier.setValue(min);
- }
- }
- }
- }
- }
- getPrimaryShape().updateConstraintLabel();
-
- // Manage Continuation constraint on covered lifeline :
- // Continuations are always global in the enclosing InteractionFragment
- //(e.g., it always covers all Lifelines covered by the enclosing InteractionFragment)
- if(UMLPackage.eINSTANCE.getInteractionFragment_Covered().equals(feature)) {
- // In case we are in an alternative combined fragment, this interaction operand may have continuation which need to be updated.
- if(InteractionOperatorKind.ALT_LITERAL.equals(getInteractionOperator())) {
- InteractionOperand interactionOperand = (InteractionOperand)notification.getNotifier();
- EList<Lifeline> currentlyCoveredLifeline = interactionOperand.getCovereds();
- for(InteractionFragment interactionFragment : interactionOperand.getFragments()) {
- if(interactionFragment instanceof Continuation) {
- EList<Lifeline> continuationCoveredLifelines = interactionFragment.getCovereds();
- if(!continuationCoveredLifelines.equals(currentlyCoveredLifeline)) {
- // Add new covered lifelines (not already covered)
- List<Lifeline> coveredLifelinesToAdd = new ArrayList<Lifeline>(currentlyCoveredLifeline);
- coveredLifelinesToAdd.removeAll(continuationCoveredLifelines);
- if(!coveredLifelinesToAdd.isEmpty()) {
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), AddCommand.create(getEditingDomain(), interactionFragment, UMLPackage.eINSTANCE.getInteractionFragment_Covered(), coveredLifelinesToAdd),true);
- }
-
- // Delete old covered lifelines (not covered anymore)
- List<Lifeline> coveredLifelinesToRemove = new ArrayList<Lifeline>(continuationCoveredLifelines);
- coveredLifelinesToRemove.removeAll(currentlyCoveredLifeline);
- if(!coveredLifelinesToRemove.isEmpty()) {
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), RemoveCommand.create(getEditingDomain(), interactionFragment, UMLPackage.eINSTANCE.getInteractionFragment_Covered(), coveredLifelinesToRemove),true);
- }
- }
- }
- }
- }
- }
- super.handleNotificationEvent(notification);
- if((getModel() != null) && (getModel() == notification.getNotifier())) {
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
- }
-
- protected void refreshBackgroundColor() {
- FillStyle style = (FillStyle)getPrimaryView().getStyle(NotationPackage.Literals.FILL_STYLE);
- if ( style != null ) {
- if ((style.getGradient() == null || !supportsGradient())) {
- if(16777215 == style.getFillColor()){ // default color
- getPrimaryShape().setTransparency(100);
- getPrimaryShape().setIsUsingGradient(true);
- getPrimaryShape().setGradientData(style.getFillColor(), style.getFillColor(), 0);
- }else{
- refreshTransparency();
- setBackgroundColor(DiagramColorRegistry.getInstance().getColor(Integer.valueOf(style.getFillColor())));
- }
- } else {
- refreshTransparency();
- setGradient(style.getGradient());
- }
- }
- }
-
- @Override
- protected void setTransparency(int transp) {
- getPrimaryShape().setTransparency(transp);
- }
-
- /**
- * Override to set the gradient data to the correct figure
- */
- @Override
- protected void setGradient(GradientData gradient) {
- IPapyrusNodeFigure fig = getPrimaryShape();
- FillStyle style = (FillStyle)getPrimaryView().getStyle(NotationPackage.Literals.FILL_STYLE);
- if(gradient != null) {
- setTransparency(0);
- fig.setIsUsingGradient(true);
- fig.setGradientData(style.getFillColor(), gradient.getGradientColor1(), gradient.getGradientStyle());
- } else {
- fig.setIsUsingGradient(false);
- }
- }
-
- public boolean supportsGradient() {
- return true;
- }
-
- protected void setBackgroundColor(Color c) {
- PapyrusNodeFigure fig = getPrimaryShape();
- fig.setBackgroundColor(c);
- fig.setIsUsingGradient(false);
- fig.setGradientData(-1, -1, 0);
- }
-
-
- /**
- * Get the InteractionOperator of the CombinedFragment.
- *
- * @return The InteractionOperator
- */
- private InteractionOperatorKind getInteractionOperator() {
- InteractionOperatorKind interactionOperatorKind = null;
-
- EditPart parent = getParent();
- if(parent instanceof CombinedFragmentCombinedFragmentCompartmentEditPart) {
- parent = parent.getParent();
- if(parent instanceof CombinedFragmentEditPart) {
- EObject element = ((CombinedFragmentEditPart)parent).resolveSemanticElement();
- if(element instanceof CombinedFragment) {
- interactionOperatorKind = ((CombinedFragment)element).getInteractionOperator();
- }
- }
- }
-
- return interactionOperatorKind;
- }
-
- /**
- * Set if this Edit Part is the first Operand of his CombinedFragment's parent.
- */
- public void setFirstOperand(boolean firstOperand) {
- this.firstOperand = firstOperand;
- if(primaryShape != null) {
- getPrimaryShape().setLineSeparator(!firstOperand);
- }
- }
-
- /**
- * Activate listeners for InteractionOperand to handle notification in the guard
- */
- @Override
- public void activate() {
- addListeners();
- super.activate();
- }
-
- /**
- * Desactivate listeners for InteractionOperand to handle notification in the guard
- */
- @Override
- public void deactivate() {
- notifierHelper.unlistenAll();
- super.deactivate();
- }
-
- /**
- * Remove listeners for InteractionOperand to handle notification in the guard
- */
- @Override
- public void removeNotify() {
- notifierHelper.unlistenAll();
- super.removeNotify();
- }
-
- /**
- * Add listeners for InteractionOperand to handle notification in the guard
- */
- private void addListeners() {
- EObject eObject = resolveSemanticElement();
- if(eObject instanceof InteractionOperand) {
- InteractionOperand interactionOperand = (InteractionOperand)eObject;
- InteractionConstraint guard = interactionOperand.getGuard();
- if(guard != null) {
- notifierHelper.listenObject(guard);
- notifierHelper.listenObject(guard.getSpecification());
- notifierHelper.listenObject(guard.getMaxint());
- notifierHelper.listenObject(guard.getMinint());
- }
- }
- }
-
-
-
- private DirectEditManager manager;
- private IParser parser;
-
- protected DirectEditManager getManager() {
- if(manager == null) {
- WrappingLabel label = this.getPrimaryShape().getInteractionConstraintLabel();
- manager = new TextDirectEditManager(this, WrapTextCellEditor.class, new UMLEditPartFactory.TextCellEditorLocator(label));
- }
- return manager;
- }
-
- protected void performDirectEditRequest(Request request) {
- if(request instanceof DirectEditRequest){
- WrappingLabel label = getPrimaryShape().getInteractionConstraintLabel();
- Point location = ((DirectEditRequest)request).getLocation().getCopy();
- label.translateToRelative(location); // convert request location to relative
- if(label.containsPoint(location)) // check if mouse click on label
- getManager().show();
- }
- }
-
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- public IParser getParser() {
- if(parser == null) {
- parser = new GuardConditionParser();
- }
- return parser;
- }
-
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- public void setLabelText(String text) {
- WrappingLabel label = this.getPrimaryShape().getInteractionConstraintLabel();
- label.setText(text);
- }
-
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- if(element != null && parser != null){
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- }
- }
- }
- return null;
- }
- };
- }
-
- class GuardConditionDirectEditPolicy extends DirectEditPolicy{
-
- @Override
- protected Command getDirectEditCommand(DirectEditRequest edit) {
- String labelText = (String) edit.getCellEditor().getValue();
-
- //for CellEditor, null is always returned for invalid values
- if (labelText == null) {
- return null;
- }
-
- ITextAwareEditPart compartment = (ITextAwareEditPart) getHost();
- EObject model = (EObject)compartment.getModel();
- EObjectAdapter elementAdapter = null ;
- if (model instanceof View) {
- View view = (View)model;
- elementAdapter = new EObjectAdapterEx(ViewUtil.resolveSemanticElement(view),
- view);
- }
- else
- elementAdapter = new EObjectAdapterEx(model, null);
-
- String prevText = compartment.getParser().getEditString(elementAdapter,
- compartment.getParserOptions().intValue());
- // check to make sure an edit has occurred before returning a command.
- if (!prevText.equals(labelText)) {
- ICommand iCommand =
- compartment.getParser().getParseCommand(elementAdapter, labelText, 0);
- return new ICommandProxy(iCommand);
- }
-
- // refresh label again
- getPrimaryShape().updateConstraintLabel();
- return null;
- }
-
- @Override
- protected void showCurrentEditValue(DirectEditRequest request) {
- String value = (String) request.getCellEditor().getValue();
- WrappingLabel label = getPrimaryShape().getInteractionConstraintLabel();
- label.setText(value);
- }
- }
-
- static class UpdateGuardConditionCommand extends AbstractTransactionalCommand {
-
- private InteractionConstraint guard;
- private String text;
- private InteractionOperand interactionOperand;
-
- public UpdateGuardConditionCommand(TransactionalEditingDomain domain,InteractionOperand interactionOperand, InteractionConstraint guard, String text) {
- super(domain, null, null);
- this.interactionOperand = interactionOperand;
- this.guard = guard;
- this.text = text;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- CombinedFragment enclosingCF = (CombinedFragment)interactionOperand.getOwner();
- InteractionOperatorKind cfOperator = enclosingCF.getInteractionOperator();
- if(InteractionOperatorKind.LOOP_LITERAL.equals(cfOperator)){
- if(text.contains("]") && text.contains("[") ){
- String[] parts = text.split("]");
- String[] nums = parts[0].replaceAll("\\[", "").split(",");
- int min = 0, max = -1;
- min = parseInt(nums[0], 0);
- max = nums.length > 1 ? parseInt(nums[1], -1) : min;
-
- if(guard.getMinint() != null)
- setIntValue( guard.getMinint() ,min);
- else
- guard.setMinint(createLiteralInteger(min));
- if(guard.getMaxint() != null)
- setIntValue( guard.getMaxint() ,max);
- else
- guard.setMaxint(createLiteralInteger(max));
-
- if(parts.length > 1)
- text = parts[1] == null? "" : parts[1].trim();
- else
- text = "";
- }else{
- guard.setMinint(null);
- guard.setMaxint(null);
- }
- }
- if(guard.getSpecification() != null || text.length() > 0){
- LiteralString literalString = UMLFactory.eINSTANCE.createLiteralString();
- literalString.setValue(text);
- guard.setSpecification(literalString);
- }
- return CommandResult.newOKCommandResult();
- }
-
- private LiteralInteger createLiteralInteger(int val){
- LiteralInteger li = UMLFactory.eINSTANCE.createLiteralInteger();
- li.setValue(val);
- return li;
- }
-
- private void setIntValue(ValueSpecification spec, int val) {
- if(spec instanceof LiteralInteger){
- ((LiteralInteger)spec).setValue(val);
- }
- }
-
- private int parseInt(String string, int defaultInt) {
- try {
- return Integer.parseInt(string);
- } catch (NumberFormatException e) {
- }
- return defaultInt;
- }
- }
-
-
- static class GuardConditionParser extends MessageFormatParser implements ISemanticParser {
- public GuardConditionParser() {
- super(new EAttribute[]{ UMLPackage.eINSTANCE.getLiteralInteger_Value(), UMLPackage.eINSTANCE.getLiteralString_Value() });
- }
-
- public List getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if(element instanceof InteractionOperand) {
- InteractionOperand op = (InteractionOperand)element;
- semanticElementsBeingParsed.add(op);
- semanticElementsBeingParsed.add(op.getGuard() );
- }
- return semanticElementsBeingParsed;
- }
-
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- public String getPrintString(IAdaptable element, int flags) {
- Object adapter = element.getAdapter(EObject.class);
- if(adapter instanceof InteractionOperand) {
- InteractionOperand interactionOperand = (InteractionOperand)adapter;
- return getGuardLabelText(interactionOperand, false);
- }
- return "";
- }
-
- @Override
- public IParserEditStatus isValidEditString(IAdaptable adapter, String editString) {
- return ParserEditStatus.EDITABLE_STATUS;
- }
-
- @Override
- public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
- EObject element = (EObject)adapter.getAdapter(EObject.class);
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(element);
- if(editingDomain == null || !(element instanceof InteractionOperand )) {
- return UnexecutableCommand.INSTANCE;
- }
-
- InteractionOperand interactionOperand = (InteractionOperand)element;
- InteractionConstraint guard = interactionOperand.getGuard();
- CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
- command.compose(new UpdateGuardConditionCommand(editingDomain, interactionOperand, guard, newString ));
- return command;
- }
-
- @Override
- public String getEditString(IAdaptable element, int flags) {
- Object adapter = element.getAdapter(EObject.class);
- if(adapter instanceof InteractionOperand) {
- InteractionOperand interactionOperand = (InteractionOperand)adapter;
- return getGuardLabelText(interactionOperand, true);
- }
- return "";
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if(notification instanceof Notification) {
- Object feature = ((Notification)notification).getFeature();
- if(feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature)feature;
- }
- }
- return featureImpl;
- }
-
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getInteractionConstraint_Maxint().equals(feature) || UMLPackage.eINSTANCE.getInteractionConstraint_Minint().equals(feature) || UMLPackage.eINSTANCE.getConstraint_Specification().equals(feature);
- }
- }
-
- static class EObjectAdapterEx extends EObjectAdapter {
- private View view = null;
-
- /**
- * constructor
- * @param element element to be wrapped
- * @param view view to be wrapped
- */
- public EObjectAdapterEx(EObject element, View view) {
- super(element);
- this.view = view;
- }
-
- public Object getAdapter(Class adapter) {
- Object o = super.getAdapter(adapter);
- if (o != null)
- return o;
- if (adapter.equals(View.class)) {
- return view;
- }
- return null;
- }
- }
-
- public boolean ignoreRequest(Request request) {
- if(request instanceof ChangeBoundsRequest && (request.getType().equals(RequestConstants.REQ_ADD) || request.getType().equals(RequestConstants.REQ_DROP))){
- List parts = ((ChangeBoundsRequest) request).getEditParts();
- if(parts != null){
- for(Object obj : parts)
- if(obj instanceof CommentEditPart || obj instanceof ConstraintEditPart || obj instanceof TimeObservationEditPart){
- return true;
- }
- }
- }
-
- return false;
- }
-
- public void showTargetFeedback(Request request) {
- if(ignoreRequest(request)) {
- return;
- }
-
- super.showTargetFeedback(request);
- }
-
- public Command getCommand(Request request) {
- if(ignoreRequest(request))
- return null;
-
- return super.getCommand(request);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseEditPart.java
deleted file mode 100644
index 1112c8af146..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseEditPart.java
+++ /dev/null
@@ -1,1351 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.FillStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.datatype.GradientData;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.emf.appearance.helper.ShadowFigureHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-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.policies.InteractionUseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.InteractionUseRectangleFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.InteractionUseUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.util.NotificationHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Gate;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionUse;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InteractionUseEditPart extends InteractionFragmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3002;
-
- /**
- * Title for dialog of no actual gate's manual creation
- */
- private static final String NO_ACTUAL_GATE_MANUAL_CREATION_DLG_TITLE = "No manual creation of actual gate"; //$NON-NLS-1$
-
- /**
- * Message for dialog of no actual gate's manual creation
- */
- private static final String NO_ACTUAL_GATE_MANUAL_CREATION_DLG_MSG = "It's forbidden to create actual gate"; //$NON-NLS-1$
-
- /**
- * Title for dialog of no actual gate's manual deletion
- */
- private static final String NO_ACTUAL_GATE_MANUAL_DELETION_DLG_TITLE = "No manual deletion of actual gate"; //$NON-NLS-1$
-
- /**
- * Message for dialog of no actual gate's manual deletion
- */
- private static final String NO_ACTUAL_GATE_MANUAL_DELETION_DLG_MSG = "It's forbidden to delete actual gate"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * Notfier for listen and unlistend model element.
- */
- private NotificationHelper notifier = new NotificationHelper(new UIAdapterImpl() {
-
- @Override
- protected void safeNotifyChanged(Notification msg) {
- handleNotificationEvent(msg);
- }
- });
-
- /**
- * @generated
- */
- public InteractionUseEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionUseItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- primaryShape = new InteractionUseRectangleFigure();
- getPrimaryShape().setShadow(false);
- return primaryShape;
- }
-
-
- protected final void refreshShadow() {
- getPrimaryShape().setShadow(ShadowFigureHelper.getShadowFigureValue((View)getModel()));
- }
-
- /**
- * Override to set the transparency to the correct figure
- */
- @Override
- protected void setTransparency(int transp) {
- getPrimaryShape().setTransparency(transp);
- }
-
- /**
- * sets the back ground color of this edit part
- *
- * @param color
- * the new value of the back ground color
- */
- @Override
- protected void setBackgroundColor(Color color) {
- getPrimaryShape().setBackgroundColor(color);
- getPrimaryShape().setIsUsingGradient(false);
- getPrimaryShape().setGradientData(-1, -1, 0);
- }
-
- /**
- * Override to set the gradient data to the correct figure
- */
- @Override
- protected void setGradient(GradientData gradient) {
- IPapyrusNodeFigure fig = getPrimaryShape();
- FillStyle style = (FillStyle)getPrimaryView().getStyle(NotationPackage.Literals.FILL_STYLE);
- if(gradient != null) {
- fig.setIsUsingGradient(true);;
- fig.setGradientData(style.getFillColor(), gradient.getGradientColor1(), gradient.getGradientStyle());
- } else {
- fig.setIsUsingGradient(false);
- }
- }
-
- public boolean supportsGradient() {
- return true;
- }
-
- /**
- * @generated
- */
- public InteractionUseRectangleFigure getPrimaryShape() {
- return (InteractionUseRectangleFigure)primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof InteractionUseNameEditPart) {
- ((InteractionUseNameEditPart)childEditPart).setLabel(getPrimaryShape().getHeaderLabel());
- return true;
- }
- if(childEditPart instanceof InteractionUseName2EditPart) {
- ((InteractionUseName2EditPart)childEditPart).setLabel(getPrimaryShape().getCenterLabel());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof InteractionUseNameEditPart) {
- return true;
- }
- if(childEditPart instanceof InteractionUseName2EditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "InteractionUse";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model so you may safely remove
- * <i>generated</i> tag and modify it.
- *
- * @generated
- */
- @Override
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane. Respects layout one may have set
- * for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
-
- protected IFigure setupContentPane(IFigure nodeShape) {
- if(nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if(contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if(primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }else if(primaryShape instanceof NodeFigure){
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(InteractionUseNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("InteractionUse", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("InteractionUse", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("InteractionUse", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("InteractionUse", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * Handle for gates operator and covered lifelines
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- Object feature = notification.getFeature();
-
- if(UMLPackage.eINSTANCE.getInteractionUse_RefersTo().equals(feature)) {
- if(notification.getOldValue() instanceof Interaction) {
- notifier.unlistenAll();
- // notifier.unlistenObject((Interaction) notification.getOldValue());
- }
- InteractionUse interactionUse = (InteractionUse)resolveSemanticElement();
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), RemoveCommand.create(getEditingDomain(), interactionUse, UMLPackage.eINSTANCE.getInteractionUse_ActualGate(), interactionUse.getActualGates()), true);
- if(notification.getNewValue() instanceof Interaction) {
- Interaction interaction = (Interaction)notification.getNewValue();
- notifier.listenObject(interaction);
-
- List<Gate> actualGates = interactionUse.getActualGates();
- List<Gate> formalGates = interaction.getFormalGates();
- for(Gate formalGate : formalGates) {
- Gate newActualGate = (Gate)EcoreUtil.create(UMLPackage.Literals.GATE);
- newActualGate.setName(formalGate.getName());
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), AddCommand.create(getEditingDomain(), resolveSemanticElement(), UMLPackage.eINSTANCE.getInteractionUse_ActualGate(), newActualGate),true);
- notifier.listenObject(formalGate);
- notifier.listenObject(newActualGate);
- }
- }
- } else if(UMLPackage.eINSTANCE.getInteractionFragment_Covered().equals(feature)) {
- activate();
- resizeInteractionFragmentFigure();
- } else if(UMLPackage.eINSTANCE.getInteraction_FormalGate().equals(feature)) {
- // Handle formal gate
- InteractionUse interactionUse = (InteractionUse)resolveSemanticElement();
- Object oldValue = notification.getOldValue();
- if(oldValue instanceof Gate) {
- notifier.unlistenObject((Gate)oldValue);
- List<Gate> actualGates = interactionUse.getActualGates();
- for(int i = actualGates.size() - 1; i >= 0; i--) {
- Gate element = actualGates.get(i);
- if(((Gate)oldValue).getName().equals(element.getName())) {
- notifier.unlistenObject(element);
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), RemoveCommand.create(getEditingDomain(), interactionUse, UMLPackage.eINSTANCE.getInteractionUse_ActualGate(), element),true);
- }
- }
- }
- Object newValue = notification.getNewValue();
- if(newValue instanceof Gate) {
- Gate actualGate = interactionUse.createActualGate(((Gate)newValue).getName());
- notifier.listenObject((Gate)newValue);
- notifier.listenObject(actualGate);
- }
- } else if(UMLPackage.eINSTANCE.getInteractionUse_ActualGate().equals(feature)) {
- if(notification.getEventType() == Notification.ADD) {
- // Block manual creation of actual gate
- if(notification.getNewValue() instanceof Gate) {
- Gate newActualGate = (Gate)notification.getNewValue();
- if(!checkActualGateExistence(newActualGate)) {
- MessageDialog.openError(Display.getCurrent().getActiveShell(), NO_ACTUAL_GATE_MANUAL_CREATION_DLG_TITLE, NO_ACTUAL_GATE_MANUAL_CREATION_DLG_MSG);
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), RemoveCommand.create(getEditingDomain(), resolveSemanticElement(), UMLPackage.eINSTANCE.getInteractionUse_ActualGate(), newActualGate), true);
- }
- }
- } else if(notification.getEventType() == Notification.REMOVE) {
- // Block manual deletion of actual gate
- if(notification.getOldValue() instanceof Gate) {
- Gate oldActualGate = (Gate)notification.getOldValue();
- if(checkActualGateExistence(oldActualGate)) {
- MessageDialog.openError(Display.getCurrent().getActiveShell(), NO_ACTUAL_GATE_MANUAL_DELETION_DLG_TITLE, NO_ACTUAL_GATE_MANUAL_DELETION_DLG_MSG);
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), AddCommand.create(getEditingDomain(), resolveSemanticElement(), UMLPackage.eINSTANCE.getInteractionUse_ActualGate(), oldActualGate), true);
- }
- }
- }
- } else if(UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) && notification.getNotifier() instanceof Gate) {
- Gate gate = (Gate)notification.getNotifier();
- if(gate.eContainer() instanceof Interaction) {
- // Handle modification of formal gate's name
- InteractionUse interactionUse = (InteractionUse)resolveSemanticElement();
- List<Gate> actualGates = interactionUse.getActualGates();
- String oldValue = notification.getOldStringValue();
- String newValue = notification.getNewStringValue();
- for(Gate actualGate : actualGates) {
- if(oldValue == null && actualGate.getName() == null || oldValue != null && oldValue.equals(actualGate.getName())) {
- notifier.unlistenObject(actualGate); // Delete listener on gate
- actualGate.setName(newValue);
- notifier.listenObject(actualGate); // Add listener on gate
- }
- }
- } else if(gate.eContainer() instanceof InteractionUse) {
- // Block modification of actual gate's name
- notifier.unlistenObject(gate); // Delete listener on gate
- gate.setName(notification.getOldStringValue());
- notifier.listenObject(gate); // Add listener on gate
- }
- }
-
- if((getModel() != null) && (getModel() == notification.getNotifier())) {
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
- refreshShadow();
-
- super.handleNotificationEvent(notification);
- }
-
- /**
- * Check if actual gate is attached to a formal gate
- *
- * @return true if there is a formal gate corresponding to the actual gate
- */
- private boolean checkActualGateExistence(Gate actualGate) {
- InteractionUse interactionUse = (InteractionUse)resolveSemanticElement();
- Interaction interaction = interactionUse.getRefersTo();
- if(interaction != null) {
- // Find if the corresponding formal gate exists
- for(Gate formalGate : interaction.getFormalGates()) {
- if(formalGate.getName().equals(actualGate.getName())) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Activate a listener for the interactionUse to Handle notification in the refered Interaction
- */
- @Override
- public void activate() {
- super.activate();
- if(resolveSemanticElement() instanceof InteractionUse) {
- InteractionUse interactionUse = (InteractionUse)resolveSemanticElement();
- Interaction interaction = interactionUse.getRefersTo();
- if(interaction != null) {
- // activate the listener on the referred interaction
- notifier.listenObject(interaction);
- for(Gate formalGate : interaction.getFormalGates()) {
- notifier.listenObject(formalGate);
- }
- }
-
- for(Gate actualGate : interactionUse.getActualGates()) {
- notifier.listenObject(actualGate);
- }
-
- }
- }
-
- /**
- * Deactivate a listener for the interactionUse to handle notification in the refered
- * Interaction
- */
- @Override
- public void deactivate() {
- super.deactivate();
- notifier.unlistenAll();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void removeNotify() {
- notifier.unlistenAll();
- super.removeNotify();
- }
-
- @Override
- public void performRequest(Request request) {
- if(request.getType().equals(REQ_OPEN)){
- InteractionUse interactionUse = (InteractionUse)resolveSemanticElement();
- Interaction interaction = interactionUse.getRefersTo();
- if(interaction == null) {
- MessageDialog.openWarning(Display.getCurrent().getActiveShell(), "Warning", "There is no referenced interaction!");
- return;
- }
- Diagram diagram = InteractionUseUtil.findDiagram(getNotationView(), interaction);
- if(diagram == null)
- MessageDialog.openWarning(Display.getCurrent().getActiveShell(), "Warning", "Cannot find diagram of the referenced interaction!");
- else
- InteractionUseUtil.openDiagram(diagram);
- return;
- }
- super.performRequest(request);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseName2EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseName2EditPart.java
deleted file mode 100644
index 1e8e77a74f5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseName2EditPart.java
+++ /dev/null
@@ -1,758 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class InteractionUseName2EditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5004;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public InteractionUseName2EditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.NodeLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.InteractionUse_3002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseName2EditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
- @Override
- public void performRequest(Request request) {
- if(request.getType().equals(REQ_OPEN)){
- getParent().performRequest(request);
- return;
- }
- super.performRequest(request);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseNameEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseNameEditPart.java
deleted file mode 100644
index a4f01235fc8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/InteractionUseNameEditPart.java
+++ /dev/null
@@ -1,750 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class InteractionUseNameEditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5003;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public InteractionUseNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.NodeLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.InteractionUse_3002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseNameEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java
deleted file mode 100644
index 29d985e0964..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineEditPart.java
+++ /dev/null
@@ -1,2286 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.BorderLayout;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.LayoutManager;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.ToolbarLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Insets;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.PrecisionPoint;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.ConnectionEditPart;
-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.commands.CompoundCommand;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.requests.CreateConnectionRequest;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.SlidableAnchor;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.IdentityAnchor;
-import org.eclipse.gmf.runtime.notation.Node;
-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.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.command.wrappers.GEFtoEMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.common.commands.PreserveAnchorsPositionCommand;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.anchors.LifelineAnchor;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.RectangularShadowBorder;
-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.parts.StateInvariantEditPart.StateInvariantLocator;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ElementCreationWithMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.InteractionCompartmentXYLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineAppliedStereotypeNodeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.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.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.LifelineDotLineCustomFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.locator.CenterLocator;
-import org.eclipse.papyrus.uml.diagram.sequence.locator.TimeMarkElementPositionLocator;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineCoveredByUpdater;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineModelChildrenHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineResizeHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.NotificationHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.StructuredClassifier;
-import org.eclipse.uml2.uml.TimeObservation;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class LifelineEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3001;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * True if the lifeline is in inline mode
- */
- private boolean inlineMode;
-
- /**
- * Notfier for listen and unlistend model element.
- */
- private NotificationHelper notifier = new NotificationHelper(new UIAdapterImpl() {
-
- @Override
- protected void safeNotifyChanged(Notification msg) {
- handleNotificationEvent(msg);
- }
- });
-
- /**
- * Layout role for inline mode
- */
- private LayoutEditPolicy inlineModeLayoutRole = createLayoutEditPolicy();;
-
- /**
- * Layout role for normal mode
- */
- private LayoutEditPolicy normalModeLayoutRole = new LifelineXYLayoutEditPolicy();
-
- /**
- * Layout role for drag drop
- */
- private DragDropEditPolicy dragDropEditPolicy = new DragDropEditPolicy();
-
- /**
- * @generated
- */
- public LifelineEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy() {
-
- @Override
- protected Command getCreateElementAndViewCommand(
- CreateViewAndElementRequest request) {
- Command command = super.getCreateElementAndViewCommand(request);
- CompositeCommand compositeCommand = new CompositeCommand("");
- if (command instanceof ICommandProxy) {
- ICommandProxy proxy = (ICommandProxy) command;
- ICommand realCmd = proxy.getICommand();
- compositeCommand.add(realCmd);
- }
-
- return command;
- }
- });
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LifelineItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
-
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineCanonicalEditPolicy());
-
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new LifelineXYLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new LifelineCreationEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ElementCreationWithMessageEditPolicy());
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new LifelineAppliedStereotypeNodeLabelDisplayEditPolicy());
- // 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);
-
- //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());
- // custom label, fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=383722
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new LifelineLabelEditPolicy());
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View)child.getModel();
- switch(UMLVisualIDRegistry.getVisualID(childView)) {
- case StateInvariantEditPart.VISUAL_ID:
- case TimeConstraintEditPart.VISUAL_ID:
- case TimeObservationEditPart.VISUAL_ID:
- case DurationConstraintEditPart.VISUAL_ID:
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
-
- return new BorderItemResizableEditPolicy();
-
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- if(request instanceof ChangeBoundsRequest)
- return getMoveResizeCommand((ChangeBoundsRequest)request);
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
-
- public Command getCommand(Request request) {
- Command command = null;
- if(REQ_MOVE_CHILDREN.equals(request.getType()))
- command = getMoveChildrenCommand(request);
- if(REQ_RESIZE_CHILDREN.equals(request.getType()) && request instanceof ChangeBoundsRequest)
- command = getMoveResizeCommand((ChangeBoundsRequest)request);
- if(command != null)
- return command;
-
- return super.getCommand(request);
- }
-
- private Command getMoveResizeCommand(ChangeBoundsRequest request) {
- List changeEditParts = request.getEditParts();
- if (changeEditParts != null && changeEditParts.size() > 0) {
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
- CompositeTransactionalCommand composite = new CompositeTransactionalCommand(editingDomain, null);
-
- LifelineEditPart parent = (LifelineEditPart)this.getHost();
- LifelineDotLineCustomFigure parentFig = (LifelineDotLineCustomFigure)parent.getContentPane();
- Rectangle parentBounds = parentFig.getBounds();
- for (Object o : changeEditParts) {
- if (o instanceof LifelineEditPart) {
- LifelineEditPart child = (LifelineEditPart)o;
- IFigure childFig = child.getFigure();
-
- Rectangle newBounds = childFig.getBounds().getCopy();
- Rectangle childConstraint = (Rectangle)parentFig.getLayoutManager().getConstraint(childFig);
- newBounds.setLocation(childConstraint.getLocation().getCopy());
-
- newBounds.translate(request.getMoveDelta());
- if (!request.getType().equals(RequestConstants.REQ_MOVE_CHILDREN)) {
- newBounds.resize(request.getSizeDelta());
- }
-
- // do not excceed parent
- if (newBounds.x < 0) {
- newBounds.width += newBounds.x;
- newBounds.x = 0;
- }
- if (newBounds.x + newBounds.width > parentBounds.width) {
- newBounds.width = parentBounds.width - newBounds.x;
- }
-
- ICommand boundsCommand = new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, new EObjectAdapter((View)child.getModel()), newBounds);
- composite.add(boundsCommand);
- composite.add(LifelineResizeHelper.createManualLabelSizeCommand((LifelineEditPart)child));
- }
- }
- return new ICommandProxy(composite.reduce());
- }
- return null;
- }
-
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new LifelineFigure();
- }
-
- /**
- * @generated
- */
- public LifelineFigure getPrimaryShape() {
- return (LifelineFigure)primaryShape;
- }
-
- /**
- * @generated NOT (update at each lifeline modification) update the locator with edit part reference
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof LifelineNameEditPart) {
- ((LifelineNameEditPart)childEditPart).setLabel(getPrimaryShape().getFigureLifelineLabelFigure());
- return true;
- }
-
- //Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
- if(childEditPart instanceof TimeConstraintEditPart) {
- // update the locator with edit part reference
- TimeMarkElementPositionLocator locator = new TimeMarkElementPositionLocator(getMainFigure(), PositionConstants.NONE);
- locator.setEditPart(childEditPart);
- getBorderedFigure().getBorderItemContainer().add(((TimeConstraintEditPart)childEditPart).getFigure(), locator);
- return true;
- }
-
- //Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
- if(childEditPart instanceof TimeObservationEditPart) {
- // update the locator with edit part reference
- TimeMarkElementPositionLocator locator = new TimeMarkElementPositionLocator(getMainFigure(), PositionConstants.NONE);
- locator.setEditPart(childEditPart);
- getBorderedFigure().getBorderItemContainer().add(((TimeObservationEditPart)childEditPart).getFigure(), locator);
- return true;
- }
-
- //Papyrus Gencode :Affixed locator for Lifelines to place element with a time bar
- if(childEditPart instanceof DurationConstraintEditPart) {
- // update the locator with edit part reference
- TimeMarkElementPositionLocator locator = new TimeMarkElementPositionLocator(getMainFigure(), PositionConstants.NONE);
- locator.setEditPart(childEditPart);
- getBorderedFigure().getBorderItemContainer().add(((DurationConstraintEditPart)childEditPart).getFigure(), locator);
- return true;
- }
-
- //Papyrus Gencode :Specific locator for the destructionEvent
- if(childEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- IBorderItemLocator locator = new CenterLocator(getMainFigure(), PositionConstants.SOUTH);
- getBorderedFigure().getBorderItemContainer().add(((DestructionOccurrenceSpecificationEditPart)childEditPart).getFigure(), locator);
- return true;
- }
-
- if(childEditPart instanceof StateInvariantEditPart) {
- IBorderItemLocator locator = new StateInvariantLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((StateInvariantEditPart)childEditPart).getFigure(), locator);
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof LifelineNameEditPart) {
- return true;
- }
- if(childEditPart instanceof StateInvariantEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((StateInvariantEditPart)childEditPart).getFigure());
- return true;
- }
- if(childEditPart instanceof TimeConstraintEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((TimeConstraintEditPart)childEditPart).getFigure());
- return true;
- }
- if(childEditPart instanceof TimeObservationEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((TimeObservationEditPart)childEditPart).getFigure());
- return true;
- }
- if(childEditPart instanceof DurationConstraintEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((DurationConstraintEditPart)childEditPart).getFigure());
- return true;
- }
- if(childEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((DestructionOccurrenceSpecificationEditPart)childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * {@inheritDoc}
- *
- * @generated NOT Execution specification handling
- */
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- // Execution specification handling
- if(editPart instanceof BehaviorExecutionSpecificationEditPart || editPart instanceof ActionExecutionSpecificationEditPart || editPart instanceof CombinedFragment2EditPart) {
- return getPrimaryShape().getFigureLifelineDotLineFigure();
- }
- if(editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * Overrides to disable the defaultAnchorArea. The edge is now more stuck with the middle of the
- * figure.
- *
- * @generated NOT
- */
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new LifelineDotLineCustomFigure.DefaultSizeNodeFigureEx(100, 250) {
-
- /**
- * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#isDefaultAnchorArea(org.eclipse.draw2d.geometry.PrecisionPoint)
- */
- @Override
- protected boolean isDefaultAnchorArea(PrecisionPoint p) {
- return false;
- }
-
- public boolean containsPoint(int x, int y) {
- if (primaryShape != null) {
- return primaryShape.containsPoint(x, y);
- }
- return super.containsPoint(x, y);
- }
- };
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane. Respects layout one may have set
- * for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated NOT Execution specification handling
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if(nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
-
- // Execution specification handling
- if(nodeShape instanceof LifelineFigure) {
- LifelineFigure lFigure = (LifelineFigure)nodeShape;
- return lFigure.getFigureLifelineDotLineFigure();
- }
-
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if(contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if(primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if(getPrimaryShape() instanceof NodeFigure){
- ((NodeFigure)getPrimaryShape()).setLineWidth(width);
- }else if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(LifelineNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- @Override
- protected List getModelChildren() {
- Object model = getModel();
- //Fixed bug about inverse order for ExecutionSpecifications.
- if (model instanceof View){
- return LifelineModelChildrenHelper.getModelChildren((View)model);
- }
- return super.getModelChildren();
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public class LifelineFigure extends LifelineDotLineCustomFigure.NodeNamedElementFigureEx {
-
- /**
- * @generated
- */
- private WrappingLabel fFigureLifelineLabelFigure;
-
- /**
- * @generated
- */
- private RectangleFigure fFigureLifelineNameContainerFigure;
-
- /**
- * @generated
- */
- private RectangleFigure fFigureExecutionsContainerFigure;
-
- /**
- * @generated
- */
- private LifelineDotLineCustomFigure fFigureLifelineDotLineFigure;
-
- /**
- * @generated NOT call super, remove createContents, moved overall configuration to createCompositeFigureStructure
- */
- public LifelineFigure() {
- // call super
- super();
-
- // moved overall configuration to createCompositeFigureStructure
- //BorderLayout layoutThis = new BorderLayout();
- //this.setLayoutManager(layoutThis);
- //this.setMaximumSize(new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(200)));
- // remove createContents
- //createContents();
- }
-
- public int getNameContainerPreferredHeight(int wHint) {
- return fFigureLifelineNameContainerFigure.getPreferredSize(wHint, -1).height;
- }
-
- /**
- * Get the rectangle which contains all labels
- *
- * @see org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure#getDefaultLabelsContainer()
- * @return lifeline labels rectangle
- */
- @Override
- protected IFigure getDefaultLabelsContainer() {
- return getFigureLifelineNameContainerFigure();
- }
-
- /**
- * Create the composite structure.
- *
- * @see org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure#createCompositeFigureStructure()
- */
- @Override
- protected void createCompositeFigureStructure() {
- BorderLayout layoutThis = new BorderLayout();
- this.setLayoutManager(layoutThis);
- this.setOpaque(false);
- this.setPreferredSize(new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(200)));
- createContents();
- }
-
- /**
- * Paint the label rectangle as background instead of the whole figure
- *
- * @see org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure#paintBackground(org.eclipse.draw2d.Graphics,
- * org.eclipse.draw2d.geometry.Rectangle)
- * @param graphics
- * graphics tool
- * @param rectangle
- * unused
- */
- @Override
- protected void paintBackground(Graphics graphics, Rectangle rectangle) {
- super.paintBackground(graphics, getFigureLifelineNameContainerFigure().getBounds());
- }
-
- /**
- * Get the figure on which the border must be drawn.
- *
- * @see org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure#getBorderedFigure()
- * @return the rectangle containing labels
- */
- @Override
- protected IFigure getBorderedFigure() {
- return getFigureLifelineNameContainerFigure();
- }
-
- /**
- * Construct the appropriate border
- *
- * @see org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure#getDefaultBorder(org.eclipse.swt.graphics.Color)
- * @param borderColor
- * the color of the border
- * @return the border
- */
- @Override
- protected Border getDefaultBorder(Color borderColor) {
- int margin = getMapMode().DPtoLP(7);
- MarginBorder defaultBorder = new MarginBorder(margin, margin, margin, margin);
- return defaultBorder;
- }
-
- /**
- * Get layout to display content of properties compartment.
- *
- * @return the layout
- */
- protected LayoutManager getPropertiesCompartmentLayout() {
- ToolbarLayout layout = new ToolbarLayout(false);
- layout.setStretchMinorAxis(true);
- return layout;
- }
-
- /**
- * Create the name label with width wrap
- *
- * @see org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure#createNameLabel()
- */
- @Override
- protected void createNameLabel() {
- super.createNameLabel();
- //nameLabel.setTextWrap(true);
- }
-
- /**
- * @generated NOT remove label creation, change layout
- */
- private void createContents() {
-
- fFigureLifelineNameContainerFigure = new RectangleFigure();
- // do not fill to enable gradient
- fFigureLifelineNameContainerFigure.setFill(false);
-
- fFigureLifelineNameContainerFigure.setBorder(new MarginBorder(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7)));
-
- this.add(fFigureLifelineNameContainerFigure, BorderLayout.TOP);
- // change layout
- ToolbarLayout layout = new ToolbarLayout(false);
- layout.setMinorAlignment(ToolbarLayout.ALIGN_CENTER);
- fFigureLifelineNameContainerFigure.setLayoutManager(layout);
-
- // remove label creation (created by parent figure)
- // fFigureLifelineLabelFigure = new WrappingLabel();
- //
- //
- //
- //
- // fFigureLifelineLabelFigure.setText("<...>");
- //
- //
- //
- //
- // fFigureLifelineLabelFigure.setTextWrap(true);
- //
- //
- //
- //
- // fFigureLifelineLabelFigure.setAlignment(PositionConstants.CENTER);
- //
- //
- //
- // fFigureLifelineNameContainerFigure.add(fFigureLifelineLabelFigure);
-
- fFigureExecutionsContainerFigure = new RectangleFigure();
- fFigureExecutionsContainerFigure.setFill(false);
- fFigureExecutionsContainerFigure.setOutline(false);
- fFigureExecutionsContainerFigure.setLineWidth(1);
-
- this.add(fFigureExecutionsContainerFigure, BorderLayout.CENTER);
- fFigureExecutionsContainerFigure.setLayoutManager(new StackLayout());
-
- fFigureLifelineDotLineFigure = new LifelineDotLineCustomFigure();
-
- fFigureExecutionsContainerFigure.add(fFigureLifelineDotLineFigure);
-
- }
-
- /**
- * @generated NOT get label from super figure
- */
- public WrappingLabel getFigureLifelineLabelFigure() {
- return getNameLabel();
- }
-
- /**
- * @generated
- */
- public RectangleFigure getFigureLifelineNameContainerFigure() {
- return fFigureLifelineNameContainerFigure;
- }
-
- /**
- * @generated
- */
- public RectangleFigure getFigureExecutionsContainerFigure() {
- return fFigureExecutionsContainerFigure;
- }
-
- /**
- * @generated
- */
- public LifelineDotLineCustomFigure getFigureLifelineDotLineFigure() {
- return fFigureLifelineDotLineFigure;
- }
-
- public boolean containsPoint(int x, int y) {
- boolean contains = super.containsPoint(x, y);
- if (!contains) {
- return false;
- }
- if (fFigureLifelineNameContainerFigure != null
- && fFigureLifelineNameContainerFigure.containsPoint(x, y)) {
- return true;
- } else if (fFigureLifelineDotLineFigure != null) {
- Rectangle bounds = fFigureLifelineDotLineFigure
- .getDashLineRectangle().getBounds().getCopy();
- bounds.expand(4, 0);
- if (bounds.contains(x, y))
- return true;
- }
-
- return isChildLifelineSelected(x,y);
- }
-
- @Override
- public void setLineWidth(int w) {
- if(w < 0)
- return;
- super.setLineWidth(w);
- fFigureLifelineNameContainerFigure.setLineWidth(w);
- fFigureLifelineDotLineFigure.setLineWidth(w);
- }
-
- @Override
- public void setShadow(boolean shadow) {
- if(!shadow)
- fFigureLifelineNameContainerFigure.setBorder(new MarginBorder(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7)));
- else{
- RectangularShadowBorder b = new RectangularShadowBorder(3, getForegroundColor()){
- @Override
- public Insets getInsets(IFigure figure) {
- Insets insetsNew = new Insets(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7));
- insetsNew.bottom = MapModeUtil.getMapMode(figure).DPtoLP(insetsNew.bottom + 3);
- insetsNew.right = MapModeUtil.getMapMode(figure).DPtoLP(insetsNew.right + 3);
- return insetsNew;
- }
- };
- fFigureLifelineNameContainerFigure.setBorder(b);
- }
- }
- }
-
- private boolean isChildLifelineSelected(int x, int y){
- if (inlineMode) {
- List parts = getChildren();
- for(Object p : parts)
- if(p instanceof LifelineEditPart) {
- LifelineEditPart child = (LifelineEditPart)p;
- IFigure fig = child.getFigure();
- if(fig.containsPoint(x, y))
- return true;
- }
- }
- return false;
- }
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Lifeline", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Lifeline", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("Lifeline", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("Lifeline", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * This operation returns the ExecutionSpecification EditParts contained in the Lifeline
- * EditPart
- *
- * @return the list of ExecutionSpecification EditParts
- */
- public List<ShapeNodeEditPart> getChildShapeNodeEditPart() {
- List<ShapeNodeEditPart> executionSpecificationList = new ArrayList<ShapeNodeEditPart>();
- for(Object obj : getChildren()) {
- if(obj instanceof BehaviorExecutionSpecificationEditPart) {
- executionSpecificationList.add((ShapeNodeEditPart)obj);
- } else if(obj instanceof ActionExecutionSpecificationEditPart) {
- executionSpecificationList.add((ShapeNodeEditPart)obj);
- } else if(obj instanceof CombinedFragment2EditPart) {
- executionSpecificationList.add((ShapeNodeEditPart)obj);
- }
- }
- return executionSpecificationList;
- }
-
- /**
- * This operation returns the InnerConnectableElement EditParts contained in the Lifeline
- * EditPart
- *
- * @return the list of InnerConnectableElement EditParts
- */
- public List<LifelineEditPart> getInnerConnectableElementList() {
- List<LifelineEditPart> propertyList = new ArrayList<LifelineEditPart>();
- for(Object obj : getChildren()) {
- if(obj instanceof LifelineEditPart) {
- propertyList.add((LifelineEditPart)obj);
- }
- }
- return propertyList;
- }
-
- /**
- * Handle lifeline covered by and destruction event
- *
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- Object feature = notification.getFeature();
-
- if(UMLPackage.eINSTANCE.getLifeline_CoveredBy().equals(feature)) {
- // Handle coveredBy attribute
- Object newValue = notification.getNewValue();
- if(notification.getOldValue() instanceof MessageOccurrenceSpecification) {
- notifier.unlistenObject((Notifier)notification.getOldValue());
- if(newValue == null) {
- //updateCrossEnd();
- }
- }
- if(newValue instanceof MessageOccurrenceSpecification) {
- MessageOccurrenceSpecification newMessageOccurrenceSpecification = (MessageOccurrenceSpecification)newValue;
- notifier.listenObject(newMessageOccurrenceSpecification);
- // if(newMessageOccurrenceSpecification.getEvent() instanceof DestructionEvent) {
- // getPrimaryShape().getFigureLifelineDotLineFigure().setCrossAtEnd(true);
- // getPrimaryShape().repaint();
- // }
- }
- } else if(UMLPackage.eINSTANCE.getOccurrenceSpecification().equals(feature)) {
- // // Handle destruction event
- // Object newValue = notification.getNewValue();
- // if(notification.getOldValue() instanceof DestructionEvent && newValue instanceof DestructionEvent == false) {
- // //updateCrossEnd();
- // }
- // if(newValue instanceof DestructionEvent) {
- // getPrimaryShape().getFigureLifelineDotLineFigure().setCrossAtEnd(true);
- // getPrimaryShape().repaint();
- // }
- }
- super.handleNotificationEvent(notification);
- // fixed bug (id=364711) when bounds changed update coveredBys with the
- // figure's bounds.
- if (notification.getNotifier() instanceof Bounds) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- LifelineCoveredByUpdater updater = new LifelineCoveredByUpdater();
- updater.update(LifelineEditPart.this);
- }
- });
- }
- }
-
-
- /**
- * Update the rectangle bounds.
- * In case of a creation, the lifeline width and height will be 0. Get the preferred size
- * In case of a move, when the lifeline has not be resize, the width or height may be set to -1. Get the according figure bounds.
- *
- * @param rect
- * the rectangle to update
- */
- private void updateRectangleBounds(Rectangle rect) {
-
- // When moving the lifeline
- if(rect.width == -1) {
- rect.width = getFigure().getBounds().width;
- }
- if(rect.height == -1) {
- rect.height = getFigure().getBounds().height;
- }
- if(rect.x == -1) {
- rect.x = getFigure().getBounds().x;
- }
- if(rect.y == -1) {
- rect.y = getFigure().getBounds().y;
- }
-
- // When creating the lifeline
- if(rect.width == 0) {
- rect.width = getFigure().getPreferredSize().width;
- }
- if(rect.height == 0) {
- rect.height = getFigure().getPreferredSize().height;
- }
- }
-
- /**
- * set the bounds of the lifeline.
- *
- * @param rect
- * the rectangle corresponding to the bounds.
- */
- public void updateLifelineBounds(final Rectangle rect) {
-
- final Bounds bounds = getBounds();
- if(bounds != null) {
- AbstractCommand cmd = new AbstractCommand() {
-
- /**
- * {@inheritDoc}
- */
- public boolean canExecute() {
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public void execute() {
- bounds.setX(rect.x);
- bounds.setY(rect.y);
- bounds.setWidth(rect.width);
- bounds.setHeight(rect.height);
- }
-
- /**
- * {@inheritDoc}
- */
- public void redo() {
- execute();
- }
-
- /**
- * This command is undoable.
- */
- @Override
- public boolean canUndo() {
- return false;
- }
- };
-
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), cmd, true);
-
- }
- }
-
- private Bounds getBounds() {
- if(getModel() instanceof Node) {
- Node node = (Node)getModel();
- if(node.getLayoutConstraint() instanceof Bounds) {
- return (Bounds)node.getLayoutConstraint();
- }
- }
- return null;
- }
-
- private int oldNameContainerHeight = 0;
-
- /**
- * This method automatically moves a lifeline according to the change of the size of the name and stereotypes container.
- * This avoids the move of the dash line and its ES.
- */
- public void updateLifelinePosition() {
- Bounds bounds = getBounds();
- if(bounds != null) {
- Rectangle rect = new Rectangle(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());
-
- // retrieve the real bounds in updatedRect because we need the real width
- Rectangle updatedRect = rect.getCopy();
- updateRectangleBounds(updatedRect);
-
- /*
- // use the real width to compute the preferred height which will be used during the layout
- int newNameContainerHeight = getPrimaryShape().getNameContainerPreferredHeight(updatedRect.width); //fix width would cause height expand
-
- if(oldNameContainerHeight != newNameContainerHeight) {
-
- if(oldNameContainerHeight != 0) {
- int heightDiff = oldNameContainerHeight - newNameContainerHeight;
-
- if(rect.height != -1) {
- rect.height -= heightDiff;
- }
- //adjust height offset
- if(!(this.getParent() instanceof LifelineEditPart))
- rect.y += heightDiff;
- updateLifelineBounds(rect);
- }
-
- oldNameContainerHeight = newNameContainerHeight;
- }
- */
- Dimension size = getPrimaryShape().getFigureLifelineNameContainerFigure().getPreferredSize(-1, oldNameContainerHeight);
- if(!LifelineResizeHelper.isManualSize(this)){
- if(size.width != rect.width){
- moveExecutionParts(new Dimension(size.width - rect.width, 0));
- rect.width = size.width;
- updateLifelineBounds(rect);
- }
- }
- }
- }
-
- protected void moveExecutionParts(Dimension sizeDelta) {
- {
- Rectangle leftMostExecution = null;
- List<ShapeNodeEditPart> childShapeNodeEditPart = this.getChildShapeNodeEditPart();
- for(ShapeNodeEditPart executionSpecificationEP : childShapeNodeEditPart) {
- if(executionSpecificationEP.resolveSemanticElement() instanceof ExecutionSpecification) {
- Rectangle bounds = executionSpecificationEP.getFigure().getBounds();
- Point point = bounds.getLocation();
- if(leftMostExecution == null || leftMostExecution.x > point.x )
- leftMostExecution = bounds;
- }
- }
- if(leftMostExecution == null)
- return;
-
- Rectangle dotLineBounds = this.getPrimaryShape().getFigureLifelineDotLineFigure().getBounds();
- int targetX = (int) (dotLineBounds.x + Math.round((dotLineBounds.width - leftMostExecution.width) /2.0 ) );
- sizeDelta.width += (targetX - leftMostExecution.x); // adjust width to keep execution in center line
- }
-
- { // move all executions
- ChangeBoundsRequest request = new ChangeBoundsRequest();
- request.setMoveDelta(new Point(0, 0));
- request.setSizeDelta(sizeDelta);
- request.setEditParts(this);
- Point loc = this.getFigure().getBounds().getTopRight().getCopy();
- this.getFigure().translateToAbsolute(loc);
- request.setLocation(loc);
- request.setType(RequestConstants.REQ_MOVE_CHILDREN);
-
- CompoundCommand compoundCmd = new CompoundCommand();
- compoundCmd.setLabel("Move or Resize");
- InteractionCompartmentXYLayoutEditPolicy.addLifelineResizeChildrenCommand(compoundCmd, request, (LifelineEditPart)this, 1);
-
- if(compoundCmd.canExecute())
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), new GEFtoEMFCommandWrapper(compoundCmd.unwrap()), true);
- }
- }
-
- /**
- * Overrides to return the DashLineFigure instead of this figure. This is necessary for the
- * connections anchor.
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getNodeFigure()
- */
- @Override
- public NodeFigure getNodeFigure() {
- return getDashLineFigure();
- }
-
- /**
- * Overrides because getNodeFigure() doesn't return the getFigure() anymore.
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#setBackgroundColor(org.eclipse.swt.graphics.Color)
- */
- @Override
- public void setBackgroundColor(Color c) {
- getPrimaryShape().getFigureLifelineNameContainerFigure().setFill(true);
- super.setBackgroundColor(c);
- }
-
- @Override
- protected void setGradient(GradientData gradient) {
- getPrimaryShape().getFigureLifelineNameContainerFigure().setFill(false);
- super.setGradient(gradient);
- }
-
- /**
- * Create specific anchor to handle connection on top, on center and on bottom of the lifeline
- */
- @Override
- public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connEditPart) {
- if(connEditPart instanceof Message4EditPart) {
- // Create message
- return new LifelineAnchor(getPrimaryShape().getFigureLifelineNameContainerFigure());
- }
-
- if(connEditPart instanceof Message2EditPart){
- String terminal = AnchorHelper.getAnchorId(getEditingDomain(), connEditPart, false);
- if(terminal.length() > 0){
- int start = terminal.indexOf("{") + 1;
- PrecisionPoint pt = SlidableAnchor.parseTerminalString(terminal);
- boolean rightHand = true;
- if(start > 0){
- if(terminal.charAt(start) == 'L')
- rightHand = false;
- }
- else{
- Connection c = (Connection)connEditPart.getFigure();
- PointList list = c.getPoints();
- if(list.getPoint(0).x > list.getPoint(1).x)
- rightHand = false;
- }
- return new AnchorHelper.SideAnchor(getNodeFigure(), pt, rightHand);
- }
- }
- return super.getTargetConnectionAnchor(connEditPart);
- }
-
- /**
- * Create specific anchor to handle connection on top, on center and on bottom of the lifeline
- */
- @Override
- public ConnectionAnchor getTargetConnectionAnchor(Request request) {
- if(request instanceof CreateUnspecifiedTypeConnectionRequest) {
- CreateUnspecifiedTypeConnectionRequest createRequest = (CreateUnspecifiedTypeConnectionRequest)request;
- List<?> relationshipTypes = createRequest.getElementTypes();
- for(Object obj : relationshipTypes) {
- if(UMLElementTypes.Message_4006.equals(obj)) {
- return LifelineMessageCreateHelper.getCreateMessageAnchor(this, request, ((CreateUnspecifiedTypeConnectionRequest) request).getLocation().getCopy());
- }
- }
- } else if(request instanceof ReconnectRequest) {
- ReconnectRequest reconnectRequest = (ReconnectRequest)request;
- ConnectionEditPart connectionEditPart = reconnectRequest.getConnectionEditPart();
- if(connectionEditPart instanceof Message4EditPart) {
- return LifelineMessageCreateHelper.getCreateMessageAnchor(this, request, ((ReconnectRequest)request).getLocation().getCopy() );
- }
- }
-
- ConnectionAnchor anchor = super.getTargetConnectionAnchor(request);
- if(anchor instanceof SlidableAnchor) {
- return createSideAnchor(request, (SlidableAnchor)anchor);
- }
- return anchor;
- }
-
- protected ConnectionAnchor createSideAnchor(Request request, SlidableAnchor sa) {
- Point loc = AnchorHelper.getRequestLocation(request);
- PrecisionPoint pt = SlidableAnchor.parseTerminalString( sa.getTerminal());
- if(loc == null || pt == null)
- return sa;
-
- IFigure fig = this.getDashLineFigure();
- Rectangle bounds = fig.getBounds().getCopy();
- fig.translateToAbsolute(bounds);
- boolean rightHand = true;
- if(loc.x < bounds.getCenter().x)
- rightHand = false;
- return new AnchorHelper.SideAnchor(getNodeFigure(), pt, rightHand);
- }
-
-
- /**
- * Create the dashLine figure
- */
- private NodeFigure getDashLineFigure() {
- NodeFigure centerFigure = null;
- if(getContentPane() instanceof LifelineDotLineCustomFigure) {
- centerFigure = ((LifelineDotLineCustomFigure)getContentPane()).getDashLineRectangle();
- }
- return centerFigure;
- }
-
- public InteractionInteractionCompartmentEditPart getParentInteractionCompartmentEditPart(){
- EditPart part = this;
- do{
- part = part.getParent();
- }while(part != null && !(part instanceof InteractionInteractionCompartmentEditPart));
- return (InteractionInteractionCompartmentEditPart) part;
- }
-
- public boolean ignoreRequest(Request request) { // moving editpart causing to add child
- if(request instanceof ChangeBoundsRequest && (request.getType().equals(RequestConstants.REQ_ADD) || request.getType().equals(RequestConstants.REQ_DROP))){
- List parts = ((ChangeBoundsRequest) request).getEditParts();
- if(parts != null){
- for(Object obj : parts)
- if(obj instanceof CommentEditPart || obj instanceof ConstraintEditPart || obj instanceof TimeObservationEditPart || obj instanceof CombinedFragmentEditPart){
- return true;
- }
- }
- }
-
- return false;
- }
-
- public void showTargetFeedback(Request request) {
- if(ignoreRequest(request)) {
- return;
- }
-
- super.showTargetFeedback(request);
- }
-
- /**
- * Handle message creation for execution specification
- */
- @Override
- public Command getCommand(Request request) {
- if(ignoreRequest(request))
- return null;
-
- if(request instanceof DropObjectsRequest){ // drop from model explorer
- DropObjectsRequest dropRequest = (DropObjectsRequest) request;
- if (dropRequest.getObjects().size() > 0 ){
- Object obj = dropRequest.getObjects().get(0);
- if(obj instanceof Comment || obj instanceof Constraint || obj instanceof TimeObservation) {
- InteractionInteractionCompartmentEditPart part = getParentInteractionCompartmentEditPart();
- if(part != null)
- return part.getCommand(request);
- }
- }
- }
-
- if(request instanceof CreateConnectionRequest) {
- CreateConnectionRequest createConnectionRequest = (CreateConnectionRequest)request;
- EditPart target = createConnectionRequest.getTargetEditPart();
- if(target instanceof LifelineEditPart) {
- LifelineEditPart lifelineEditPart = (LifelineEditPart)target;
- Rectangle lifelineBounds = lifelineEditPart.getContentPane().getBounds();
- for(ShapeNodeEditPart executionSpecificationEditPart : lifelineEditPart.getChildShapeNodeEditPart()) {
- IFigure executionSpecificationFigure = executionSpecificationEditPart.getFigure();
- Rectangle esBounds = executionSpecificationFigure.getBounds().getCopy();
- esBounds.x = lifelineBounds.x;
- esBounds.width = lifelineBounds.width;
- if(createConnectionRequest.getLocation() != null) {
- Point location = createConnectionRequest.getLocation().getCopy();
- executionSpecificationFigure.translateToRelative(location);
- if(esBounds.contains(location)) {
- createConnectionRequest.setTargetEditPart(executionSpecificationEditPart);
- return executionSpecificationEditPart.getCommand(request);
- }
- }
- }
- } else {
- return target.getCommand(request);
- }
- }
- return super.getCommand(request);
- }
-
- /**
- * Activate listeners for Lifeline to handle notification in the message occurence specification
- */
- @Override
- public void activate() {
- //updateCrossEnd();
- super.activate();
- }
-
- /**
- * Desactivate listeners for Lifeline to handle notification in the message occurence
- * specification
- */
- @Override
- public void deactivate() {
- notifier.unlistenAll();
- super.deactivate();
- }
-
- /**
- * Remove listeners for Lifeline to handle notification in the message occurence specification
- */
- @Override
- public void removeNotify() {
- notifier.unlistenAll();
- super.removeNotify();
- }
-
- /**
- * Configure inline mode
- */
- @Override
- protected void refreshChildren() {
- super.refreshChildren();
- configure(isInlineMode(), true);
- }
-
- @Override
- public void refresh() {
- configure(isInlineMode(), false);
- super.refresh();
- }
-
- /**
- * Determine inline capability
- *
- * @return True if inline mode is possible
- */
- public boolean isInlineCapability() {
- List<Property> properties = getAvailableProperties();
- if(properties != null && !properties.isEmpty()) {
- return inlineMode || getChildren().size() < 2;
- }
-
- return false;
- }
-
- /**
- * Get the inline mode
- *
- * @return True if the lifeline is in inline mode and if there are properties, else false
- */
- public boolean isInlineMode() {
- // for(Object o : getChildren()) {
- // if(o instanceof LifelineEditPart) {
- // return true;
- // }
- // }
- List models = getModelChildren();
- for (Object o : models)
- if(o instanceof View) {
- View view = (View) o;
- if (UMLVisualIDRegistry.getVisualID(view.getType()) == LifelineEditPart.VISUAL_ID && view.getElement() instanceof Lifeline)
- return true;
- }
-
- return false;
- }
-
- /**
- * Configure the lifeline
- *
- * @param inlineMode
- * True if the lifeline is in inline mode
- */
- private void configure(boolean inlineMode, boolean refresh) {
- (getPrimaryShape().getFigureLifelineDotLineFigure()).configure(inlineMode, getInnerConnectableElementList().size());
- if (this.inlineMode != inlineMode) {
- this.inlineMode = inlineMode;
- if (inlineMode) {
- installEditPolicy(EditPolicy.LAYOUT_ROLE, inlineModeLayoutRole);
- removeEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE);
- } else {
- installEditPolicy(EditPolicy.LAYOUT_ROLE, normalModeLayoutRole);
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, dragDropEditPolicy);
- }
- if (refresh)
- refreshVisuals();
- }
- }
-
- /**
- * Return the inner ConnectableElements of the lifeline
- *
- * @return inner ConnectableElements
- */
- public List<Property> getProperties() {
- Lifeline lifeline = (Lifeline)resolveSemanticElement();
- return getProperties(lifeline);
- }
-
- /**
- * Get available properties
- *
- * @return Only not already used properties
- */
- public List<Property> getAvailableProperties() {
- List<Property> properties = getProperties();
- if(properties != null) {
- for(EditPart editPart : (List<EditPart>)getChildren()) {
- if(editPart instanceof LifelineEditPart) {
- Lifeline lifeline = (Lifeline)((LifelineEditPart)editPart).resolveSemanticElement();
- ConnectableElement represents = lifeline.getRepresents();
- if(properties.contains(represents)) {
- properties.remove(represents);
- }
- }
- }
- }
- return properties;
- }
-
- /**
- * Return the inner ConnectableElements of the lifeline
- *
- * @param lifeline
- * The lifeline
- * @return inner ConnectableElements
- */
- // TODO Extract in a helper
- public static List<Property> getProperties(Lifeline lifeline) {
- if(lifeline != null) {
- ConnectableElement represents = lifeline.getRepresents();
- if(represents != null) {
- Type type = represents.getType();
- if(type instanceof StructuredClassifier) {
- StructuredClassifier structuredClassifier = (StructuredClassifier)type;
-
- if(!structuredClassifier.getAllAttributes().isEmpty()) {
- return new ArrayList<Property>(((StructuredClassifier)type).getAllAttributes());
- }
- }
- }
- }
-
- return null;
- }
-
- public static class PreserveAnchorsPositionCommandEx extends PreserveAnchorsPositionCommand{
-
- public PreserveAnchorsPositionCommandEx(ShapeNodeEditPart shapeEP, Dimension sizeDelta, int preserveAxis) {
- super(shapeEP, sizeDelta, preserveAxis);
- }
-
- public PreserveAnchorsPositionCommandEx(ShapeNodeEditPart shapeEP, Dimension sizeDelta, int preserveAxis, IFigure figure, int resizeDirection) {
- super(shapeEP, sizeDelta, preserveAxis, figure, resizeDirection);
- }
-
- @Override
- protected String getNewIdStr(IdentityAnchor anchor) {
- String res = super.getNewIdStr(anchor);
- String id = anchor.getId();
- int start = id.indexOf('{');
- if(start > 0)
- res = res + id.substring(start);
-
- return res;
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineNameEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineNameEditPart.java
deleted file mode 100644
index 4e1624e6a9a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/LifelineNameEditPart.java
+++ /dev/null
@@ -1,768 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class LifelineNameEditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5002;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public LifelineNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.NodeLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- figure.setTextWrap(false); // If the width is too small, the text will be displayed in part and suffixed by "..."
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Lifeline_3001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineNameEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * This methods is no more generated to handle the case of editing the name of a lifeline
- * with a directEdition when its properties represents and decomposedAs are null
- *
- * @generated NOT
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- Lifeline lifeline = (Lifeline)resolveSemanticElement();
- if(lifeline.getRepresents() != null || lifeline.getDecomposedAs() != null) {
- directEditionMode = IDirectEdition.NO_DIRECT_EDITION;
- }
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- final ExtendedDirectEditionDialog dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), dialog.getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated NOT
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getParent().getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if(theRequest instanceof DirectEditRequest && getEditText().equals(getLabelText())) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated NOT (update at each lifeline name modification) handle possible change in the name container size
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- Object notifier = event.getNotifier();
- Lifeline lifeline = (Lifeline)this.resolveSemanticElement();
- // handle possible change in the name container size
- // In AutoSize mode, the width should be resized if the content of the text gets changed. see https://bugs.eclipse.org/bugs/show_bug.cgi?id=383723
- if(notifier.equals(lifeline.getRepresents()) || 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) {
- ((LifelineEditPart)getParent()).updateLifelinePosition();
- }
-
- if(notifier instanceof EAnnotation && ((EAnnotation)notifier).getSource().equals(VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION) ){
- ((LifelineEditPart)getParent()).updateLifelinePosition();
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message2EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message2EditPart.java
deleted file mode 100644
index d40b38c87e6..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message2EditPart.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.PolylineDecoration;
-import org.eclipse.draw2d.RotatableDecoration;
-import org.eclipse.draw2d.geometry.PointList;
-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.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.Message2ItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class Message2EditPart extends AbstractMessageEditPart
-
-implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4004;
-
- /**
- * @generated
- */
- public Message2EditPart(View view) {
- super(view);
- }
-
- /**
- * Installs a specific message router on the edit part.
- *
- * @generated NOT
- */
- protected void installRouter() {
- getConnectionFigure().setConnectionRouter(LifelineChildGraphicalNodeEditPolicy.messageRouter);
- getConnectionFigure().setCursor(org.eclipse.gmf.runtime.gef.ui.internal.l10n.Cursors.CURSOR_SEG_MOVE);
- refreshBendpoints();
- }
-
- /**
- * Ignore routing style since we are using a custom router and a custom ConnectionBendpointEditPolicy.
- */
- protected void refreshRoutingStyles() {
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new Message2ItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
- installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName2EditPart) {
- ((MessageName2EditPart)childEditPart).setLabel(getPrimaryShape().getFigureMessageAsyncLabelFigure());
- return true;
- }
- if(childEditPart instanceof MessageAsyncAppliedStereotypeEditPart) {
- ((MessageAsyncAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName2EditPart) {
- return true;
- }
- if(childEditPart instanceof MessageAsyncAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model so you may safely remove
- * <i>generated</i> tag and modify it.
- *
- * @generated
- */
-
- protected Connection createConnectionFigure() {
- return new MessageAsync();
- }
-
- /**
- * @generated
- */
- public MessageAsync getPrimaryShape() {
- return (MessageAsync)getFigure();
- }
-
- /**
- * @generated NOT inherits from UMLEdgeFigure to manage stereotype label
- */
- public class MessageAsync extends MessageFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fFigureMessageAsyncLabelFigure;
-
- /**
- * @generated
- */
- private WrappingLabel fAppliedStereotypeLabel;
-
- /**
- * @generated NOT call the super constructor
- */
- public MessageAsync() {
- super();
-
- createContents();
- setTargetDecoration(createTargetDecoration());
- }
-
- /**
- * @generated NOT
- */
- protected void createContents() {
- super.createContents();
-
- fFigureMessageAsyncLabelFigure = new WrappingLabel();
- fFigureMessageAsyncLabelFigure.setText("");
- fFigureMessageAsyncLabelFigure.setForegroundColor(ColorConstants.black);
-
- fFigureMessageAsyncLabelFigure.setFont(FFIGUREMESSAGEASYNCLABELFIGURE_FONT);
-
- this.add(fFigureMessageAsyncLabelFigure);
-
- }
-
- /**
- * @generated
- */
- private RotatableDecoration createTargetDecoration() {
- PolylineDecoration df = new PolylineDecoration();
- df.setForegroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
- return df;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getFigureMessageAsyncLabelFigure() {
- return fFigureMessageAsyncLabelFigure;
- }
-
- /**
- * @generated NOT get the stereotype label of super class
- */
- public WrappingLabel getAppliedStereotypeLabel() {
- return super.getAppliedStereotypeLabel();
- }
-
- }
-
- /**
- * @generated
- */
- static final Font FFIGUREMESSAGEASYNCLABELFIGURE_FONT = new Font(Display.getCurrent(), "SANS", 9, SWT.NORMAL);
-
- /**
- * Block message sort modification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- SequenceUtil.handleMessageSortChange(getEditingDomain(), notification, (Message)resolveSemanticElement(), MessageSort.ASYNCH_CALL_LITERAL);
- super.handleNotificationEvent(notification);
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @Override
- public void showSourceFeedback(Request request) {
- if(request instanceof CreateUnspecifiedTypeRequest) {
- getSource().showSourceFeedback(request);
- getTarget().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) {
- getSource().eraseSourceFeedback(request);
- getTarget().eraseSourceFeedback(request);
- }
- super.eraseSourceFeedback(request);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message3EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message3EditPart.java
deleted file mode 100644
index fdc0cfd0cc8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message3EditPart.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.Cursors;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.PolylineDecoration;
-import org.eclipse.draw2d.RotatableDecoration;
-import org.eclipse.draw2d.geometry.PointList;
-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.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.Message3ItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class Message3EditPart extends AbstractMessageEditPart
-
-implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4005;
-
- /**
- * @generated
- */
- public Message3EditPart(View view) {
- super(view);
- }
-
- /**
- * Installs a specific message router on the edit part.
- *
- * @generated NOT
- */
- protected void installRouter() {
- getConnectionFigure().setConnectionRouter(LifelineChildGraphicalNodeEditPolicy.messageRouter);
- getConnectionFigure().setCursor(Cursors.ARROW);
- refreshBendpoints();
- }
-
- /**
- * Ignore routing style since we are using a custom router and a custom ConnectionBendpointEditPolicy.
- */
- protected void refreshRoutingStyles() {
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new Message3ItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
- installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName3EditPart) {
- ((MessageName3EditPart)childEditPart).setLabel(getPrimaryShape().getFigureMessageReplyLabelFigure());
- return true;
- }
- if(childEditPart instanceof MessageReplyAppliedStereotypeEditPart) {
- ((MessageReplyAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName3EditPart) {
- return true;
- }
- if(childEditPart instanceof MessageReplyAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model so you may safely remove
- * <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected Connection createConnectionFigure() {
- return new MessageReply();
- }
-
- /**
- * @generated
- */
- public MessageReply getPrimaryShape() {
- return (MessageReply)getFigure();
- }
-
- /**
- * @generated NOT inherits from UMLEdgeFigure to manage stereotype label
- */
- public class MessageReply extends MessageFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fFigureMessageReplyLabelFigure;
-
- /**
- * @generated
- */
- private WrappingLabel fAppliedStereotypeLabel;
-
- /**
- * @generated NOT call the super constructor
- */
- public MessageReply() {
- super();
- this.setLineStyle(Graphics.LINE_DASH);
- this.setForegroundColor(ColorConstants.black);
-
- createContents();
- setTargetDecoration(createTargetDecoration());
- }
-
- /**
- * @generated NOT
- */
- protected void createContents() {
- super.createContents();
-
- fFigureMessageReplyLabelFigure = new WrappingLabel();
- fFigureMessageReplyLabelFigure.setText("");
-
- fFigureMessageReplyLabelFigure.setFont(FFIGUREMESSAGEREPLYLABELFIGURE_FONT);
-
- this.add(fFigureMessageReplyLabelFigure);
-
- }
-
- /**
- * @generated
- */
- private RotatableDecoration createTargetDecoration() {
- PolylineDecoration df = new PolylineDecoration();
- df.setForegroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
- return df;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getFigureMessageReplyLabelFigure() {
- return fFigureMessageReplyLabelFigure;
- }
-
- /**
- * @generated NOT get the stereotype label of super class
- */
- public WrappingLabel getAppliedStereotypeLabel() {
- return super.getAppliedStereotypeLabel();
- }
-
- }
-
- /**
- * @generated
- */
- static final Font FFIGUREMESSAGEREPLYLABELFIGURE_FONT = new Font(Display.getCurrent(), "SANS", 9, SWT.NORMAL);
-
- /**
- * Block message sort modification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- SequenceUtil.handleMessageSortChange(getEditingDomain(), notification, (Message)resolveSemanticElement(), MessageSort.ASYNCH_CALL_LITERAL);
- super.handleNotificationEvent(notification);
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @Override
- public void showSourceFeedback(Request request) {
- if(request instanceof CreateUnspecifiedTypeRequest) {
- getSource().showSourceFeedback(request);
- getTarget().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) {
- getSource().eraseSourceFeedback(request);
- getTarget().eraseSourceFeedback(request);
- }
- super.eraseSourceFeedback(request);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message4EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message4EditPart.java
deleted file mode 100644
index c47e12a9df8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message4EditPart.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.Cursors;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.PolylineDecoration;
-import org.eclipse.draw2d.RotatableDecoration;
-import org.eclipse.draw2d.geometry.PointList;
-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.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.Message4ItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class Message4EditPart extends AbstractMessageEditPart
-
-implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4006;
-
- /**
- * @generated
- */
- public Message4EditPart(View view) {
- super(view);
- }
-
- /**
- * Installs a specific message router on the edit part.
- *
- * @generated NOT
- */
- protected void installRouter() {
- getConnectionFigure().setConnectionRouter(LifelineChildGraphicalNodeEditPolicy.messageRouter);
- getConnectionFigure().setCursor(Cursors.ARROW);
- refreshBendpoints();
- }
-
- /**
- * Ignore routing style since we are using a custom router and a custom ConnectionBendpointEditPolicy.
- */
- protected void refreshRoutingStyles() {
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new Message4ItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
- installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName4EditPart) {
- ((MessageName4EditPart)childEditPart).setLabel(getPrimaryShape().getFigureMessageCreateLabelFigure());
- return true;
- }
- if(childEditPart instanceof MessageCreateAppliedStereotypeEditPart) {
- ((MessageCreateAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName4EditPart) {
- return true;
- }
- if(childEditPart instanceof MessageCreateAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model so you may safely remove
- * <i>generated</i> tag and modify it.
- *
- * @generated
- */
-
- protected Connection createConnectionFigure() {
- return new MessageCreate();
- }
-
- /**
- * @generated
- */
- public MessageCreate getPrimaryShape() {
- return (MessageCreate)getFigure();
- }
-
- /**
- * @generated NOT inherits from UMLEdgeFigure to manage stereotype label
- */
- public class MessageCreate extends MessageFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fFigureMessageCreateLabelFigure;
-
- /**
- * @generated
- */
- private WrappingLabel fAppliedStereotypeLabel;
-
- /**
- * @generated NOT call the super constructor
- */
- public MessageCreate() {
- super();
- this.setLineStyle(Graphics.LINE_DASH);
- this.setForegroundColor(ColorConstants.black);
-
- createContents();
- setTargetDecoration(createTargetDecoration());
- }
-
- /**
- * @generated NOT
- */
- protected void createContents() {
- super.createContents();
-
- fFigureMessageCreateLabelFigure = new WrappingLabel();
- fFigureMessageCreateLabelFigure.setText("");
-
- fFigureMessageCreateLabelFigure.setFont(FFIGUREMESSAGECREATELABELFIGURE_FONT);
-
- this.add(fFigureMessageCreateLabelFigure);
-
- }
-
- /**
- * @generated
- */
- private RotatableDecoration createTargetDecoration() {
- PolylineDecoration df = new PolylineDecoration();
- df.setForegroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
- return df;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getFigureMessageCreateLabelFigure() {
- return fFigureMessageCreateLabelFigure;
- }
-
- /**
- * @generated NOT get the stereotype label of super class
- */
- public WrappingLabel getAppliedStereotypeLabel() {
- return super.getAppliedStereotypeLabel();
- }
-
- }
-
- /**
- * @generated
- */
- static final Font FFIGUREMESSAGECREATELABELFIGURE_FONT = new Font(Display.getCurrent(), "SANS", 9, SWT.NORMAL);
-
- /**
- * Block message sort modification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- SequenceUtil.handleMessageSortChange(getEditingDomain(), notification, (Message)resolveSemanticElement(), MessageSort.ASYNCH_CALL_LITERAL);
- super.handleNotificationEvent(notification);
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @Override
- public void showSourceFeedback(Request request) {
- if(request instanceof CreateUnspecifiedTypeRequest) {
- getSource().showSourceFeedback(request);
- getTarget().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) {
- getSource().eraseSourceFeedback(request);
- getTarget().eraseSourceFeedback(request);
- }
- super.eraseSourceFeedback(request);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message5EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message5EditPart.java
deleted file mode 100644
index 3377ecd26f1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message5EditPart.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.Cursors;
-import org.eclipse.draw2d.PolygonDecoration;
-import org.eclipse.draw2d.RotatableDecoration;
-import org.eclipse.draw2d.geometry.PointList;
-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.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.Message5ItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class Message5EditPart extends AbstractMessageEditPart
-
-implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4007;
-
- /**
- * @generated
- */
- public Message5EditPart(View view) {
- super(view);
- }
-
- /**
- * Installs a specific message router on the edit part.
- *
- * @generated NOT
- */
- protected void installRouter() {
- getConnectionFigure().setConnectionRouter(LifelineChildGraphicalNodeEditPolicy.messageRouter);
- getConnectionFigure().setCursor(Cursors.ARROW);
- refreshBendpoints();
- }
-
- /**
- * Ignore routing style since we are using a custom router and a custom ConnectionBendpointEditPolicy.
- */
- protected void refreshRoutingStyles() {
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new Message5ItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
- installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName5EditPart) {
- ((MessageName5EditPart)childEditPart).setLabel(getPrimaryShape().getFigureMessageDeleteLabelFigure());
- return true;
- }
- if(childEditPart instanceof MessageDeleteAppliedStereotypeEditPart) {
- ((MessageDeleteAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName5EditPart) {
- return true;
- }
- if(childEditPart instanceof MessageDeleteAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model so you may safely remove
- * <i>generated</i> tag and modify it.
- *
- * @generated
- */
-
- protected Connection createConnectionFigure() {
- return new MessageDelete();
- }
-
- /**
- * @generated
- */
- public MessageDelete getPrimaryShape() {
- return (MessageDelete)getFigure();
- }
-
- /**
- * @generated NOT inherits from UMLEdgeFigure to manage stereotype label
- */
- public class MessageDelete extends MessageFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fFigureMessageDeleteLabelFigure;
-
- /**
- * @generated
- */
- private WrappingLabel fAppliedStereotypeLabel;
-
- /**
- * @generated NOT call the super constructor
- */
- public MessageDelete() {
- super();
- this.setForegroundColor(ColorConstants.black);
-
- createContents();
- setTargetDecoration(createTargetDecoration());
- }
-
- /**
- * @generated NOT
- */
- protected void createContents() {
- super.createContents();
-
- fFigureMessageDeleteLabelFigure = new WrappingLabel();
- fFigureMessageDeleteLabelFigure.setText("");
-
- fFigureMessageDeleteLabelFigure.setFont(FFIGUREMESSAGEDELETELABELFIGURE_FONT);
-
- this.add(fFigureMessageDeleteLabelFigure);
-
- }
-
- /**
- * @generated
- */
- private RotatableDecoration createTargetDecoration() {
- PolygonDecoration df = new PolygonDecoration();
- df.setFill(true);
- df.setForegroundColor(getForegroundColor());
- df.setBackgroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
- return df;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getFigureMessageDeleteLabelFigure() {
- return fFigureMessageDeleteLabelFigure;
- }
-
- /**
- * @generated NOT get the stereotype label of super class
- */
- public WrappingLabel getAppliedStereotypeLabel() {
- return super.getAppliedStereotypeLabel();
- }
-
- }
-
- /**
- * @generated
- */
- static final Font FFIGUREMESSAGEDELETELABELFIGURE_FONT = new Font(Display.getCurrent(), "SANS", 9, SWT.NORMAL);
-
- /**
- * Block message sort modification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- SequenceUtil.handleMessageSortChange(getEditingDomain(), notification, (Message)resolveSemanticElement(), MessageSort.ASYNCH_CALL_LITERAL);
- super.handleNotificationEvent(notification);
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @Override
- public void showSourceFeedback(Request request) {
- if(request instanceof CreateUnspecifiedTypeRequest) {
- getSource().showSourceFeedback(request);
- getTarget().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) {
- getSource().eraseSourceFeedback(request);
- getTarget().eraseSourceFeedback(request);
- }
- super.eraseSourceFeedback(request);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message6EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message6EditPart.java
deleted file mode 100644
index 33f8ff2b655..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message6EditPart.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.ArrowLocator;
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.Cursors;
-import org.eclipse.draw2d.PolylineDecoration;
-import org.eclipse.draw2d.RotatableDecoration;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.PointList;
-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.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.Message6ItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.EllipseDecoration;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class Message6EditPart extends AbstractMessageEditPart
-
-implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4008;
-
- /**
- * @generated
- */
- public Message6EditPart(View view) {
- super(view);
- }
-
- /**
- * Installs a specific message router on the edit part.
- *
- * @generated NOT
- */
- protected void installRouter() {
- getConnectionFigure().setConnectionRouter(LifelineChildGraphicalNodeEditPolicy.messageRouter);
- getConnectionFigure().setCursor(Cursors.ARROW);
- refreshBendpoints();
- }
-
- /**
- * Ignore routing style since we are using a custom router and a custom ConnectionBendpointEditPolicy.
- */
- protected void refreshRoutingStyles() {
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new Message6ItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
- installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName6EditPart) {
- ((MessageName6EditPart)childEditPart).setLabel(getPrimaryShape().getFigureMessageLostLabelFigure());
- return true;
- }
- if(childEditPart instanceof MessageLostAppliedStereotypeEditPart) {
- ((MessageLostAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName6EditPart) {
- return true;
- }
- if(childEditPart instanceof MessageLostAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model so you may safely remove
- * <i>generated</i> tag and modify it.
- *
- * @generated
- */
-
- protected Connection createConnectionFigure() {
- return new MessageLost();
- }
-
- /**
- * @generated
- */
- public MessageLost getPrimaryShape() {
- return (MessageLost)getFigure();
- }
- /**
- * @generated NOT inherits from UMLEdgeFigure to manage stereotype label
- */
- public class MessageLost extends MessageFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fFigureMessageLostLabelFigure;
-
- /**
- * @generated
- */
- private WrappingLabel fAppliedStereotypeLabel;
-
- /**
- * @generated NOT call the super constructor
- */
- public MessageLost() {
- super();
- this.setForegroundColor(ColorConstants.black);
-
- createContents();
- setTargetDecoration(createTargetDecoration());
- }
-
- /**
- * @generated NOT
- */
- protected void createContents() {
- super.createContents();
-
- fFigureMessageLostLabelFigure = new WrappingLabel();
- fFigureMessageLostLabelFigure.setText("");
-
- fFigureMessageLostLabelFigure.setFont(FFIGUREMESSAGELOSTLABELFIGURE_FONT);
-
- this.add(fFigureMessageLostLabelFigure);
- }
-
- /**
- * @generated
- */
- private RotatableDecoration createTargetDecoration() {
- EllipseDecoration df = new EllipseDecoration();
- df.setAlwaysFill(true);
- df.setPreferredSize(new Dimension(10, 10));
- add(df, new ArrowLocator(this, ConnectionLocator.TARGET)); // child figure
-
- PolylineDecoration arrow = new PolylineDecoration();
- arrow.setForegroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- arrow.setTemplate(pl);
- arrow.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
-
- return arrow;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getFigureMessageLostLabelFigure() {
- return fFigureMessageLostLabelFigure;
- }
-
- /**
- * @generated NOT get the stereotype label of super class
- */
- public WrappingLabel getAppliedStereotypeLabel() {
- return super.getAppliedStereotypeLabel();
- }
-
- }
-
- /**
- * @generated
- */
- static final Font FFIGUREMESSAGELOSTLABELFIGURE_FONT = new Font(Display.getCurrent(), "SANS", 9, SWT.NORMAL);
-
- /**
- * Block message sort modification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- SequenceUtil.handleMessageSortChange(getEditingDomain(), notification, (Message)resolveSemanticElement(), MessageSort.ASYNCH_CALL_LITERAL);
- super.handleNotificationEvent(notification);
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @Override
- public void showSourceFeedback(Request request) {
- if(request instanceof CreateUnspecifiedTypeRequest) {
- getSource().showSourceFeedback(request);
- getTarget().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) {
- getSource().eraseSourceFeedback(request);
- getTarget().eraseSourceFeedback(request);
- }
- super.eraseSourceFeedback(request);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message7EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message7EditPart.java
deleted file mode 100644
index d0aeea92423..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/Message7EditPart.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.Cursors;
-import org.eclipse.draw2d.PolylineDecoration;
-import org.eclipse.draw2d.RotatableDecoration;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.PointList;
-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.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.Message7ItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.figures.EllipseDecoration;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class Message7EditPart extends AbstractMessageEditPart
-
-implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4009;
-
- /**
- * @generated
- */
- public Message7EditPart(View view) {
- super(view);
- }
-
- /**
- * Installs a specific message router on the edit part.
- *
- * @generated NOT
- */
- protected void installRouter() {
- getConnectionFigure().setConnectionRouter(LifelineChildGraphicalNodeEditPolicy.messageRouter);
- getConnectionFigure().setCursor(Cursors.ARROW);
- refreshBendpoints();
- }
-
- /**
- * Ignore routing style since we are using a custom router and a custom ConnectionBendpointEditPolicy.
- */
- protected void refreshRoutingStyles() {
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new Message7ItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
- installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName7EditPart) {
- ((MessageName7EditPart)childEditPart).setLabel(getPrimaryShape().getFigureMessageFoundLabelFigure());
- return true;
- }
- if(childEditPart instanceof MessageFoundAppliedStereotypeEditPart) {
- ((MessageFoundAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageName7EditPart) {
- return true;
- }
- if(childEditPart instanceof MessageFoundAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model so you may safely remove
- * <i>generated</i> tag and modify it.
- *
- * @generated
- */
-
- protected Connection createConnectionFigure() {
- return new MessageFound();
- }
-
- /**
- * @generated
- */
- public MessageFound getPrimaryShape() {
- return (MessageFound)getFigure();
- }
-
- /**
- * @generated NOT inherits from UMLEdgeFigure to manage stereotype label
- */
- public class MessageFound extends MessageFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fFigureMessageFoundLabelFigure;
-
- /**
- * @generated
- */
- private WrappingLabel fAppliedStereotypeLabel;
-
- /**
- * @generated NOT call the super constructor
- */
- public MessageFound() {
- super();
- this.setForegroundColor(ColorConstants.black);
-
- createContents();
- setSourceDecoration(createSourceDecoration());
- setTargetDecoration(createTargetDecoration());
- }
-
- /**
- * @generated NOT
- */
- protected void createContents() {
- super.createContents();
-
- fFigureMessageFoundLabelFigure = new WrappingLabel();
- fFigureMessageFoundLabelFigure.setText("");
-
- fFigureMessageFoundLabelFigure.setFont(FFIGUREMESSAGEFOUNDLABELFIGURE_FONT);
-
- this.add(fFigureMessageFoundLabelFigure);
-
- }
-
- /**
- * @generated
- */
- private RotatableDecoration createSourceDecoration() {
- EllipseDecoration df = new EllipseDecoration();
-
- df.setAlwaysFill(true);
-
- df.setPreferredSize(new Dimension(10, 10));
-
- return df;
- }
-
- /**
- * @generated
- */
- private RotatableDecoration createTargetDecoration() {
- PolylineDecoration df = new PolylineDecoration();
- df.setForegroundColor(getForegroundColor());
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
- return df;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getFigureMessageFoundLabelFigure() {
- return fFigureMessageFoundLabelFigure;
- }
-
- /**
- * @generated NOT get the stereotype label of super class
- */
- public WrappingLabel getAppliedStereotypeLabel() {
- return super.getAppliedStereotypeLabel();
- }
-
- }
-
- /**
- * @generated
- */
- static final Font FFIGUREMESSAGEFOUNDLABELFIGURE_FONT = new Font(Display.getCurrent(), "SANS", 9, SWT.NORMAL);
-
- /**
- * Block message sort modification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- SequenceUtil.handleMessageSortChange(getEditingDomain(), notification, (Message)resolveSemanticElement(), MessageSort.ASYNCH_CALL_LITERAL);
- super.handleNotificationEvent(notification);
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @Override
- public void showSourceFeedback(Request request) {
- if(request instanceof CreateUnspecifiedTypeRequest) {
- getSource().showSourceFeedback(request);
- getTarget().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) {
- getSource().eraseSourceFeedback(request);
- getTarget().eraseSourceFeedback(request);
- }
- super.eraseSourceFeedback(request);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncAppliedStereotypeEditPart.java
deleted file mode 100644
index 92fc35ba779..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageAsyncAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,723 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageAsyncAppliedStereotypeEditPart extends LabelEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6009;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncAppliedStereotypeEditPart.VISUAL_ID), new Point(1, -33));
- }
-
- /**
- * @generated
- */
- public MessageAsyncAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateAppliedStereotypeEditPart.java
deleted file mode 100644
index 366ebc0ba3e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageCreateAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,723 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageCreateAppliedStereotypeEditPart extends LabelEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6011;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateAppliedStereotypeEditPart.VISUAL_ID), new Point(1, -33));
- }
-
- /**
- * @generated
- */
- public MessageCreateAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteAppliedStereotypeEditPart.java
deleted file mode 100644
index 4ef96fc8eeb..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageDeleteAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,723 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageDeleteAppliedStereotypeEditPart extends LabelEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6012;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteAppliedStereotypeEditPart.VISUAL_ID), new Point(1, -33));
- }
-
- /**
- * @generated
- */
- public MessageDeleteAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEditPart.java
deleted file mode 100644
index 17de8a3a765..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEditPart.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.Cursors;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.PolygonDecoration;
-import org.eclipse.draw2d.RotatableDecoration;
-import org.eclipse.draw2d.geometry.PointList;
-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.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CreationOnMessageEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.LifelineChildGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageConnectionLineSegEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.MessageSort;
-
-/**
- * @generated
- */
-public class MessageEditPart extends AbstractMessageEditPart
-
-implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4003;
-
- /**
- * @generated
- */
- public MessageEditPart(View view) {
- super(view);
- }
-
- /**
- * Installs a specific message router on the edit part.
- *
- * @generated NOT
- */
- protected void installRouter() {
- getConnectionFigure().setConnectionRouter(LifelineChildGraphicalNodeEditPolicy.messageRouter);
- getConnectionFigure().setCursor(Cursors.ARROW);
- refreshBendpoints();
- }
-
- /**
- * Ignore routing style since we are using a custom router and a custom ConnectionBendpointEditPolicy.
- */
- protected void refreshRoutingStyles() {
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MessageItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationOnMessageEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_ROLE, new MessageConnectionEditPolicy());
- installEditPolicy(AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new MessageConnectionLineSegEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageNameEditPart) {
- ((MessageNameEditPart)childEditPart).setLabel(getPrimaryShape().getFigureMessageSyncLabelFigure());
- return true;
- }
- if(childEditPart instanceof MessageSyncAppliedStereotypeEditPart) {
- ((MessageSyncAppliedStereotypeEditPart)childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof MessageNameEditPart) {
- return true;
- }
- if(childEditPart instanceof MessageSyncAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model so you may safely remove
- * <i>generated</i> tag and modify it.
- *
- * @generated
- */
-
- protected Connection createConnectionFigure() {
- return new MessageSync();
- }
-
- /**
- * @generated
- */
- public MessageSync getPrimaryShape() {
- return (MessageSync)getFigure();
- }
-
- /**
- * @generated NOT inherits from UMLEdgeFigure to manage stereotype label
- */
- public class MessageSync extends MessageFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fFigureMessageSyncLabelFigure;
-
- /**
- * @generated
- */
- private WrappingLabel fAppliedStereotypeLabel;
-
- /**
- * @generated NOT call the super constructor
- */
- public MessageSync() {
- super();
- this.setForegroundColor(ColorConstants.black);
-
- createContents();
- setTargetDecoration(createTargetDecoration());
- }
-
- /**
- * @generated NOT
- */
- protected void createContents() {
- super.createContents();
-
- fFigureMessageSyncLabelFigure = new WrappingLabel();
- fFigureMessageSyncLabelFigure.setText("");
-
- fFigureMessageSyncLabelFigure.setFont(FFIGUREMESSAGESYNCLABELFIGURE_FONT);
-
- fFigureMessageSyncLabelFigure.setBorder(new MarginBorder(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0), getMapMode().DPtoLP(0), getMapMode().DPtoLP(0)));
-
- this.add(fFigureMessageSyncLabelFigure);
-
- }
-
- /**
- * @generated
- */
- private RotatableDecoration createTargetDecoration() {
- PolygonDecoration df = new PolygonDecoration();
- df.setFill(true);
- df.setForegroundColor(getForegroundColor());
- df.setBackgroundColor(ColorConstants.black);
- PointList pl = new PointList();
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(-2));
- pl.addPoint(getMapMode().DPtoLP(-2), getMapMode().DPtoLP(2));
- df.setTemplate(pl);
- df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
- return df;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getFigureMessageSyncLabelFigure() {
- return fFigureMessageSyncLabelFigure;
- }
-
- /**
- * @generated NOT get the stereotype label of super class
- */
- public WrappingLabel getAppliedStereotypeLabel() {
- return super.getAppliedStereotypeLabel();
- }
-
- }
-
- /**
- * @generated
- */
- static final Font FFIGUREMESSAGESYNCLABELFIGURE_FONT = new Font(Display.getCurrent(), "SANS", 9, SWT.NORMAL);
-
- /**
- * Block message sort modification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- SequenceUtil.handleMessageSortChange(getEditingDomain(), notification, (Message)resolveSemanticElement(), MessageSort.ASYNCH_CALL_LITERAL);
- super.handleNotificationEvent(notification);
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @Override
- public void showSourceFeedback(Request request) {
- if(request instanceof CreateUnspecifiedTypeRequest) {
- getSource().showSourceFeedback(request);
- getTarget().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) {
- getSource().eraseSourceFeedback(request);
- getTarget().eraseSourceFeedback(request);
- }
- super.eraseSourceFeedback(request);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEndEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEndEditPart.java
deleted file mode 100644
index 0c022135014..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEndEditPart.java
+++ /dev/null
@@ -1,664 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-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.draw2d.ColorConstants;
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PrecisionPoint;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.gef.ConnectionEditPart;
-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.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;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.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;
-import org.eclipse.gmf.runtime.notation.Anchor;
-import org.eclipse.gmf.runtime.notation.DecorationNode;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.IdentityAnchor;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-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.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * Edit part for message end to make it possible for selecting a messageEnd.
- *
- */
-public class MessageEndEditPart extends GraphicalEditPart implements
- INodeEditPart {
-
- private static final String DUMMY_TYPE = "999999";
- private static final int DEFAULT_SIZE = 16;
- private ConnectionLocator locator;
- private MessageEnd messageEnd;
-
- public MessageEndEditPart(MessageEnd end, AbstractMessageEditPart parent,
- ConnectionLocator locator) {
- super(createDummyView(parent, end));
- this.locator = locator;
- this.setParent(parent);
- this.messageEnd = end;
- addToResource(parent.getNotationView(), this.getNotationView());
- }
-
- @Override
- protected void addNotationalListeners() {
- if (hasNotationView()) {
- addListenerFilter("View", this,(View)getModel()); //$NON-NLS-1$
- }
- }
-
- protected List getModelSourceConnections() {
- return ViewUtil
- .getSourceConnectionsConnectingVisibleViews((View) getModel());
- }
-
- protected List getModelTargetConnections() {
- List list = ViewUtil
- .getTargetConnectionsConnectingVisibleViews((View) getModel());
- return list;
- }
-
- protected void handleNotificationEvent(Notification notification) {
- Object feature = notification.getFeature();
- if (NotationPackage.eINSTANCE.getView_SourceEdges().equals(feature))
- refreshSourceConnections();
- else if (NotationPackage.eINSTANCE.getView_TargetEdges()
- .equals(feature))
- refreshTargetConnections();
- else
- super.handleNotificationEvent(notification);
- }
-
- private static View createDummyView(AbstractMessageEditPart parent,
- EObject model) {
- View view = parent.findChildByModel(model);
- if(view != null)
- return view;
-
- final Shape node = new ShapeImpl() {
- public boolean eNotificationRequired() {
- return true;
- }
- };
-
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(DUMMY_TYPE);
- node.setElement(model);
-// final View container = (View) parent.getModel();
-// ViewUtil.insertChildView(container.getDiagram(), node,-1, true);
- return node;
- }
-
- static class DummyCommand extends org.eclipse.emf.common.command.AbstractCommand {
- public void execute() {
- }
-
- public void redo() {
- }
-
- public void undo() {
- }
-
- protected boolean prepare() {
- return true;
- }
- }
-
- private void addToResource(final View container, final View view) {
- CommandHelper.executeCommandWithoutHistory(getEditingDomain(), new DummyCommand() {
- public void execute() {
- ViewUtil.insertChildView(container, view,-1, false);
- }
- }, true);
- }
-
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MessageEndSemanticEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new MessageEndGraphicalNodeEditPolicy());
- }
-
- protected IFigure createFigure() {
- final MessageEnd messageEnd = (MessageEnd) this
- .resolveSemanticElement();
- IFigure fig = new MessageEndFigure();
- fig.setForegroundColor(ColorConstants.white);
-
- Label tooltip = new Label();
- if(messageEnd != null)
- tooltip.setText(messageEnd.getName());
- fig.setToolTip(tooltip);
-
- fig.setOpaque(false);
- // f.setFill(true);
- //((org.eclipse.gef.GraphicalEditPart) getParent()).getFigure().add(fig);
- return fig;
- }
-
- public boolean hasNotationView() {
- return true;
- }
-
- public ConnectionAnchor getSourceConnectionAnchor(
- final ConnectionEditPart connEditPart) {
- final org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connection =
- (org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart)connEditPart;
- String t = ""; //$NON-NLS-1$
- try {
- t = (String) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl() {
-
- public void run() {
- Anchor a = ((Edge) connection.getModel()).getSourceAnchor();
- if (a instanceof IdentityAnchor)
- setResult(((IdentityAnchor) a).getId());
- else
- setResult(""); //$NON-NLS-1$
- }
- });
- } catch (InterruptedException e) {
- Trace.catching(DiagramUIPlugin.getInstance(),
- DiagramUIDebugOptions.EXCEPTIONS_CATCHING, getClass(),
- "getSourceConnectionAnchor", e); //$NON-NLS-1$
- Log.error(DiagramUIPlugin.getInstance(),
- DiagramUIStatusCodes.IGNORED_EXCEPTION_WARNING,
- "getSourceConnectionAnchor", e); //$NON-NLS-1$
- }
- IAnchorableFigure fig = ((IAnchorableFigure) getFigure());
- return fig.getConnectionAnchor(t);
- }
-
- public ConnectionAnchor getTargetConnectionAnchor(
- ConnectionEditPart connEditPart) {
- final ConnectionNodeEditPart connection = (ConnectionNodeEditPart) connEditPart;
- String t = ""; //$NON-NLS-1$
- try {
- t = (String) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl() {
-
- public void run() {
- Anchor a = ((Edge) connection.getModel())
- .getTargetAnchor();
- if (a instanceof IdentityAnchor)
- setResult(((IdentityAnchor) a).getId());
- else
- setResult(""); //$NON-NLS-1$
- }
- });
- } catch (InterruptedException e) {
- Trace.catching(DiagramUIPlugin.getInstance(),
- DiagramUIDebugOptions.EXCEPTIONS_CATCHING, getClass(),
- "getTargetConnectionAnchor", e); //$NON-NLS-1$
- Log.error(DiagramUIPlugin.getInstance(),
- DiagramUIStatusCodes.IGNORED_EXCEPTION_WARNING,
- "getTargetConnectionAnchor", e); //$NON-NLS-1$
- }
- IAnchorableFigure fig = ((IAnchorableFigure) getFigure());
- ConnectionAnchor a = fig.getConnectionAnchor(t);
- return a;
- }
-
- public ConnectionAnchor getTargetConnectionAnchor(Request request) {
- Point center = getFigure().getBounds().getCenter();
- getFigure().translateToAbsolute(center);
- Point pt = ((DropRequest) request).getLocation() == null ? center
- : new Point(((DropRequest) request).getLocation());
- if (request instanceof CreateRequest) {
- getFigure().translateToRelative(pt);
- }
- ConnectionAnchor a = ((IAnchorableFigure) getFigure())
- .getTargetConnectionAnchorAt(pt);
- return a;
- }
-
- public ConnectionAnchor getSourceConnectionAnchor(Request request) {
- IAnchorableFigure fig = ((IAnchorableFigure) getFigure());
- if (request instanceof ReconnectRequest) {
- if (((DropRequest) request).getLocation() == null) {
- return fig.getSourceConnectionAnchorAt(null);
- }
- Point pt = ((DropRequest) request).getLocation().getCopy();
- return fig.getSourceConnectionAnchorAt(pt);
- }
- else if (request instanceof DropRequest){
- return fig.getSourceConnectionAnchorAt(
- ((DropRequest) request).getLocation());
- }
- return fig.getSourceConnectionAnchorAt(null);
- }
-
- public boolean canAttachNote() {
- return true;
- }
-
- public String mapConnectionAnchorToTerminal(ConnectionAnchor c) {
- return ((IAnchorableFigure) getFigure()).getConnectionAnchorTerminal(c);
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart#mapTerminalToConnectionAnchor(String)
- */
- public ConnectionAnchor mapTerminalToConnectionAnchor(String terminal) {
- return ((IAnchorableFigure) getFigure()).getConnectionAnchor(terminal);
- }
-
- public void rebuildLinks(Diagram diagram) {
- helper.collectViews(diagram);
- if(messageEnd == null)
- return;
- EAnnotation annotation = messageEnd.getEAnnotation("Connections");
- if (annotation != null) {
- for (EObject eo : annotation.getReferences()) {
- View view = helper.findView(eo);
- if (view == null)
- continue; // should not happen
-
- EList edges = view.getSourceEdges();
- for (Object o : edges) {
- if (o instanceof Edge && ((Edge) o).getTarget() == null) {
- restoreEdgeTarget((Edge) o);
- break;
- }
- }
- }
- }
- }
-
- private void restoreEdgeTarget(final Edge edge) {
- org.eclipse.emf.common.command.Command c = new org.eclipse.emf.common.command.AbstractCommand() {
- public void execute() {
- edge.setTarget((View) MessageEndEditPart.this
- .getModel());
- }
-
- public void redo() {
- }
-
- public void undo() {
- }
-
- protected boolean prepare() {
- return true;
- }
- };
-
- CommandHelper.executeCommandWithoutHistory(this.getEditingDomain(), c, true);
- }
-
- static class MessageEndGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
- IFigure messageEndFeedback;
-
- @Override
- public void eraseTargetFeedback(Request request) {
- super.eraseSourceFeedback(request);
- if (messageEndFeedback != null)
- removeFeedback(messageEndFeedback);
- messageEndFeedback = null;
- }
-
- protected void showTargetConnectionFeedback(
- DropRequest request) {
- if (messageEndFeedback == null) {
- CircleFigure c = new CircleFigure(DEFAULT_SIZE,
- DEFAULT_SIZE);
- c.setForegroundColor(ColorConstants.black);
- MessageEndEditPart p = (MessageEndEditPart) getHost();
- c.setBounds(p.getFigure().getBounds());
- addFeedback(c);
- messageEndFeedback = c;
- }
- }
-
- protected Connection createDummyConnection(Request req) {
- Connection conn = super.createDummyConnection(req);
- conn.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);
- return conn;
- }
-
- protected Command getConnectionAndRelationshipCreateCommand(CreateConnectionViewAndElementRequest request) {
- Map<String, Object> extendedData = request.getExtendedData();
- String requestHint = request.getConnectionViewAndElementDescriptor().getSemanticHint();
- if(((IHintedType)UMLElementTypes.GeneralOrdering_4012).getSemanticHint().equals(requestHint)) {
- if(getHost() instanceof MessageEndEditPart){
- 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(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION, request.getLocation());
- }
- }
- return super.getConnectionAndRelationshipCreateCommand(request);
- }
-
- protected Command getConnectionAndRelationshipCompleteCommand(CreateConnectionViewAndElementRequest request) {
- Map<String, Object> extendedData = request.getExtendedData();
- String requestHint = request.getConnectionViewAndElementDescriptor().getSemanticHint();
- if(((IHintedType)UMLElementTypes.GeneralOrdering_4012).getSemanticHint().equals(requestHint)) {
- if(getHost() instanceof MessageEndEditPart){
- List<OccurrenceSpecification> events = new ArrayList<OccurrenceSpecification>(2);
- final MessageOccurrenceSpecification messageEnd = (MessageOccurrenceSpecification) ((MessageEndEditPart)getHost()).resolveSemanticElement();
- events.add(messageEnd);
- extendedData.put(SequenceRequestConstant.NEAREST_OCCURRENCE_SPECIFICATION_2, events);
- extendedData.put(SequenceRequestConstant.OCCURRENCE_SPECIFICATION_LOCATION_2, request.getLocation());
- }
- }
- return super.getConnectionAndRelationshipCompleteCommand(request);
- }
- }
-
- static class ReorientMessageEndCommand extends EditElementCommand{
- private ReorientReferenceRelationshipRequest request;
-
- public ReorientMessageEndCommand(ReorientReferenceRelationshipRequest request) {
- super(request.getLabel(), request.getNewRelationshipEnd(), request);
- this.request = request;
- }
-
- public boolean canExecute() {
- return true;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- // adding new end
- if(request.getNewRelationshipEnd() instanceof MessageEnd) {
- MessageEndHelper.addConnectionSourceToMessageEnd((MessageEnd) request.getNewRelationshipEnd(), request.getReferenceOwner());
- if(request.getReferenceOwner() instanceof Constraint) {
- ((Constraint)request.getReferenceOwner()).getConstrainedElements().add((MessageEnd) request.getNewRelationshipEnd());
- }else if(request.getReferenceOwner() instanceof Comment) {
- ((Comment) request.getReferenceOwner()).getAnnotatedElements().add( (MessageEnd) request.getNewRelationshipEnd());
- }
- }
- // removing old end
- if(request.getOldRelationshipEnd() instanceof MessageEnd) {
- MessageEndHelper.removeConnectionSourceFromMessageEnd((MessageEnd) request.getOldRelationshipEnd(), request.getReferenceOwner());
- if(request.getReferenceOwner() instanceof Constraint) {
- ((Constraint)request.getReferenceOwner()).getConstrainedElements().remove((MessageEnd) request.getOldRelationshipEnd());
- }else if(request.getReferenceOwner() instanceof Comment) {
- ((Comment) request.getReferenceOwner()).getAnnotatedElements().remove( (MessageEnd) request.getOldRelationshipEnd());
- }
- }
- return CommandResult.newOKCommandResult();
- }
- }
-
- static class MessageEndSemanticEditPolicy extends SemanticEditPolicy{
-
- 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.ConstraintConstrainedElement_4011 == req
- .getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommandEx(
- req, req.getSource(), req.getTarget()));
- }else if(UMLElementTypes.GeneralOrdering_4012 == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- protected Command getCompleteCreateRelationshipCommand(
- CreateRelationshipRequest req) {
- if (UMLElementTypes.ConstraintConstrainedElement_4011 == req
- .getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommandEx(
- req, req.getSource(), req.getTarget()));
- }else if(UMLElementTypes.CommentAnnotatedElement_4010 == req
- .getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommandEx(req, req.getSource(), req.getTarget()));
- }else if(UMLElementTypes.GeneralOrdering_4012 == 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);
- }
-
- 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 {
-
- public MessageEndAnchor(CircleFigure circleFigure, PrecisionPoint p) {
- super(circleFigure, p);
- }
-
- public MessageEndAnchor(CircleFigure circleFigure) {
- super(circleFigure);
- }
-
- public Point getLocation(Point reference) {
- return getBox().getCenter();
- }
- }
-
- class MessageEndFigure extends CircleFigure {
- MessageEndFigure() {
- super(DEFAULT_SIZE, DEFAULT_SIZE);
- }
-
- @Override
- protected void paintFigure(Graphics g) {
- Rectangle r = Rectangle.SINGLETON;
- r.setBounds(getBounds());
- r.width--;
- r.height--;
- // g.drawOval(r);
- }
-
- protected ConnectionAnchor createAnchor(PrecisionPoint p) {
- if (p == null)
- return createDefaultAnchor();
- return new MessageEndAnchor(this, p);
- }
-
- protected ConnectionAnchor createDefaultAnchor() {
- return new MessageEndAnchor(this);
- }
-
- public void validate() {
- locator.relocate(this);
- super.validate();
- }
-
- public ConnectionAnchor getTargetConnectionAnchorAt(Point p) {
- try {
- return super.getTargetConnectionAnchorAt(p);
- } catch (Exception e) {
- return null;
- }
- };
- }
-
- static ViewHelper helper = new ViewHelper();
-
- static class ViewHelper {
- Diagram diagram = null;
- Set<View> allViews = new HashSet<View>();
- Map<EObject, View> viewMaps = new HashMap<EObject, View>();
-
- View findView(EObject key) {
- return viewMaps.get(key);
- }
-
- void collectViews(Diagram d) {
- if (diagram != d) { // compare pointer ref
- diagram = d;
- allViews.clear();
- viewMaps.clear();
-
- getAllNestedViews(diagram, allViews);
- for (View v : allViews) {
- if (v instanceof DecorationNode)
- continue;
-
- viewMaps.put(v.getElement(), v);
- }
- }
- }
-
- static private void getAllNestedViews(View view, Set<View> allViews) {
- for (View childView : (List<View>) view.getChildren()) {
- getAllNestedViews(childView, allViews);
- allViews.add(childView);
- }
- }
- }
-
- public static class MessageEndHelper{
- public static void removeConnectionSourceFromMessageEnd(MessageEnd messageEnd , EObject connectionSource) {
- EAnnotation annotation = messageEnd
- .getEAnnotation("Connections");
- if (annotation != null) {
- annotation.getReferences().remove( connectionSource);
- }
- }
-
- public static void addConnectionSourceToMessageEnd(MessageEnd messageEnd,EObject connectionSource) {
- EAnnotation annotation = messageEnd
- .getEAnnotation("Connections");
- if (annotation == null) {
- annotation = EcoreFactory.eINSTANCE.createEAnnotation();
- annotation.setSource("Connections"); //$NON-NLS-1$
- messageEnd.getEAnnotations().add(annotation);
- }
- if( !annotation.getReferences().contains( connectionSource) )
- annotation.getReferences().add(connectionSource);
- }
- }
-
- @Override
- public EditPart getTargetEditPart(Request request) {
- if(request instanceof CreateUnspecifiedTypeConnectionRequest){
- List types = ((CreateUnspecifiedTypeConnectionRequest) request).getElementTypes();
- if(types.contains(UMLElementTypes.CommentAnnotatedElement_4010) || types.contains(UMLElementTypes.ConstraintConstrainedElement_4011) || types.contains(UMLElementTypes.GeneralOrdering_4012)){
- return super.getTargetEditPart(request);
- }
- }else if(request instanceof ReconnectRequest){
- ConnectionEditPart con = ((ReconnectRequest)request).getConnectionEditPart();
- if(con instanceof CommentAnnotatedElementEditPart || con instanceof ConstraintConstrainedElementEditPart || con instanceof GeneralOrderingEditPart){
- return super.getTargetEditPart(request);
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java
deleted file mode 100644
index 27e6c487d7a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageFoundAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,743 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
-import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageFoundAppliedStereotypeEditPart extends LabelEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6014;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundAppliedStereotypeEditPart.VISUAL_ID), new Point(1, -33));
- }
-
- /**
- * @generated
- */
- public MessageFoundAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
-
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
- return UMLElementTypes.getImage(parserElement.eClass());
- }
- }
- return null;
-
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
- refreshLabel();
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostAppliedStereotypeEditPart.java
deleted file mode 100644
index 9eb88ed20e4..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageLostAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,723 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageLostAppliedStereotypeEditPart extends LabelEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6013;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostAppliedStereotypeEditPart.VISUAL_ID), new Point(1, -33));
- }
-
- /**
- * @generated
- */
- public MessageLostAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName2EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName2EditPart.java
deleted file mode 100644
index a86a29071fb..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName2EditPart.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.parts.AbstractMessageEditPart.MessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageName2EditPart extends MessageLabelEditPart implements ITextAwareEditPart, MessageLabelEditPolicy.ICustomMessageLabel {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6002;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName2EditPart.VISUAL_ID), new Point(1, -13));
- }
-
- /**
- * @generated
- */
- public MessageName2EditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName2EditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getParent().getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- public void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getParent().getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName3EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName3EditPart.java
deleted file mode 100644
index 52a9be7ae4b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName3EditPart.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.parts.AbstractMessageEditPart.MessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageName3EditPart extends MessageLabelEditPart implements ITextAwareEditPart , MessageLabelEditPolicy.ICustomMessageLabel {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6003;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName3EditPart.VISUAL_ID), new Point(1, -13));
- }
-
- /**
- * @generated
- */
- public MessageName3EditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName3EditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getParent().getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- public void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getParent().getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName4EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName4EditPart.java
deleted file mode 100644
index 0955c884261..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName4EditPart.java
+++ /dev/null
@@ -1,736 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.parts.AbstractMessageEditPart.MessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageName4EditPart extends MessageLabelEditPart implements ITextAwareEditPart, MessageLabelEditPolicy.ICustomMessageLabel {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6004;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName4EditPart.VISUAL_ID), new Point(1, -13));
- }
-
- /**
- * @generated
- */
- public MessageName4EditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- @Override
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName4EditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getParent().getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- @Override
- public void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getParent().getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName5EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName5EditPart.java
deleted file mode 100644
index 1d922e178bb..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName5EditPart.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.parts.AbstractMessageEditPart.MessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageName5EditPart extends MessageLabelEditPart implements ITextAwareEditPart , MessageLabelEditPolicy.ICustomMessageLabel {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6005;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName5EditPart.VISUAL_ID), new Point(1, -13));
- }
-
- /**
- * @generated
- */
- public MessageName5EditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName5EditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getParent().getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- public void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getParent().getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName6EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName6EditPart.java
deleted file mode 100644
index 6e75e3e5d8a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName6EditPart.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.parts.AbstractMessageEditPart.MessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageName6EditPart extends MessageLabelEditPart implements ITextAwareEditPart , MessageLabelEditPolicy.ICustomMessageLabel {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6006;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName6EditPart.VISUAL_ID), new Point(1, -13));
- }
-
- /**
- * @generated
- */
- public MessageName6EditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName6EditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getParent().getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- public void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getParent().getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName7EditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName7EditPart.java
deleted file mode 100644
index 94de13ed4fe..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageName7EditPart.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.parts.AbstractMessageEditPart.MessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageName7EditPart extends MessageLabelEditPart implements ITextAwareEditPart , MessageLabelEditPolicy.ICustomMessageLabel {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6007;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName7EditPart.VISUAL_ID), new Point(1, -13));
- }
-
- /**
- * @generated
- */
- public MessageName7EditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName7EditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getParent().getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- public void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getParent().getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageNameEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageNameEditPart.java
deleted file mode 100644
index 12bec5ccb62..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageNameEditPart.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.parts.AbstractMessageEditPart.MessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.MessageLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageNameEditPart extends MessageLabelEditPart implements ITextAwareEditPart , MessageLabelEditPolicy.ICustomMessageLabel {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6001;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageNameEditPart.VISUAL_ID), new Point(1, -13));
- }
-
- /**
- * @generated
- */
- public MessageNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageNameEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getParent().getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- public void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getParent().getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see
- * org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyAppliedStereotypeEditPart.java
deleted file mode 100644
index 49119dbe764..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageReplyAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,723 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageReplyAppliedStereotypeEditPart extends LabelEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6010;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyAppliedStereotypeEditPart.VISUAL_ID), new Point(1, -33));
- }
-
- /**
- * @generated
- */
- public MessageReplyAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncAppliedStereotypeEditPart.java
deleted file mode 100644
index 1a5427c6980..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageSyncAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,723 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class MessageSyncAppliedStereotypeEditPart extends LabelEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6008;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncAppliedStereotypeEditPart.VISUAL_ID), new Point(1, -33));
- }
-
- /**
- * @generated
- */
- public MessageSyncAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.LinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(WrappingLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Message_4003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return (View)getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ObservationLinkEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ObservationLinkEditPart.java
deleted file mode 100644
index 79797136150..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ObservationLinkEditPart.java
+++ /dev/null
@@ -1,202 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-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.draw2d.Connection;
-import org.eclipse.draw2d.ConnectionLocator;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.DragTracker;
-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.handles.ConnectionEndpointHandle;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gef.tools.ConnectionEndpointTracker;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-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.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.TimeObservation;
-
-/**
- * Observation link editpart used by time observation and duration observation
- *
- */
-public class ObservationLinkEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart {
-
- public ObservationLinkEditPart(View view) {
- super(view);
- }
-
- @Override
- protected Connection createConnectionFigure() {
- return new ConstraintLinkDescriptor();
- }
-
- public ConstraintLinkDescriptor getPrimaryShape() {
- return (ConstraintLinkDescriptor)getFigure();
- }
-
- public class ConstraintLinkDescriptor extends PolylineConnectionEx {
-
- public ConstraintLinkDescriptor() {
- this.setLineStyle(Graphics.LINE_DASH);
- }
-
- }
-
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
-
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomComponentEditPolicy());
- //installEditPolicy(EditPolicy.COMPONENT_ROLE, new CustomComponentEditPolicy());
- //SequenceUtil.OBSERVATION_LINK_TYPE
- installEditPolicy(EditPolicy.CONNECTION_ENDPOINTS_ROLE, new CustomConnectionEndpointEditPolicy());
- }
-
- private final class CustomComponentEditPolicy extends SemanticEditPolicy {
-
- @Override
- protected Command getSemanticCommand(IEditCommandRequest request) {
- Command semanticCommand = super.getSemanticCommand(request);
- if(semanticCommand != null) {
- if(semanticCommand instanceof ICommandProxy) {
- ICommandProxy proxy = (ICommandProxy)semanticCommand;
- if(proxy.getICommand() instanceof CompositeTransactionalCommand) {
- CompositeTransactionalCommand compositeCommand = (CompositeTransactionalCommand)proxy.getICommand();
- // update TimeObservation or DurationObservation model
- final ObservationLinkEditPart link = (ObservationLinkEditPart)getHost();
- AbstractTransactionalCommand updateLinkSourceModelCmd = new AbstractTransactionalCommand(link.getEditingDomain(), "", null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- EditPart source = link.getSource();
- if(source instanceof TimeObservationLabelEditPart) {
- TimeObservation timeObservation = (TimeObservation)((TimeObservationLabelEditPart)source).resolveSemanticElement();
- timeObservation.setEvent(null);
- } else if(source instanceof DurationObservationEditPart) {
- DurationObservation durationObservation = (DurationObservation)((DurationObservationEditPart)source).resolveSemanticElement();
- durationObservation.getEvents().clear();
- }
-
- return CommandResult.newOKCommandResult();
- }
- };
- compositeCommand.add(updateLinkSourceModelCmd);
- }
- }
- }
- return semanticCommand;
- }
- }
-
- private final class CustomConnectionEndpointEditPolicy extends org.eclipse.gef.editpolicies.ConnectionEndpointEditPolicy {
-
- @Override
- protected List createSelectionHandles() {
- List list = new ArrayList();
- list.add(new CustomConnectionEndpointHandle((ConnectionEditPart)getHost(), ConnectionLocator.SOURCE));
- list.add(new CustomConnectionEndpointHandle((ConnectionEditPart)getHost(), ConnectionLocator.TARGET));
- return list;
- }
-
- @Override
- protected void showConnectionMoveFeedback(ReconnectRequest request) {
- if(request.getConnectionEditPart().getSource() instanceof TimeObservationLabelEditPart && request.getTarget() instanceof AbstractMessageEditPart) {
- return;
- }
- super.showConnectionMoveFeedback(request);
- }
-
- @Override
- public void showSourceFeedback(Request request) {
- if(SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_SOURCE.equals(request.getType()) || SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_TARGET.equals(request.getType())) {
- showConnectionMoveFeedback((ReconnectRequest)request);
- }
- }
-
- @Override
- public void eraseSourceFeedback(Request request) {
- if(SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_SOURCE.equals(request.getType()) || SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_TARGET.equals(request.getType())) {
- eraseConnectionMoveFeedback((ReconnectRequest)request);
- }
- }
- }
-
- private class CustomConnectionEndpointHandle extends ConnectionEndpointHandle {
-
- public CustomConnectionEndpointHandle(ConnectionEditPart owner, int endPoint) {
- super(owner, endPoint);
- }
-
- public CustomConnectionEndpointHandle(ConnectionEditPart owner, boolean fixed, int endPoint) {
- super(owner, fixed, endPoint);
- }
-
- public CustomConnectionEndpointHandle(int endPoint) {
- super(endPoint);
- }
-
- @Override
- protected DragTracker createDragTracker() {
- if(isFixed()) {
- return null;
- }
- ConnectionEndpointTracker tracker;
- tracker = new ConnectionEndpointTracker((ConnectionEditPart)getOwner()) {
-
- @Override
- protected Request createTargetRequest() {
- ReconnectRequest request = new ReconnectRequest(getCommandName()) {
-
- @Override
- public boolean isMovingStartAnchor() {
- return SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_SOURCE.equals(getType());
- }
- };
- request.setConnectionEditPart(getConnectionEditPart());
- return request;
- }
- };
- if(getEndPoint() == ConnectionLocator.SOURCE) {
- tracker.setCommandName(SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_SOURCE);
- } else {
- tracker.setCommandName(SequenceUtil.OBSERVATION_LINK_REQUEST_RECONNECT_TARGET);
- }
- tracker.setDefaultCursor(getCursor());
- return tracker;
- }
- }
-
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
- Object feature = notification.getFeature();
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
-
- @Override
- protected void setLineWidth(int width) {
- getPrimaryShape().setLineWidth(width);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/PackageEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/PackageEditPart.java
deleted file mode 100644
index a7947b3ff77..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/PackageEditPart.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateConnectionRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ContainerNodeEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.providers.ViewInfo;
-import org.eclipse.papyrus.uml.diagram.common.util.MDTUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.PackageItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-
-/**
- * @generated
- */
-public class PackageEditPart extends DiagramEditPart {
-
- /**
- * @generated
- */
- public final static String MODEL_ID = "PapyrusUMLSequenceDiagram"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 1000;
-
- /**
- * @generated
- */
- public PackageEditPart(View view) {
- super(view);
- }
-
- /**
- * Remove the two policies dealing with the popup menu
- *
- * @generated NOT
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
-
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicy());
-
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.sequence.edit.policies.PackageCanonicalEditPolicy());
-
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- 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
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
-
- // do not handle connection event
- installEditPolicy(
- EditPolicy.GRAPHICAL_NODE_ROLE,
- new ContainerNodeEditPolicy(){
-
- protected Command getConnectionAndEndCommands(
- CreateConnectionRequest request) {
- return UnexecutableCommand.INSTANCE;
- }
- });
- }
-
- private EditPolicy createLayoutEditPolicy() {
- return new XYLayoutEditPolicy() {
- protected Command createAddCommand(EditPart child, Object constraint) {
- if (child instanceof LifelineEditPart) {
- if (!SequenceUtil.isCreateMessageEndLifeline((LifelineEditPart) child)) {
- return null;
- }
- }
- return super.createAddCommand(child, constraint);
- }
- };
- }
-
- /**
- * @generated
- */
- /* package-local */static class NodeLabelDragPolicy extends NonResizableEditPolicy {
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- protected List createSelectionHandles() {
- MoveHandle h = new MoveHandle((GraphicalEditPart)getHost());
- h.setBorder(null);
- return Collections.singletonList(h);
- }
-
- /**
- * @generated
- */
- public Command getCommand(Request request) {
- return null;
- }
-
- /**
- * @generated
- */
- public boolean understandsRequest(Request request) {
- return false;
- }
- }
-
- /**
- * @generated
- */
- /* package-local */static class LinkLabelDragPolicy extends NonResizableLabelEditPolicy {
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- protected List createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
-
- super.handleNotificationEvent(event);
- if(event.getNotifier() instanceof EAnnotation) {
- EAnnotation eAnnotation = (EAnnotation)event.getNotifier();
- if(eAnnotation.getSource() != null && eAnnotation.getSource().equals(MDTUtil.FilterViewAndLabelsSource)) {
- //modification form MOSKitt approach, canonical policies are not called
- MDTUtil.filterDiagramViews(this.getDiagramView());
- }
- }
- }
-
- /**
- * @generated
- */
- public Object getAdapter(Class adapter) {
-
- if(adapter != null && adapter.equals(ViewInfo.class)) {
- return UMLVisualIDRegistry.getDiagramViewInfo();
- }
- return super.getAdapter(adapter);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantEditPart.java
deleted file mode 100644
index 09c6c455928..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantEditPart.java
+++ /dev/null
@@ -1,1235 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.RoundedRectangle;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart;
-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.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.StateInvariantItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.locator.CenterLocator;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class StateInvariantEditPart extends
-
-AbstractBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3017;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public StateInvariantEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StateInvariantItemSemanticEditPolicy());
- 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);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new ContinuationFigure();
- }
-
- /**
- * @generated
- */
- public ContinuationFigure getPrimaryShape() {
- return (ContinuationFigure)primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof StateInvariantNameEditPart) {
- ((StateInvariantNameEditPart)childEditPart).setLabel(getPrimaryShape().getFigureContinuationNameLabel());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if(childEditPart instanceof StateInvariantNameEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void addChildVisual(EditPart childEditPart, int index) {
- if(addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected void removeChildVisual(EditPart childEditPart) {
- if(removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "StateInvariant";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- //FIXME: workaround for #154536
- result.getBounds().setSize(result.getPreferredSize());
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if(nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- 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) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(StateInvariantNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public class ContinuationFigure extends RoundedRectangle {
-
- /**
- * @generated
- */
- private CenteredWrappedLabel fFigureContinuationNameLabel;
-
- /**
- * @generated
- */
- public ContinuationFigure() {
-
- CenterLayout layoutThis = new CenterLayout();
-
- this.setLayoutManager(layoutThis);
-
- this.setCornerDimensions(new Dimension(getMapMode().DPtoLP(50), getMapMode().DPtoLP(50)));
- createContents();
- }
-
- /**
- * @generated
- */
- private void createContents() {
-
- fFigureContinuationNameLabel = new CenteredWrappedLabel();
-
- this.add(fFigureContinuationNameLabel);
-
- }
-
- /**
- * @generated
- */
- public CenteredWrappedLabel getFigureContinuationNameLabel() {
- return fFigureContinuationNameLabel;
- }
-
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("StateInvariant", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("StateInvariant", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("StateInvariant", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("StateInvariant", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
-
- Object feature = notification.getFeature();
- if((getModel() != null) && (getModel() == notification.getNotifier())) {
- if(NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- }
- }
- }
-
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLineWidth();
- }
-
- protected void refreshBounds() {
- if (getBorderItemLocator() != null) {
- int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE
- .getLocation_X())).intValue();
- int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE
- .getLocation_Y())).intValue();
- Point loc = new Point(x, y);
-
- int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- Dimension size = new Dimension(width, height);
-
- // fix size
- getFigure().setBounds(new Rectangle(loc, size));
- getBorderItemLocator().setConstraint(new Rectangle( loc, size));
- } else {
- super.refreshBounds();
- }
- }
-
- static class StateInvariantLocator extends CenterLocator{
- public StateInvariantLocator(IFigure parentFigure, int location) {
- super(parentFigure, location);
-
- }
-
- public void relocate(IFigure borderItem) {
- Point constraintLocation = getConstraint().getLocation();
- Dimension size = getSize(borderItem);
- Point ptNewLocation = new Point(getParentBorder().getCenter().x - size.width / 2, constraintLocation.y);
- borderItem.setBounds(new Rectangle(ptNewLocation, size));
- }
-
- public Rectangle getValidLocation(Rectangle proposedLocation, IFigure borderItem) {
- Rectangle realLocation = new Rectangle(proposedLocation);
- Point point = new Point(getParentBorder().getCenter().x - realLocation.getSize().width / 2, realLocation.y);
- realLocation.setLocation(point);
- return realLocation;
- }
- };
-
- public static class StateInvariantResizableEditPolicy extends BorderItemResizableEditPolicy{
-
- protected Command getResizeCommand(ChangeBoundsRequest request) {
- IBorderItemEditPart borderItemEP = (IBorderItemEditPart)getHost();
- IBorderItemLocator borderItemLocator = borderItemEP.getBorderItemLocator();
-
- if(borderItemLocator != null) {
- PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
- getHostFigure().translateToAbsolute(rect);
- rect.translate(request.getMoveDelta());
- rect.resize(request.getSizeDelta());
- getHostFigure().translateToRelative(rect);
- Rectangle realLocation = borderItemLocator.getValidLocation(rect.getCopy(), borderItemEP.getFigure());
-
- if(borderItemEP.getParent() instanceof LifelineEditPart && !restrictInParentBounds((LifelineEditPart) borderItemEP.getParent(), borderItemEP, realLocation.getCopy()))
- return null;
-
- ICommand moveCommand = new SetBoundsCommand(borderItemEP.getEditingDomain(), DiagramUIMessages.Commands_MoveElement, new EObjectAdapter((View)getHost().getModel()), realLocation);
- return new ICommandProxy(moveCommand);
- }
- return null;
- }
-
- protected Command getMoveCommand(ChangeBoundsRequest request) {
- IBorderItemEditPart borderItemEP = (IBorderItemEditPart)getHost();
- IBorderItemLocator borderItemLocator = borderItemEP.getBorderItemLocator();
-
- if(borderItemLocator != null) {
- PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
- getHostFigure().translateToAbsolute(rect);
- rect.translate(request.getMoveDelta());
- rect.resize(request.getSizeDelta());
-
- getHostFigure().translateToRelative(rect);
- Rectangle realLocation = borderItemLocator.getValidLocation(rect.getCopy(), borderItemEP.getFigure());
-
- if(borderItemEP.getParent() instanceof LifelineEditPart && !restrictInParentBounds((LifelineEditPart) borderItemEP.getParent(), borderItemEP, realLocation.getCopy()))
- return null;
-
- Point location = realLocation.getTopLeft();
- ICommand moveCommand = new SetBoundsCommand(borderItemEP.getEditingDomain(), DiagramUIMessages.Commands_MoveElement, new EObjectAdapter((View)getHost().getModel()), location);
- return new ICommandProxy(moveCommand);
- }
- return null;
- }
-
- private boolean restrictInParentBounds(LifelineEditPart ep,
- IBorderItemEditPart borderItemEP, Rectangle realLocation) {
- 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;
-
- return true;
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantNameEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantNameEditPart.java
deleted file mode 100644
index 42cd22da229..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/StateInvariantNameEditPart.java
+++ /dev/null
@@ -1,778 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
-import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class StateInvariantNameEditPart extends CompartmentEditPart implements ITextAwareEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5008;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- public StateInvariantNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PackageEditPart.NodeLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(CenteredWrappedLabel figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
-
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
- return UMLElementTypes.getImage(parserElement.eClass());
- }
- }
- return null;
-
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.StateInvariant_3017, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- refreshLabel();
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-
- if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
- refreshLabel();
- }
-
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
- }
-
- /**
- * @generated
- */
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java
deleted file mode 100644
index da926458576..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,777 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated NOT implements IPapyrusEditPart
- */
-public class TimeConstraintAppliedStereotypeEditPart
-
-extends LabelEditPart
-
-implements ITextAwareEditPart, IBorderItemEditPart, IPapyrusEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5013;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public TimeConstraintAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
- }
-
- /**
- * @generated
- */
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if(parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator)constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- public void refreshBounds() {
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
-
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
- return UMLElementTypes.getImage(parserElement.eClass());
- }
- }
- return null;
-
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.TimeConstraint_3019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new AppliedStereotypeWrappingLabelFigure();
- }
-
- /**
- * @generated NOT
- */
- public IFigure getPrimaryShape() {
- return getFigure();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java
deleted file mode 100644
index da5553e9da8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintEditPart.java
+++ /dev/null
@@ -1,1248 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PolylineShape;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.Transaction;
-import org.eclipse.emf.transaction.TransactionalCommandStack;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart;
-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.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.LayoutConstraint;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.DeleteTimeElementWithoutEventPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ExternalLabelPrimaryDragRoleEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeConstraintItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeRelatedSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class TimeConstraintEditPart extends
-
-BorderedBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3019;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public TimeConstraintEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TimeConstraintItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated NOT use ExternalLabelPrimaryDragRoleEditPolicy
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View)child.getModel();
- switch(UMLVisualIDRegistry.getVisualID(childView)) {
- case TimeConstraintLabelEditPart.VISUAL_ID:
- case TimeConstraintAppliedStereotypeEditPart.VISUAL_ID:
- // use ExternalLabelPrimaryDragRoleEditPolicy
- return new ExternalLabelPrimaryDragRoleEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * This method creates a specific edit policy for time realted elements
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart#getPrimaryDragEditPolicy()
- *
- * @return <code>EditPolicy</code>
- * @generated NOT
- */
- @Override
- public EditPolicy getPrimaryDragEditPolicy() {
- return new TimeRelatedSelectionEditPolicy();
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new TimeMarkElementFigure();
- }
-
- /**
- * @generated
- */
- public TimeMarkElementFigure getPrimaryShape() {
- return (TimeMarkElementFigure)primaryShape;
- }
-
- /**
- * @generated NOT use ExternalLabelPositionLocator
- */
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if(borderItemEditPart instanceof TimeConstraintLabelEditPart || borderItemEditPart instanceof TimeConstraintAppliedStereotypeEditPart) {
- //use ExternalLabelPositionLocator
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated NOT use correct dimensions
- */
- protected NodeFigure createNodePlate() {
- // use correct dimensions
- /*
- * Bypass the preference mechanism which finally returns an incoherent constant hard written in NodePreferencePage.xpt templates.
- * Instead, we shall use the correct default size.
- */
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(TimeMarkElementFigure.TIME_MARK_LENGTH, 1);
- //String prefElementId = "TimeConstraint";
- //IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- //String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- //String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- //DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- //FIXME: workaround for #154536
- result.getBounds().setSize(result.getPreferredSize());
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- 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) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeConstraintLabelEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public class TimeMarkElementFigure extends PolylineShape {
-
- /**
- * the length of the time mark
- *
- * @generated NOT
- */
- private static final int TIME_MARK_LENGTH = 20;
-
- /**
- * The side where the figure currently is
- *
- * @generated NOT
- */
- private int sideOfFigure = PositionConstants.NONE;
-
- /**
- * @generated
- */
- public TimeMarkElementFigure() {
- this.addPoint(new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0)));
- this.addPoint(new Point(getMapMode().DPtoLP(20), getMapMode().DPtoLP(0)));
- this.setLocation(new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0)));
- }
-
- /**
- * Update the side of the lifeline where the figure lies
- *
- * @param side
- * side where the figure must be
- * @param newLocation
- * the new location rectangle
- * @generated NOT
- */
- public void setCurrentSideOfFigure(int side, Rectangle newLocation) {
- // no effect if side has not changed
- if(sideOfFigure != side && !(PositionConstants.NONE == sideOfFigure && side == PositionConstants.EAST)) {
- // mirror the label too
- IGraphicalEditPart labelChild = getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeConstraintLabelEditPart.VISUAL_ID));
- if(labelChild instanceof TimeConstraintLabelEditPart) {
- TimeConstraintLabelEditPart label = (TimeConstraintLabelEditPart)labelChild;
- int labelWidth = label.getFigure().getMinimumSize().width;
- if(label.getNotationView() instanceof Node) {
- LayoutConstraint constraint = ((Node)label.getNotationView()).getLayoutConstraint();
- // update model location constraint for persisting the mirror effect
- if(constraint instanceof Location) {
- int xLocation = ((Location)constraint).getX();
- int mirroredLocation = -xLocation - labelWidth;
- TransactionalEditingDomain dom = getEditingDomain();
- org.eclipse.emf.common.command.Command setCmd = SetCommand.create(dom, constraint, NotationPackage.eINSTANCE.getLocation_X(), mirroredLocation);
- TransactionalCommandStack stack = (TransactionalCommandStack)dom.getCommandStack();
- Map<String, Boolean> options = new HashMap<String, Boolean>();
- options.put(Transaction.OPTION_NO_NOTIFICATIONS, true);
- options.put(Transaction.OPTION_NO_UNDO, true);
- options.put(Transaction.OPTION_UNPROTECTED, true);
- try {
- stack.execute(setCmd, options);
- // then, update graphically for short time effect
- IBorderItemLocator locator = label.getBorderItemLocator();
- Rectangle constrRect = ((ExternalLabelPositionLocator)locator).getConstraint();
- constrRect.x = mirroredLocation;
- locator.relocate(label.getFigure());
- } catch (InterruptedException e) {
- // log and skip update
- UMLDiagramEditorPlugin.log.error(e);
- } catch (RollbackException e) {
- // log and skip update
- UMLDiagramEditorPlugin.log.error(e);
- }
- }
- }
- }
- }
- sideOfFigure = side;
- }
-
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("TimeConstraint", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("TimeConstraint", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("TimeConstraint", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("TimeConstraint", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @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);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java
deleted file mode 100644
index d4dd7aa4282..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeConstraintLabelEditPart.java
+++ /dev/null
@@ -1,771 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class TimeConstraintLabelEditPart extends LabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5009;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintLabelEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public TimeConstraintLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- }
-
- /**
- * @generated
- */
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if(parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator)constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- public void refreshBounds() {
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.TimeConstraint_3019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintLabelEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new MultilineLabelFigure();
- }
-
- /**
- * @generated
- */
- public class MultilineLabelFigure extends WrappingLabel {
-
- /**
- * @generated
- */
- public MultilineLabelFigure() {
-
- this.setTextAlignment(PositionConstants.CENTER);
-
- this.setAlignment(PositionConstants.CENTER);
-
- this.setBackgroundColor(getBackgroundColor());
-
- this.setTextWrap(true);
-
- this.setTextJustification(PositionConstants.CENTER);
-
- }
-
- }
-
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java
deleted file mode 100644
index a5a85cba854..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationAppliedStereotypeEditPart.java
+++ /dev/null
@@ -1,777 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated NOT implements IPapyrusEditPart
- */
-public class TimeObservationAppliedStereotypeEditPart
-
-extends LabelEditPart
-
-implements ITextAwareEditPart, IBorderItemEditPart, IPapyrusEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5014;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- *
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- *
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public TimeObservationAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
- }
-
- /**
- * @generated
- */
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if(parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator)constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- public void refreshBounds() {
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @generated
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
-
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
- return UMLElementTypes.getImage(parserElement.eClass());
- }
- }
- return null;
-
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return false;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.TimeObservation_3020, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationAppliedStereotypeEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- // The label is read-only (defined in GMFGen model)
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- *
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new AppliedStereotypeWrappingLabelFigure();
- }
-
- /**
- * @generated NOT
- */
- public IFigure getPrimaryShape() {
- return getFigure();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java
deleted file mode 100644
index 5203b77bf39..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationEditPart.java
+++ /dev/null
@@ -1,1171 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.Transaction;
-import org.eclipse.emf.transaction.TransactionalCommandStack;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart;
-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.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.LayoutConstraint;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CustomExternalLabelPrimaryDragRoleEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeObservationItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.TimeRelatedSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class TimeObservationEditPart extends
-
-BorderedBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3020;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public TimeObservationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- //installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TimeObservationItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- //installEditPolicy(DeleteTimeElementWithoutEventPolicy.KEY, new DeleteTimeElementWithoutEventPolicy());
- // 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);
- }
-
- /**
- * This method creates a specific edit policy for time realted elements
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart#getPrimaryDragEditPolicy()
- *
- * @return <code>EditPolicy</code>
- * @generated NOT
- */
- @Override
- public EditPolicy getPrimaryDragEditPolicy() {
- return new TimeRelatedSelectionEditPolicy();
- }
-
- /**
- * @generated NOT use ExternalLabelPrimaryDragRoleEditPolicy
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View)child.getModel();
- switch(UMLVisualIDRegistry.getVisualID(childView)) {
- case TimeObservationLabelEditPart.VISUAL_ID:
- case TimeObservationAppliedStereotypeEditPart.VISUAL_ID:
- // use ExternalLabelPrimaryDragRoleEditPolicy
- return new CustomExternalLabelPrimaryDragRoleEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new TimeMarkElementFigure();
- }
-
- /**
- * @generated
- */
- public TimeMarkElementFigure getPrimaryShape() {
- return (TimeMarkElementFigure)primaryShape;
- }
-
- /**
- * @generated NOT use ExternalLabelPositionLocator
- */
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if(borderItemEditPart instanceof TimeObservationLabelEditPart || borderItemEditPart instanceof TimeObservationAppliedStereotypeEditPart) {
- //use ExternalLabelPositionLocator
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated NOT use correct dimensions
- */
- protected NodeFigure createNodePlate() {
- // use correct dimensions
- /*
- * Bypass the preference mechanism which finally returns an incoherent constant hard written in NodePreferencePage.xpt templates.
- * Instead, we shall use the correct default size.
- */
- //DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(TimeMarkElementFigure.TIME_MARK_LENGTH, 1);
- //String prefElementId = "TimeObservation";
- //IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- //String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.WIDTH);
- //String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferenceConstantHelper.HEIGHT);
- //DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
- //FIXME: workaround for #154536
- //result.getBounds().setSize(result.getPreferredSize());
-
- NodeFigure result = new NodeFigure();
-
- return result;
- }
-
- /**
- * Creates figure for this edit part.
- *
- * Body of this method does not depend on settings in generation model
- * so you may safely remove <i>generated</i> tag and modify it.
- *
- * @generated
- */
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- 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) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- protected void setLineType(int style) {
- if(primaryShape instanceof Shape) {
- ((Shape)primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeObservationLabelEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4003);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4004);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4005);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4006);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4007);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4008);
- }
- if(targetEditPart instanceof InteractionEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof CommentEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- types.add(UMLElementTypes.Message_4009);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(9);
- types.add(UMLElementTypes.Message_4003);
- types.add(UMLElementTypes.Message_4004);
- types.add(UMLElementTypes.Message_4005);
- types.add(UMLElementTypes.Message_4006);
- types.add(UMLElementTypes.Message_4007);
- types.add(UMLElementTypes.Message_4008);
- types.add(UMLElementTypes.Message_4009);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if(relationshipType == UMLElementTypes.Message_4003) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4004) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4005) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4006) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4007) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4008) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.Message_4009) {
- types.add(UMLElementTypes.Interaction_2001);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.InteractionOperand_3005);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Continuation_3016);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- } else if(relationshipType == UMLElementTypes.CommentAnnotatedElement_4010) {
- types.add(UMLElementTypes.Comment_3009);
- } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4011) {
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.DurationConstraint_3023);
- }
- return types;
- }
-
- /**
- * @generated NOT
- */
- public class TimeMarkElementFigure extends Figure {
-
- /**
- * the length of the time mark
- *
- * @generated NOT
- */
- private static final int TIME_MARK_LENGTH = 20;
-
- /**
- * The side where the figure currently is
- *
- * @generated NOT
- */
- private int sideOfFigure = PositionConstants.NONE;
-
- /**
- * @generated NOT
- */
- public TimeMarkElementFigure() {
- //this.addPoint(new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0)));
- //this.addPoint(new Point(getMapMode().DPtoLP(20), getMapMode().DPtoLP(0)));
- this.setLocation(new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0)));
- }
-
- /**
- * Update the side of the lifeline where the figure lies
- *
- * @param side
- * side where the figure must be
- * @param newLocation
- * the new location rectangle
- * @generated NOT
- */
- public void setCurrentSideOfFigure(int side, Rectangle newLocation) {
- // no effect if side has not changed or side is set to default one
- if(sideOfFigure != side && !(PositionConstants.NONE == sideOfFigure && side == PositionConstants.EAST)) {
- // mirror the label too
- IGraphicalEditPart labelChild = getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeObservationLabelEditPart.VISUAL_ID));
- if(labelChild instanceof TimeObservationLabelEditPart) {
- TimeObservationLabelEditPart label = (TimeObservationLabelEditPart)labelChild;
- int labelWidth = label.getFigure().getMinimumSize().width;
- if(label.getNotationView() instanceof Node) {
- LayoutConstraint constraint = ((Node)label.getNotationView()).getLayoutConstraint();
- // update model location constraint for persisting the mirror effect
- if(constraint instanceof Location) {
- int xLocation = ((Location)constraint).getX();
- int mirroredLocation = -xLocation - labelWidth;
- TransactionalEditingDomain dom = getEditingDomain();
- org.eclipse.emf.common.command.Command setCmd = SetCommand.create(dom, constraint, NotationPackage.eINSTANCE.getLocation_X(), mirroredLocation);
- TransactionalCommandStack stack = (TransactionalCommandStack)dom.getCommandStack();
- Map<String, Boolean> options = new HashMap<String, Boolean>();
- options.put(Transaction.OPTION_NO_NOTIFICATIONS, true);
- options.put(Transaction.OPTION_NO_UNDO, true);
- options.put(Transaction.OPTION_UNPROTECTED, true);
- try {
- stack.execute(setCmd, options);
- // then, update graphically for short time effect
- IBorderItemLocator locator = label.getBorderItemLocator();
- Rectangle constrRect = ((ExternalLabelPositionLocator)locator).getConstraint();
- constrRect.x = mirroredLocation;
- locator.relocate(label.getFigure());
- } catch (InterruptedException e) {
- // log and skip update
- UMLDiagramEditorPlugin.log.error(e);
- } catch (RollbackException e) {
- // log and skip update
- UMLDiagramEditorPlugin.log.error(e);
- }
- }
- }
- }
- }
- sideOfFigure = side;
- }
-
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore)getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
-
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if(feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("TimeObservation", PreferenceConstantHelper.COLOR_LINE);
- } else if(feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("TimeObservation", PreferenceConstantHelper.COLOR_FONT);
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferenceConstantHelper.getElementConstant("TimeObservation", PreferenceConstantHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor((IPreferenceStore)preferenceStore, prefColor));
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferenceConstantHelper.getElementConstant("TimeObservation", PreferenceConstantHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if(feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if(feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
-
- if(result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @generated NOT Override for redirecting creation request to the lifeline
- */
- @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);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java
deleted file mode 100644
index d2e1f86629e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/TimeObservationLabelEditPart.java
+++ /dev/null
@@ -1,944 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.requests.DropRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.core.util.Log;
-import org.eclipse.gmf.runtime.common.core.util.Trace;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-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.INodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.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.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.Anchor;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.IdentityAnchor;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.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.edit.policies.CustomConnectionHandleEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated NOT
- */
-//Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364826
-public class TimeObservationLabelEditPart extends LabelEditPart implements ITextAwareEditPart, IBorderItemEditPart,INodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5010;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
-
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public TimeObservationLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated NOT
- */
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
-
- installEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE,new CustomConnectionHandleEditPolicy());
- }
-
- /**
- * @generated
- */
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if(parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator)constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- public void refreshBounds() {
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @generated NOT
- */
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- }
- else if(figure instanceof NodeFigure && getWrappingLabel(figure)!=null) {
- return getWrappingLabel(figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- /**
- * @generated NOT
- */
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- }else if(figure instanceof NodeFigure && getWrappingLabel(figure)!=null) {
- getWrappingLabel(figure).setText(text);
- }
- else {
- ((Label)figure).setText(text);
- }
- }
-
- /**
- * @generated NOT
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else if(figure instanceof NodeFigure && getWrappingLabel(figure)!=null) {
- return getWrappingLabel(figure).getIcon();
- }else {
- return ((Label)figure).getIcon();
- }
- }
-
- /**
- * @generated NOT
- */
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- }else if(figure instanceof NodeFigure && getWrappingLabel(figure)!=null) {
- getWrappingLabel(figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated
- */
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- /**
- * @generated
- */
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
-
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- public IParser getParser() {
- if(parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.TimeObservation_3020, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart.VISUAL_ID));
- }
- return parser;
- }
-
- /**
- * @generated
- */
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- /**
- * @generated
- */
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit() {
- getManager().show();
- }
-
- /**
- * @generated
- */
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated
- */
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated
- */
- protected void performDirectEditRequest(Request request) {
-
- final Request theRequest = request;
-
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
-
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
-
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * @generated
- */
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- /**
- * @generated
- */
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- //return getPrimaryView();
- return (View) getModel();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
-
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- *
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @generated NOT
- */
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else if (NotationPackage.eINSTANCE.getView_SourceEdges().equals(feature)){
- refreshSourceConnections();
- } else if (NotationPackage.eINSTANCE.getView_TargetEdges().equals(feature)){
- refreshTargetConnections();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
-// /**
-// * @generated
-// */
-// protected IFigure createFigure() {
-// IFigure label = createFigurePrim();
-// defaultText = getLabelTextHelper(label);
-// return label;
-// }
-
- protected NodeFigure createFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- return figure;
- }
-
- protected NodeFigure createNodePlate() {
- NodeFigure result = new NodeFigure();
- return result;
- }
-
- protected IFigure createNodeShape() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- protected WrappingLabel getWrappingLabel(IFigure nodeFigure){
- if(nodeFigure instanceof NodeFigure) {
- return ((WrappingLabel)(nodeFigure.getChildren().get(0)));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new MultilineLabelFigure();
- }
-
- /**
- * @generated
- */
- public class MultilineLabelFigure extends WrappingLabel {
-
- /**
- * @generated
- */
- public MultilineLabelFigure() {
-
- this.setTextAlignment(PositionConstants.CENTER);
-
- this.setAlignment(PositionConstants.CENTER);
-
- this.setBackgroundColor(getBackgroundColor());
-
- this.setTextWrap(true);
-
- this.setTextJustification(PositionConstants.CENTER);
-
- }
-
- }
-
- //Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364826
- protected List getModelSourceConnections() {
- return ViewUtil
- .getSourceConnectionsConnectingVisibleViews((View) getModel());
- }
-
- protected List getModelTargetConnections() {
- List list = ViewUtil
- .getTargetConnectionsConnectingVisibleViews((View) getModel());
- return list;
- }
-
- public ConnectionAnchor getSourceConnectionAnchor(Request request) {
- if (request instanceof ReconnectRequest) {
- if (((DropRequest) request).getLocation() == null) {
- return ((NodeFigure)getFigure()).getSourceConnectionAnchorAt(null);
- }
- Point pt = ((DropRequest) request).getLocation().getCopy();
- return ((NodeFigure)getFigure()).getSourceConnectionAnchorAt(pt);
- }
- else if (request instanceof DropRequest){
- return ((NodeFigure)getFigure()).getSourceConnectionAnchorAt(
- ((DropRequest) request).getLocation());
- }
- return ((NodeFigure)getFigure()).getSourceConnectionAnchorAt(null);
- }
-
- public ConnectionAnchor getSourceConnectionAnchor(
- ConnectionEditPart connEditPart) {
- final org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connection =
- (org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart)connEditPart;
- String t = ""; //$NON-NLS-1$
- try {
- t = (String) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl() {
-
- public void run() {
- Anchor a = ((Edge)connection.getModel()).getSourceAnchor();
- if (a instanceof IdentityAnchor)
- setResult(((IdentityAnchor) a).getId());
- else
- setResult(""); //$NON-NLS-1$
- }
- });
- } catch (InterruptedException e) {
- Trace.catching(DiagramUIPlugin.getInstance(),
- DiagramUIDebugOptions.EXCEPTIONS_CATCHING, getClass(),
- "getSourceConnectionAnchor", e); //$NON-NLS-1$
- Log.error(DiagramUIPlugin.getInstance(),
- DiagramUIStatusCodes.IGNORED_EXCEPTION_WARNING,
- "getSourceConnectionAnchor", e); //$NON-NLS-1$
- }
- return ((NodeFigure)getFigure()).getConnectionAnchor(t);
- }
-
- public ConnectionAnchor getTargetConnectionAnchor(
- ConnectionEditPart connEditPart) {
- final org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connection =
- (org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart)connEditPart;
-
- String t = ""; //$NON-NLS-1$
- try {
- t = (String) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl() {
-
- public void run() {
- Anchor a = ((Edge)connection.getModel()).getTargetAnchor();
- if (a instanceof IdentityAnchor)
- setResult(((IdentityAnchor) a).getId());
- else
- setResult(""); //$NON-NLS-1$
- }
- });
- } catch (InterruptedException e) {
- Trace.catching(DiagramUIPlugin.getInstance(),
- DiagramUIDebugOptions.EXCEPTIONS_CATCHING, getClass(),
- "getTargetConnectionAnchor", e); //$NON-NLS-1$
- Log.error(DiagramUIPlugin.getInstance(),
- DiagramUIStatusCodes.IGNORED_EXCEPTION_WARNING,
- "getTargetConnectionAnchor", e); //$NON-NLS-1$
- }
-
- return ((NodeFigure)getFigure()).getConnectionAnchor(t);
- }
-
- public ConnectionAnchor getTargetConnectionAnchor(Request request) {
- if (request instanceof ReconnectRequest) {
- if (((DropRequest) request).getLocation() == null) {
- return ((NodeFigure)getFigure()).getTargetConnectionAnchorAt(null);
- }
- Point pt = ((DropRequest) request).getLocation().getCopy();
- return ((NodeFigure)getFigure()).getTargetConnectionAnchorAt(pt);
- }
- else if (request instanceof DropRequest){
-
- return ((NodeFigure)getFigure()).getTargetConnectionAnchorAt(
- ((DropRequest) request).getLocation());
- }
- return ((NodeFigure)getFigure()).getTargetConnectionAnchorAt(null);
- }
-
- final public String mapConnectionAnchorToTerminal(ConnectionAnchor c) {
- return ((NodeFigure)getFigure()).getConnectionAnchorTerminal(c);
- }
-
- final public ConnectionAnchor mapTerminalToConnectionAnchor(String terminal) {
- return ((NodeFigure)getFigure()).getConnectionAnchor(terminal);
- }
-
- public boolean canAttachNote() {
- return true;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java
deleted file mode 100644
index b1c6b45b594..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/UMLEditPartFactory.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
-
-import org.eclipse.draw2d.FigureUtilities;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartFactory;
-import org.eclipse.gef.tools.CellEditorLocator;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.Connector;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @generated
- */
-public class UMLEditPartFactory implements EditPartFactory {
-
- /**
- * @generated
- */
- public EditPart createEditPart(EditPart context, Object model) {
- if(model instanceof View) {
- View view = (View)model;
- switch(UMLVisualIDRegistry.getVisualID(view)) {
-
- case PackageEditPart.VISUAL_ID:
- return new PackageEditPart(view);
-
- case InteractionEditPart.VISUAL_ID:
- return new InteractionEditPart(view);
-
- case InteractionNameEditPart.VISUAL_ID:
- return new InteractionNameEditPart(view);
-
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- return new ConsiderIgnoreFragmentEditPart(view);
-
- case CombinedFragmentEditPart.VISUAL_ID:
- return new CombinedFragmentEditPart(view);
-
- case InteractionOperandEditPart.VISUAL_ID:
- return new InteractionOperandEditPart(view);
-
- case InteractionUseEditPart.VISUAL_ID:
- return new InteractionUseEditPart(view);
-
- case InteractionUseNameEditPart.VISUAL_ID:
- return new InteractionUseNameEditPart(view);
-
- case InteractionUseName2EditPart.VISUAL_ID:
- return new InteractionUseName2EditPart(view);
-
- case ContinuationEditPart.VISUAL_ID:
- return new ContinuationEditPart(view);
-
- case ContinuationNameEditPart.VISUAL_ID:
- return new ContinuationNameEditPart(view);
-
- case LifelineEditPart.VISUAL_ID:
- return new LifelineEditPart(view);
-
- case LifelineNameEditPart.VISUAL_ID:
- return new LifelineNameEditPart(view);
-
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- return new ActionExecutionSpecificationEditPart(view);
-
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- return new BehaviorExecutionSpecificationEditPart(view);
-
- case StateInvariantEditPart.VISUAL_ID:
- return new StateInvariantEditPart(view);
-
- case StateInvariantNameEditPart.VISUAL_ID:
- return new StateInvariantNameEditPart(view);
-
- case CombinedFragment2EditPart.VISUAL_ID:
- return new CombinedFragment2EditPart(view);
-
- case TimeConstraintEditPart.VISUAL_ID:
- return new TimeConstraintEditPart(view);
-
- case TimeConstraintLabelEditPart.VISUAL_ID:
- return new TimeConstraintLabelEditPart(view);
-
- case TimeConstraintAppliedStereotypeEditPart.VISUAL_ID:
- return new TimeConstraintAppliedStereotypeEditPart(view);
-
- case TimeObservationEditPart.VISUAL_ID:
- return new TimeObservationEditPart(view);
-
- case TimeObservationLabelEditPart.VISUAL_ID:
- return new TimeObservationLabelEditPart(view);
-
- case TimeObservationAppliedStereotypeEditPart.VISUAL_ID:
- return new TimeObservationAppliedStereotypeEditPart(view);
-
- case DurationConstraintEditPart.VISUAL_ID:
- return new DurationConstraintEditPart(view);
-
- case DurationConstraintLabelEditPart.VISUAL_ID:
- return new DurationConstraintLabelEditPart(view);
-
- case DurationConstraintAppliedStereotypeEditPart.VISUAL_ID:
- return new DurationConstraintAppliedStereotypeEditPart(view);
-
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return new DestructionOccurrenceSpecificationEditPart(view);
-
- case ConstraintEditPart.VISUAL_ID:
- return new ConstraintEditPart(view);
-
- case ConstraintNameEditPart.VISUAL_ID:
- return new ConstraintNameEditPart(view);
-
- case Constraint2EditPart.VISUAL_ID:
- return new Constraint2EditPart(view);
-
- case CommentEditPart.VISUAL_ID:
- return new CommentEditPart(view);
-
- case CommentBodyEditPart.VISUAL_ID:
- return new CommentBodyEditPart(view);
-
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return new DurationConstraintInMessageEditPart(view);
-
- case DurationConstraintInMessageLabelEditPart.VISUAL_ID:
- return new DurationConstraintInMessageLabelEditPart(view);
-
- case DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID:
- return new DurationConstraintInMessageAppliedStereotypeEditPart(view);
-
- case DurationObservationEditPart.VISUAL_ID:
- return new DurationObservationEditPart(view);
-
- case DurationObservationLabelEditPart.VISUAL_ID:
- return new DurationObservationLabelEditPart(view);
-
- case DurationObservationAppliedStereotypeEditPart.VISUAL_ID:
- return new DurationObservationAppliedStereotypeEditPart(view);
-
- case InteractionInteractionCompartmentEditPart.VISUAL_ID:
- return new InteractionInteractionCompartmentEditPart(view);
-
- case CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID:
- return new CombinedFragmentCombinedFragmentCompartmentEditPart(view);
-
- case MessageEditPart.VISUAL_ID:
- return new MessageEditPart(view);
-
- case MessageNameEditPart.VISUAL_ID:
- return new MessageNameEditPart(view);
-
- case MessageSyncAppliedStereotypeEditPart.VISUAL_ID:
- return new MessageSyncAppliedStereotypeEditPart(view);
-
- case Message2EditPart.VISUAL_ID:
- return new Message2EditPart(view);
-
- case MessageName2EditPart.VISUAL_ID:
- return new MessageName2EditPart(view);
-
- case MessageAsyncAppliedStereotypeEditPart.VISUAL_ID:
- return new MessageAsyncAppliedStereotypeEditPart(view);
-
- case Message3EditPart.VISUAL_ID:
- return new Message3EditPart(view);
-
- case MessageName3EditPart.VISUAL_ID:
- return new MessageName3EditPart(view);
-
- case MessageReplyAppliedStereotypeEditPart.VISUAL_ID:
- return new MessageReplyAppliedStereotypeEditPart(view);
-
- case Message4EditPart.VISUAL_ID:
- return new Message4EditPart(view);
-
- case MessageName4EditPart.VISUAL_ID:
- return new MessageName4EditPart(view);
-
- case MessageCreateAppliedStereotypeEditPart.VISUAL_ID:
- return new MessageCreateAppliedStereotypeEditPart(view);
-
- case Message5EditPart.VISUAL_ID:
- return new Message5EditPart(view);
-
- case MessageName5EditPart.VISUAL_ID:
- return new MessageName5EditPart(view);
-
- case MessageDeleteAppliedStereotypeEditPart.VISUAL_ID:
- return new MessageDeleteAppliedStereotypeEditPart(view);
-
- case Message6EditPart.VISUAL_ID:
- return new Message6EditPart(view);
-
- case MessageName6EditPart.VISUAL_ID:
- return new MessageName6EditPart(view);
-
- case MessageLostAppliedStereotypeEditPart.VISUAL_ID:
- return new MessageLostAppliedStereotypeEditPart(view);
-
- case Message7EditPart.VISUAL_ID:
- return new Message7EditPart(view);
-
- case MessageName7EditPart.VISUAL_ID:
- return new MessageName7EditPart(view);
-
- case MessageFoundAppliedStereotypeEditPart.VISUAL_ID:
- return new MessageFoundAppliedStereotypeEditPart(view);
-
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return new CommentAnnotatedElementEditPart(view);
-
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return new ConstraintConstrainedElementEditPart(view);
-
- case GeneralOrderingEditPart.VISUAL_ID:
- return new GeneralOrderingEditPart(view);
-
- case GeneralOrderingAppliedStereotypeEditPart.VISUAL_ID:
- return new GeneralOrderingAppliedStereotypeEditPart(view);
-
- }
- }
- return createUnrecognizedEditPart(context, model);
- }
-
- /**
- * @generated NOT
- */
- private EditPart createUnrecognizedEditPart(EditPart context, Object model) {
- // Handle creation of unrecognized child node EditParts here
- if(model instanceof Connector){
- if(((Connector) model).getType().equals(SequenceUtil.OBSERVATION_LINK_TYPE))
- return new ObservationLinkEditPart((View)model);
- }
- return null;
- }
-
- /**
- * @generated NOT
- */
- public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
- if(source.getFigure() instanceof IMultilineEditableFigure)
- return new MultilineCellEditorLocator((IMultilineEditableFigure)source.getFigure());
- else if(source.getFigure() instanceof WrappingLabel)
- return new TextCellEditorLocator((WrappingLabel)source.getFigure());
- else if(source.getFigure() instanceof NodeFigure) {
- WrappingLabel wrappingLabel = (WrappingLabel)source.getFigure().getChildren().get(0);
- if(wrappingLabel!=null){
- return new TextCellEditorLocator(wrappingLabel);
- }
- return new LabelCellEditorLocator((Label)source.getFigure());
- }
- else {
- return new LabelCellEditorLocator((Label)source.getFigure());
- }
- }
-
- /**
- * @generated
- */
- static private class MultilineCellEditorLocator implements CellEditorLocator {
-
- /**
- * @generated
- */
- private IMultilineEditableFigure multilineEditableFigure;
-
- /**
- * @generated
- */
- public MultilineCellEditorLocator(IMultilineEditableFigure figure) {
- this.multilineEditableFigure = figure;
- }
-
- /**
- * @generated
- */
- public IMultilineEditableFigure getMultilineEditableFigure() {
- return multilineEditableFigure;
- }
-
- /**
- * @generated
- */
- public void relocate(CellEditor celleditor) {
- Text text = (Text)celleditor.getControl();
- Rectangle rect = getMultilineEditableFigure().getBounds().getCopy();
- rect.x = getMultilineEditableFigure().getEditionLocation().x;
- rect.y = getMultilineEditableFigure().getEditionLocation().y;
- getMultilineEditableFigure().translateToAbsolute(rect);
- if(getMultilineEditableFigure().getText().length() > 0) {
- rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT)));
- }
- if(!rect.equals(new Rectangle(text.getBounds()))) {
- text.setBounds(rect.x, rect.y, rect.width, rect.height);
- }
- }
- }
-
- /**
- * @generated
- */
- static class TextCellEditorLocator implements CellEditorLocator {
-
- /**
- * @generated
- */
- private WrappingLabel wrapLabel;
-
- /**
- * @generated
- */
- public TextCellEditorLocator(WrappingLabel wrapLabel) {
- this.wrapLabel = wrapLabel;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getWrapLabel() {
- return wrapLabel;
- }
-
- /**
- * @generated
- */
- public void relocate(CellEditor celleditor) {
- Text text = (Text)celleditor.getControl();
- Rectangle rect = getWrapLabel().getTextBounds().getCopy();
- getWrapLabel().translateToAbsolute(rect);
- if(!text.getFont().isDisposed()) {
- if(getWrapLabel().isTextWrapOn() && getWrapLabel().getText().length() > 0) {
- rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT)));
- } else {
- int avr = FigureUtilities.getFontMetrics(text.getFont()).getAverageCharWidth();
- rect.setSize(new Dimension(text.computeSize(SWT.DEFAULT, SWT.DEFAULT)).expand(avr * 2, 0));
- }
- }
- if(!rect.equals(new Rectangle(text.getBounds()))) {
- text.setBounds(rect.x, rect.y, rect.width, rect.height);
- }
- }
- }
-
- /**
- * @generated
- */
- private static class LabelCellEditorLocator implements CellEditorLocator {
-
- /**
- * @generated
- */
- private Label label;
-
- /**
- * @generated
- */
- public LabelCellEditorLocator(Label label) {
- this.label = label;
- }
-
- /**
- * @generated
- */
- public Label getLabel() {
- return label;
- }
-
- /**
- * @generated
- */
- public void relocate(CellEditor celleditor) {
- Text text = (Text)celleditor.getControl();
- Rectangle rect = getLabel().getTextBounds().getCopy();
- getLabel().translateToAbsolute(rect);
- if(!text.getFont().isDisposed()) {
- int avr = FigureUtilities.getFontMetrics(text.getFont()).getAverageCharWidth();
- rect.setSize(new Dimension(text.computeSize(SWT.DEFAULT, SWT.DEFAULT)).expand(avr * 2, 0));
- }
- if(!rect.equals(new Rectangle(text.getBounds()))) {
- text.setBounds(rect.x, rect.y, rect.width, rect.height);
- }
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ActionExecutionSpecificationItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ActionExecutionSpecificationItemSemanticEditPolicy.java
deleted file mode 100644
index 7ec00a8465c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ActionExecutionSpecificationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * @generated
- */
-public class ActionExecutionSpecificationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationItemSemanticEditPolicy() {
- super(UMLElementTypes.ActionExecutionSpecification_3006);
- }
-
- /**
- * @generated NOT
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- CompoundCommand deleteElementsCommand = new CompoundCommand();
-
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if(provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if(deleteCommand != null) {
- deleteElementsCommand.add(new ICommandProxy(deleteCommand));
- }
- }
-
- if (getHost().getParent() instanceof LifelineEditPart) {
- if (selectedEObject instanceof ExecutionSpecification) {
- List<OccurrenceSpecification> oss = new ArrayList<OccurrenceSpecification>();
- oss.add(((ExecutionSpecification) selectedEObject).getStart());
- oss.add(((ExecutionSpecification) selectedEObject).getFinish());
- SequenceDeleteHelper
- .addDeleteRelatedTimeObservationLinkCommand(
- deleteElementsCommand, req.getEditingDomain(),
- (LifelineEditPart) getHost().getParent(), oss,true);
-
- ExecutionSpecificationComponentEditPolicy.addDestroyElementChildrenCommand(deleteElementsCommand, req.getEditingDomain(), getHost());
- }
- }
-
- if(deleteElementsCommand.size()>0){
- return deleteElementsCommand;
- }
-
- return UnexecutableCommand.INSTANCE;
- }
-
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @generated NOT
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteExecutionSpecificationViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- ExecutionSpecificationComponentEditPolicy.addDeleteViewChildrenCommand(deleteViewsCommand, getEditingDomain(), (ShapeNodeEditPart)getHost());
- if(mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- //add general ordering
- if(UMLElementTypes.GeneralOrdering_4012 == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- //add general ordering
- if(UMLElementTypes.GeneralOrdering_4012 == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- //add general ordering
- case GeneralOrderingEditPart.VISUAL_ID:
- if(req.getNewRelationshipEnd() instanceof OccurrenceSpecification) {
- return getGEFWrapper(new GeneralOrderingReorientCommand(req));
- } else {
- return null;
- }
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/BehaviorExecutionSpecificationItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/BehaviorExecutionSpecificationItemSemanticEditPolicy.java
deleted file mode 100644
index 4ad31e6d85b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/BehaviorExecutionSpecificationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-import org.eclipse.uml2.uml.ExecutionSpecification;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * @generated
- */
-public class BehaviorExecutionSpecificationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public BehaviorExecutionSpecificationItemSemanticEditPolicy() {
- super(UMLElementTypes.BehaviorExecutionSpecification_3003);
- }
-
- /**
- * @generated NOT
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- CompoundCommand deleteElementsCommand = new CompoundCommand();
-
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if(provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if(deleteCommand != null) {
- deleteElementsCommand.add(new ICommandProxy(deleteCommand));
- }
- }
-
- if (getHost().getParent() instanceof LifelineEditPart) {
- if (selectedEObject instanceof ExecutionSpecification) {
- List<OccurrenceSpecification> oss = new ArrayList<OccurrenceSpecification>();
- oss.add(((ExecutionSpecification) selectedEObject).getStart());
- oss.add(((ExecutionSpecification) selectedEObject).getFinish());
- SequenceDeleteHelper
- .addDeleteRelatedTimeObservationLinkCommand(
- deleteElementsCommand, req.getEditingDomain(),
- (LifelineEditPart) getHost().getParent(), oss,true);
-
- ExecutionSpecificationComponentEditPolicy.addDestroyElementChildrenCommand(deleteElementsCommand, req.getEditingDomain(), getHost());
- }
- }
-
- if(deleteElementsCommand.size()>0){
- return deleteElementsCommand;
- }
-
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @generated NOT
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteExecutionSpecificationViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- ExecutionSpecificationComponentEditPolicy.addDeleteViewChildrenCommand(deleteViewsCommand, getEditingDomain(), (ShapeNodeEditPart)getHost());
- if(mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- //add general ordering
- if(UMLElementTypes.GeneralOrdering_4012 == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- //add general ordering
- if(UMLElementTypes.GeneralOrdering_4012 == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- //add general ordering
- case GeneralOrderingEditPart.VISUAL_ID:
- if(req.getNewRelationshipEnd() instanceof OccurrenceSpecification) {
- return getGEFWrapper(new GeneralOrderingReorientCommand(req));
- } else {
- return null;
- }
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragment2ItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragment2ItemSemanticEditPolicy.java
deleted file mode 100644
index a3c1f010ac7..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragment2ItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * @generated
- */
-public class CombinedFragment2ItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CombinedFragment2ItemSemanticEditPolicy() {
- super(UMLElementTypes.CombinedFragment_3018);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if(provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if(deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- //add general ordering
- if(UMLElementTypes.GeneralOrdering_4012 == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- //add general ordering
- if(UMLElementTypes.GeneralOrdering_4012 == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- //add general ordering
- case GeneralOrderingEditPart.VISUAL_ID:
- if(req.getNewRelationshipEnd() instanceof OccurrenceSpecification) {
- return getGEFWrapper(new GeneralOrderingReorientCommand(req));
- } else {
- return null;
- }
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentCanonicalEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentCanonicalEditPolicy.java
deleted file mode 100644
index b73507beb62..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentCanonicalEditPolicy.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CombinedFragmentCombinedFragmentCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for(int i = 0; i < c.size(); i++) {
- ((EditPart)c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- protected EStructuralFeature getFeatureToSynchronize() {
- return UMLPackage.eINSTANCE.getCombinedFragment_Operand();
- }
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- protected List getSemanticChildrenList() {
- View viewObject = (View)getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getCombinedFragmentCombinedFragmentCompartment_7004SemanticChildren(viewObject);
- for(UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- return InteractionOperandEditPart.VISUAL_ID == UMLVisualIDRegistry.getVisualID(view);
- }
-
- /**
- * @generated
- */
- protected void refreshSemantic() {
- if(resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getCombinedFragmentCombinedFragmentCompartment_7004SemanticChildren((View)getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for(View v : getViewChildren()) {
- if(isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for(Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for(View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if(next.getModelElement().equals(semanticElement)) {
- if(hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if(perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for(UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if(cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>)request.getNewObject();
- createdViews.addAll(nl);
- }
- if(changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if(createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index a073f7116ec..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionOperandCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.InteractionOperatorKind;
-
-/**
- * @generated
- */
-public class CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.CombinedFragment_3004);
- }
-
- /**
- * Generated not for limit InteractionOperand number. {@inheritDoc}
- *
- * @generated NOT
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.InteractionOperand_3005 == req.getElementType()) {
-
- CombinedFragment combinedFragment = getAssociatedCombinedFragment(req.getContainer());
- if(combinedFragment == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Set the container of the request to the combinedFragment.
- req.setContainer(combinedFragment);
- InteractionOperatorKind interactionOperator = combinedFragment.getInteractionOperator();
- EList<InteractionOperand> operands = combinedFragment.getOperands();
- if(interactionOperator != null && !operands.isEmpty() && (InteractionOperatorKind.OPT_LITERAL.equals(interactionOperator) || InteractionOperatorKind.LOOP_LITERAL.equals(interactionOperator) || InteractionOperatorKind.BREAK_LITERAL.equals(interactionOperator) || InteractionOperatorKind.NEG_LITERAL.equals(interactionOperator))) {
- return UnexecutableCommand.INSTANCE;
- }
- // make compound command
- CompoundCommand result = new CompoundCommand();
- Command cmd = getGEFWrapper(new InteractionOperandCreateCommand(req));
- result.add(cmd);
- // append a command which notifies
- Command notifyCmd = new Command() {
-
- @Override
- public void execute() {
- NotificationBuilder warning = NotificationBuilder.createAsyncPopup(Messages.Warning_ResizeInteractionOperandTitle, NLS.bind(Messages.Warning_ResizeInteractionOperandTxt, System.getProperty("line.separator")));
- warning.run();
- }
-
- @Override
- public void undo() {
- execute();
- }
- };
- if(notifyCmd.canExecute()) {
- result.add(notifyCmd);
- }
- return result;
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * Retrieve the combined fragment associated with the request.
- */
- private CombinedFragment getAssociatedCombinedFragment(EObject eObject) {
- CombinedFragment combinedFragment = null;
- if(eObject instanceof CombinedFragment) {
- return (CombinedFragment)eObject;
- } else if(eObject != null) {
- combinedFragment = getAssociatedCombinedFragment(eObject.eContainer());
- }
-
- return combinedFragment;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemSemanticEditPolicy.java
deleted file mode 100644
index ad733c52c80..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CombinedFragmentDeleteHelper;
-import org.eclipse.uml2.uml.CombinedFragment;
-
-/**
- * @generated
- */
-public class CombinedFragmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CombinedFragmentItemSemanticEditPolicy() {
- super(UMLElementTypes.CombinedFragment_3004);
- }
-
-
- /**
- * @generated NOT
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if(provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if(deleteCommand != null) {
- if(selectedEObject instanceof CombinedFragment){
- ICommand selectCmd = CombinedFragmentDeleteHelper.createDestroyElementCommand((CombinedFragment) selectedEObject , getEditingDomain(), provider, req, deleteCommand, (CombinedFragmentEditPart)getHost());
- return new ICommandProxy(selectCmd);
- }else
- return new ICommandProxy(deleteCommand);
- }
- return null;
- }
- return UnexecutableCommand.INSTANCE;
- }
-
-
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
deleted file mode 100644
index 3680baa0ce7..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEndEditPart.MessageEndHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.MessageEnd;
-
-/**
- * @generated
- */
-public class CommentAnnotatedElementItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentAnnotatedElementItemSemanticEditPolicy() {
- super(UMLElementTypes.CommentAnnotatedElement_4010);
- }
-
- /**
- * @generated NOT
- */
- protected Command getDestroyReferenceCommand(final DestroyReferenceRequest req) {
- if(req.getReferencedObject() instanceof MessageEnd) {
- return getGEFWrapper(new DestroyReferenceCommand(req) {
- @Override
- protected CommandResult doExecuteWithResult(
- IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- CommandResult res = super.doExecuteWithResult(monitor, info);
- if(res.getStatus().isOK()) {
- MessageEndHelper.removeConnectionSourceFromMessageEnd((MessageEnd) req.getReferencedObject(),req.getContainer());
- }
- return res;
- }
- });
- }
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentItemSemanticEditPolicy.java
deleted file mode 100644
index cb12920c628..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CommentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CommentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentItemSemanticEditPolicy() {
- super(UMLElementTypes.Comment_3009);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View)getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
-
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if(annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConsiderIgnoreFragmentItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConsiderIgnoreFragmentItemSemanticEditPolicy.java
deleted file mode 100644
index 98850190ab0..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConsiderIgnoreFragmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.CombinedFragmentDeleteHelper;
-import org.eclipse.uml2.uml.CombinedFragment;
-
-/**
- * @generated
- */
-public class ConsiderIgnoreFragmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConsiderIgnoreFragmentItemSemanticEditPolicy() {
- super(UMLElementTypes.ConsiderIgnoreFragment_3007);
- }
-
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if(provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if(deleteCommand != null) {
- if(selectedEObject instanceof CombinedFragment){
- ICommand selectCmd = CombinedFragmentDeleteHelper.createDestroyElementCommand((CombinedFragment) selectedEObject , getEditingDomain(), provider, req, deleteCommand, (CombinedFragmentEditPart)getHost());
- return new ICommandProxy(selectCmd);
- }else
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
deleted file mode 100644
index 81fe568e62e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEndEditPart.MessageEndHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.MessageEnd;
-
-/**
- * @generated
- */
-public class ConstraintConstrainedElementItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintConstrainedElementItemSemanticEditPolicy() {
- super(UMLElementTypes.ConstraintConstrainedElement_4011);
- }
-
- /**
- * @generated NOT
- */
- protected Command getDestroyReferenceCommand(final DestroyReferenceRequest req) {
- if(req.getReferencedObject() instanceof MessageEnd) {
- return getGEFWrapper(new DestroyReferenceCommand(req) {
- @Override
- protected CommandResult doExecuteWithResult(
- IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- CommandResult res = super.doExecuteWithResult(monitor, info);
- if(res.getStatus().isOK()) {
- MessageEndHelper.removeConnectionSourceFromMessageEnd((MessageEnd) req.getReferencedObject(),req.getContainer());
- }
- return res;
- }
- });
- }
- return getGEFWrapper(new DestroyReferenceCommand(req));
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 1d7eaa96dc5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.Constraint_3008);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View)getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
-
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if(annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContinuationItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContinuationItemSemanticEditPolicy.java
deleted file mode 100644
index afaeb831e18..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/ContinuationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ContinuationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ContinuationItemSemanticEditPolicy() {
- super(UMLElementTypes.Continuation_3016);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View)getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
-
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if(annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicy.java
deleted file mode 100644
index ba3a409fa36..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,223 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @generated
- */
-public class DestructionOccurrenceSpecificationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DestructionOccurrenceSpecificationItemSemanticEditPolicy() {
- super(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if(provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if(deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.GeneralOrdering_4012 == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.GeneralOrdering_4012 == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- case GeneralOrderingEditPart.VISUAL_ID:
- return getGEFWrapper(new GeneralOrderingReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @generated NOT
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteDestructionOccurenceViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if(mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintInMessageItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintInMessageItemSemanticEditPolicy.java
deleted file mode 100644
index 8b0f6f99e5f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintInMessageItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationConstraintInMessageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationConstraintInMessageItemSemanticEditPolicy() {
- super(UMLElementTypes.DurationConstraint_3023);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View)getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
-
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if(annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index 8dd7120bdde..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.DurationConstraint_3021);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View)getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
-
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if(annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationObservationItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationObservationItemSemanticEditPolicy.java
deleted file mode 100644
index 25ae76329dc..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/DurationObservationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DurationObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DurationObservationItemSemanticEditPolicy() {
- super(UMLElementTypes.DurationObservation_3024);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View)getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
-
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if(annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GeneralOrderingItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GeneralOrderingItemSemanticEditPolicy.java
deleted file mode 100644
index 57fb9c07dec..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/GeneralOrderingItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,188 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public GeneralOrderingItemSemanticEditPolicy() {
- super(UMLElementTypes.GeneralOrdering_4012);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
- return getGEFWrapper(cmd.reduce());
- //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCanonicalEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCanonicalEditPolicy.java
deleted file mode 100644
index 985335641d8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionCanonicalEditPolicy.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InteractionCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for(int i = 0; i < c.size(); i++) {
- ((EditPart)c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- protected List getSemanticChildrenList() {
- View viewObject = (View)getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getInteraction_2001SemanticChildren(viewObject);
- for(UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- return visualID == DurationConstraintInMessageEditPart.VISUAL_ID || visualID == DurationObservationEditPart.VISUAL_ID;
- }
-
- /**
- * @generated
- */
- protected void refreshSemantic() {
- if(resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getInteraction_2001SemanticChildren((View)getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for(View v : getViewChildren()) {
- if(isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for(Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for(View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if(next.getModelElement().equals(semanticElement)) {
- if(hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if(perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for(UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if(cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>)request.getNewObject();
- createdViews.addAll(nl);
- }
- if(changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if(createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-
- /**
- * @generated
- */
- protected Set getFeaturesToSynchronize() {
- if(myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNamespace_OwnedRule());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
- }
- return myFeaturesToSynchronize;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentCanonicalEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentCanonicalEditPolicy.java
deleted file mode 100644
index 71994abb626..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentCanonicalEditPolicy.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InteractionInteractionCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for(int i = 0; i < c.size(); i++) {
- ((EditPart)c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- protected List getSemanticChildrenList() {
- View viewObject = (View)getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getInteractionInteractionCompartment_7001SemanticChildren(viewObject);
- for(UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- switch(visualID) {
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- case CombinedFragmentEditPart.VISUAL_ID:
- case LifelineEditPart.VISUAL_ID:
- case InteractionUseEditPart.VISUAL_ID:
- case ConstraintEditPart.VISUAL_ID:
- case CommentEditPart.VISUAL_ID:
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void refreshSemantic() {
- if(resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getInteractionInteractionCompartment_7001SemanticChildren((View)getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for(View v : getViewChildren()) {
- if(isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for(Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for(View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if(next.getModelElement().equals(semanticElement)) {
- if(hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if(perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for(UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if(cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>)request.getNewObject();
- createdViews.addAll(nl);
- }
- if(changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if(createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-
- /**
- * @generated
- */
- protected Set getFeaturesToSynchronize() {
- if(myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getInteraction_Fragment());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getInteraction_Lifeline());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNamespace_OwnedRule());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getElement_OwnedComment());
- }
- return myFeaturesToSynchronize;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java
deleted file mode 100644
index 2bb30e82b9c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.papyrus.uml.diagram.sequence.command.CustomTimeObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CombinedFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConsiderIgnoreFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionUseCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.LifelineCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionInteractionCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionInteractionCompartmentItemSemanticEditPolicy() {
- super(UMLElementTypes.Interaction_2001);
- }
-
- /**
- * @generated NOT
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.ConsiderIgnoreFragment_3007 == req.getElementType()) {
- return getGEFWrapper(new ConsiderIgnoreFragmentCreateCommand(req));
- }
- if(UMLElementTypes.CombinedFragment_3004 == req.getElementType()) {
- return getGEFWrapper(new CombinedFragmentCreateCommand(req));
- }
- if(UMLElementTypes.Lifeline_3001 == req.getElementType()) {
- return getGEFWrapper(new LifelineCreateCommand(req));
- }
- if(UMLElementTypes.InteractionUse_3002 == req.getElementType()) {
- return getGEFWrapper(new InteractionUseCreateCommand(req));
- }
- if(UMLElementTypes.Constraint_3008 == req.getElementType()) {
- return getGEFWrapper(new ConstraintCreateCommand(req));
- }
- if(UMLElementTypes.Comment_3009 == req.getElementType()) {
- return getGEFWrapper(new CommentCreateCommand(req));
- }
- if(UMLElementTypes.TimeObservation_3020 == req.getElementType()) {
- return getGEFWrapper(new CustomTimeObservationCreateCommand(req));
- }
- if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new DurationObservationCreateCommand(req));
- }
- return super.getCreateCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java
deleted file mode 100644
index 2381ce131cb..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintInMessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionItemSemanticEditPolicy() {
- super(UMLElementTypes.Interaction_2001);
- }
-
- /**
- * @generated
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new DurationConstraintInMessageCreateCommand(req));
- }
- if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new DurationObservationCreateCommand(req));
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if(provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if(deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandCanonicalEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandCanonicalEditPolicy.java
deleted file mode 100644
index 2b1295e7eca..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandCanonicalEditPolicy.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class InteractionOperandCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for(int i = 0; i < c.size(); i++) {
- ((EditPart)c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- protected List getSemanticChildrenList() {
- View viewObject = (View)getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getInteractionOperand_3005SemanticChildren(viewObject);
- for(UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- switch(visualID) {
- case InteractionUseEditPart.VISUAL_ID:
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- case CombinedFragmentEditPart.VISUAL_ID:
- case ContinuationEditPart.VISUAL_ID:
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void refreshSemantic() {
- if(resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getInteractionOperand_3005SemanticChildren((View)getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for(View v : getViewChildren()) {
- if(isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for(Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for(View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if(next.getModelElement().equals(semanticElement)) {
- if(hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if(perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for(UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if(cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>)request.getNewObject();
- createdViews.addAll(nl);
- }
- if(changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if(createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-
- /**
- * @generated
- */
- protected Set getFeaturesToSynchronize() {
- if(myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getInteraction_Fragment());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getInteractionOperand_Fragment());
- }
- return myFeaturesToSynchronize;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java
deleted file mode 100644
index 9bdf7fed4a2..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CombinedFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConsiderIgnoreFragmentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContinuationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionUseCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.OperandBoundsComputeHelper;
-
-/**
- * @generated
- */
-public class InteractionOperandItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionOperandItemSemanticEditPolicy() {
- super(UMLElementTypes.InteractionOperand_3005);
- }
-
- /**
- * @generated
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.InteractionUse_3002 == req.getElementType()) {
- return getGEFWrapper(new InteractionUseCreateCommand(req));
- }
- if(UMLElementTypes.ConsiderIgnoreFragment_3007 == req.getElementType()) {
- return getGEFWrapper(new ConsiderIgnoreFragmentCreateCommand(req));
- }
- if(UMLElementTypes.CombinedFragment_3004 == req.getElementType()) {
- return getGEFWrapper(new CombinedFragmentCreateCommand(req));
- }
- if(UMLElementTypes.Continuation_3016 == req.getElementType()) {
- return getGEFWrapper(new ContinuationCreateCommand(req));
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @generated NOT
- */
- @Override
- public Command getCommand(Request request) {
- if(request instanceof ReconnectRequest) {
- EditPart combinedFragment = getHost().getParent().getParent();
- ((ReconnectRequest)request).setTargetEditPart(combinedFragment);
- return combinedFragment.getCommand(request);
- }
- return super.getCommand(request);
- }
-
- /**
- * @generated NOT
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if(provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if(deleteCommand != null) {
- if(deleteCommand instanceof ICompositeCommand){
- OperandBoundsComputeHelper.addUpdateBoundsCommandForOperandDelelete(this.getHost(),(ICompositeCommand)deleteCommand);
- }
-
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated NOT redirect message creation to CF
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart)combinedFragmentPart).resolveSemanticElement();
- if(((IGraphicalEditPart)getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new MessageCreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;//return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart)combinedFragmentPart).resolveSemanticElement();
- if(((IGraphicalEditPart)getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new Message2CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;//return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart)combinedFragmentPart).resolveSemanticElement();
- if(((IGraphicalEditPart)getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new Message3CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;//return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart)combinedFragmentPart).resolveSemanticElement();
- if(((IGraphicalEditPart)getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new Message4CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;//return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart)combinedFragmentPart).resolveSemanticElement();
- if(((IGraphicalEditPart)getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new Message5CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;//return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart)combinedFragmentPart).resolveSemanticElement();
- if(((IGraphicalEditPart)getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new Message6CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;//return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- // redirect message creation to CF
- EditPart combinedFragmentPart = getHost().getParent().getParent();
- EObject combinedFragment = ((IGraphicalEditPart)combinedFragmentPart).resolveSemanticElement();
- if(((IGraphicalEditPart)getHost()).resolveSemanticElement().equals(req.getSource())) {
- return getGEFWrapper(new Message7CreateCommand(req, combinedFragment, req.getTarget()));
- }
- return null;//return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated NOT let InteractionOperandLayoutEditPolicy redirect messages
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;//return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;//return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;//return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;//return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;//return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;//return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- // let InteractionOperandLayoutEditPolicy redirect messages
- return null;//return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionUseItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionUseItemSemanticEditPolicy.java
deleted file mode 100644
index 3d26bc27631..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionUseItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class InteractionUseItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public InteractionUseItemSemanticEditPolicy() {
- super(UMLElementTypes.InteractionUse_3002);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View)getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
-
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if(annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineCanonicalEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineCanonicalEditPolicy.java
deleted file mode 100644
index 469d64ebd50..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineCanonicalEditPolicy.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class LifelineCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for(int i = 0; i < c.size(); i++) {
- ((EditPart)c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- protected List getSemanticChildrenList() {
- View viewObject = (View)getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getLifeline_3001SemanticChildren(viewObject);
- for(UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- switch(visualID) {
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- case StateInvariantEditPart.VISUAL_ID:
- case CombinedFragment2EditPart.VISUAL_ID:
- case TimeConstraintEditPart.VISUAL_ID:
- case TimeObservationEditPart.VISUAL_ID:
- case DurationConstraintEditPart.VISUAL_ID:
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected void refreshSemantic() {
- if(resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getLifeline_3001SemanticChildren((View)getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for(View v : getViewChildren()) {
- if(isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for(Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for(View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if(next.getModelElement().equals(semanticElement)) {
- if(hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if(perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for(UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if(cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>)request.getNewObject();
- createdViews.addAll(nl);
- }
- if(changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if(createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-
- /**
- * @generated
- */
- protected Set getFeaturesToSynchronize() {
- if(myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getInteraction_Fragment());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNamespace_OwnedRule());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
- }
- return myFeaturesToSynchronize;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java
deleted file mode 100644
index d5c02d119e5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ActionExecutionSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.BehaviorExecutionSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CombinedFragment2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DestructionOccurrenceSpecificationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.GeneralOrderingReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.LifelineCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.StateInvariantCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.TimeConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-
-/**
- * @generated
- */
-public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public LifelineItemSemanticEditPolicy() {
- super(UMLElementTypes.Lifeline_3001);
- }
-
- /**
- * Generated not for add lifelines on lifeline
- *
- * @generated NOT
- * (update at each lifeline modification) add lifelines, add DurationObservation/Constraint
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.ActionExecutionSpecification_3006 == req.getElementType()) {
- return getGEFWrapper(new ActionExecutionSpecificationCreateCommand(req));
- }
- if(UMLElementTypes.BehaviorExecutionSpecification_3003 == req.getElementType()) {
- return getGEFWrapper(new BehaviorExecutionSpecificationCreateCommand(req));
- }
- if(UMLElementTypes.StateInvariant_3017 == req.getElementType()) {
- return getGEFWrapper(new StateInvariantCreateCommand(req));
- }
- if(UMLElementTypes.CombinedFragment_3018 == req.getElementType()) {
- return getGEFWrapper(new CombinedFragment2CreateCommand(req));
- }
- if(UMLElementTypes.TimeConstraint_3019 == req.getElementType()) {
- return getGEFWrapper(new TimeConstraintCreateCommand(req));
- }
-//Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364826
-// if(UMLElementTypes.TimeObservation_3020 == req.getElementType()) {
-// return getGEFWrapper(new TimeObservationCreateCommand(req));
-// }
- if(UMLElementTypes.DurationConstraint_3021 == req.getElementType()) {
- return getGEFWrapper(new DurationConstraintCreateCommand(req));
- }
- if(UMLElementTypes.DestructionOccurrenceSpecification_3022 == req.getElementType()) {
- return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommand(req));
- }
- //add lifelines
- if(UMLElementTypes.Lifeline_3001 == req.getElementType()) {
- LifelineEditPart lifelineEditPart = (LifelineEditPart)getHost();
- if(lifelineEditPart.isInlineCapability()) {
- LifelineCreateCommand cmd = new LifelineCreateCommand(req);
- cmd.setAvailableProperties(lifelineEditPart.getAvailableProperties());
- return getGEFWrapper(cmd);
- }
- }
- //add DurationObservation/Constraint
- if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new DurationConstraintCreateCommand(req));
- }
-// Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364826
-// if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
-// return getGEFWrapper(new DurationObservationCreateCommand(req));
-// }
- return super.getCreateCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if(provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if(deleteCommand != null) {
- Command command = new ICommandProxy(deleteCommand);
- command = LifelineMessageCreateHelper.restoreLifelineOnDelete(command, (LifelineEditPart) getHost());
- return command;
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- //add general ordering
- if(UMLElementTypes.GeneralOrdering_4012 == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- //add general ordering
- if(UMLElementTypes.GeneralOrdering_4012 == req.getElementType()) {
- return getGEFWrapper(new GeneralOrderingCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated NOT
- * (update at each lifeline modification) add general ordering
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- //add general ordering
- case GeneralOrderingEditPart.VISUAL_ID:
- if(req.getNewRelationshipEnd() instanceof OccurrenceSpecification) {
- return getGEFWrapper(new GeneralOrderingReorientCommand(req));
- } else {
- return null;
- }
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineSelectionEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineSelectionEditPolicy.java
deleted file mode 100644
index 0bfe7c5a06f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineSelectionEditPolicy.java
+++ /dev/null
@@ -1,286 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.draw2d.Cursors;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Locator;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Handle;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gef.handles.MoveHandleLocator;
-import org.eclipse.gef.handles.RelativeHandleLocator;
-import org.eclipse.gef.handles.ResizeHandle;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.tools.ResizeTracker;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableEditPolicyEx;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart.LifelineFigure;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Lifeline;
-
-public class LifelineSelectionEditPolicy extends ResizableEditPolicyEx {
-
- public LifelineSelectionEditPolicy() {
- setResizeDirections(PositionConstants.NORTH | PositionConstants.SOUTH | PositionConstants.WEST | PositionConstants.EAST);
- }
-
- protected List<?> createSelectionHandles() {
- final LifelineEditPart host = (LifelineEditPart) getHost();
- final LifelineFigure primaryShape = host.getPrimaryShape();
- // resizable in at least one direction
- List<Handle> list = new ArrayList<Handle>();
- // createMoveHandle(list);
- Locator locator = new MoveHandleLocator(
- primaryShape.getFigureLifelineNameContainerFigure());
- MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost(),
- locator);
- moveHandle.setCursor(Cursors.SIZEALL);
- list.add(moveHandle);
-
- createResizeHandle(list, PositionConstants.NORTH);
- final IFigure fig = primaryShape
- .getFigureLifelineNameContainerFigure();
-
- createResizeHandle(host, list, fig,PositionConstants.WEST);
- createResizeHandle(host, list, fig,PositionConstants.EAST);
-
- createResizeHandle(list, PositionConstants.SOUTH);
- return list;
- }
-
- private void createResizeHandle(LifelineEditPart host, List<Handle> list,
- IFigure fig, int location) {
- Locator locator = new RelativeHandleLocator(fig, location);
- Cursor cursor = Cursors
- .getDirectionalCursor(location, fig.isMirrored());
- ResizeHandle westResizer = new ResizeHandle((GraphicalEditPart) host,
- locator, cursor);
- ResizeTracker resizeTracker = new ResizeTracker(host, location);
- westResizer.setDragTracker(resizeTracker);
- list.add(westResizer);
- }
-
- protected void showChangeBoundsFeedback(ChangeBoundsRequest request) {
- IFigure feedback = getDragSourceFeedbackFigure();
-
- PrecisionRectangle rect = new PrecisionRectangle(
- getInitialFeedbackBounds().getCopy());
- getHostFigure().translateToAbsolute(rect);
-
- boolean skipMinSize = false;
- //Only enable horizontal dragging on lifelines(except lifelines that are result of a create message).
- //https://bugs.eclipse.org/bugs/show_bug.cgi?id=364688
- if (this.getHost() instanceof LifelineEditPart) {
- skipMinSize = true;
- LifelineEditPart lifelineEP = (LifelineEditPart) this.getHost();
- if (!SequenceUtil.isCreateMessageEndLifeline(lifelineEP)) {
- request.getMoveDelta().y = 0;
- }
-
- //keepNameLabelBounds(lifelineEP, request, rect);
-
- // restrict child size within parent bounds
- keepInParentBounds(lifelineEP, request, rect);
-
- changeCombinedFragmentBounds(request, lifelineEP);
- }
- Point left = rect.getLeft();
- Point right = rect.getRight();
- rect.translate(request.getMoveDelta());
- rect.resize(request.getSizeDelta());
-
- 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);
- getHostFigure().translateToAbsolute(min);
- getHostFigure().translateToAbsolute(max);
-
- // In manual mode, there is no minimal width, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=383723
- if (min.width > rect.width && !skipMinSize){
- if( request.getMoveDelta().x > 0 && request.getSizeDelta().width != 0){
- rect.x = right.x - min.width ;
- request.getMoveDelta().x = rect.x -left.x;
- }
- 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;
-
- feedback.translateToRelative(rect);
- feedback.setBounds(rect);
- }
-
- private void keepNameLabelBounds(LifelineEditPart lifelineEP, ChangeBoundsRequest request, PrecisionRectangle rect) {
- PrecisionRectangle size = getMovedRectangle(rect, request);
- Dimension preferSize = lifelineEP.getPrimaryShape().getFigureLifelineNameContainerFigure().getPreferredSize(-1, -1).getCopy();
- getHostFigure().translateToAbsolute(preferSize); // handle scale size
-
- if(size.width < preferSize.width){
- request.getSizeDelta().width = preferSize.width - rect.width ;
- if( request.getMoveDelta().x > 0)
- request.getMoveDelta().x = rect.width - preferSize.width;
- }
- }
-
- protected Rectangle getCurrentConstraintFor(GraphicalEditPart child) {
- IFigure fig = child.getFigure();
- return (Rectangle) fig.getParent().getLayoutManager()
- .getConstraint(fig);
- }
-
- private void keepInParentBounds(LifelineEditPart lifelineEP, ChangeBoundsRequest request, PrecisionRectangle rect) {
- if (lifelineEP.getParent() instanceof LifelineEditPart){
- LifelineEditPart parent = (LifelineEditPart)lifelineEP.getParent() ;
- Rectangle p = parent.getFigure().getBounds().getCopy();
- parent.getFigure().translateToAbsolute(p);
- PrecisionRectangle c = getMovedRectangle(rect, request);
-
- Dimension preferSize = getHostFigure().getPreferredSize();
- getHostFigure().translateToAbsolute(preferSize); // handle scale size
-
- if (request.getType().equals(RequestConstants.REQ_RESIZE)) {
- switch (request.getResizeDirection()) {
- case PositionConstants.WEST:
- if (c.getLeft().x <= p.getLeft().x) { // exceed left edge
- int delta = (p.getLeft().x - c.getLeft().x);
- request.getMoveDelta().x += delta;
- request.getSizeDelta().width -= delta;
- }
- break;
- case PositionConstants.EAST:
- if (c.getRight().x + request.getSizeDelta().width >= p.getRight().x) { // exceed right edge
- int delta = (c.getRight().x - p.getRight().x );
- request.getSizeDelta().width -= delta;
- }
- break;
- }
- } else {
- if (c.getLeft().x <= p.getLeft().x) { // exceed left edge
- int delta = (p.getLeft().x - c.getLeft().x);
- request.getMoveDelta().x += delta;
- } else if (c.getRight().x >= p.getRight().x) { // exceed right edge
- int delta = (c.getRight().x - p.getRight().x );
- request.getMoveDelta().x -= delta;
- }
- }
-
- // check lifeline intersect with each other
- c = getMovedRectangle(rect , request);
- Rectangle other = getLifelineIntersectBounds(lifelineEP, parent, request, c);
- if (other != null) {
- if (request.getSizeDelta().width == 0) { // move only
- if(request.getMoveDelta().x > 0){ // move right
- request.getMoveDelta().x = other.getLeft().x - rect.getRight().x;
- } else {
- request.getMoveDelta().x = other.getRight().x - rect.getLeft().x;
- }
- } else {
- if (request.getMoveDelta().x == 0) { // resize right edge
- request.getSizeDelta().width = other.getLeft().x - rect.getRight().x;
- } else { // resize left edge
- request.getMoveDelta().x = other.getRight().x - rect.getLeft().x;
- request.getSizeDelta().width = - request.getMoveDelta().x ;
- }
- }
- }
- }
- }
-
- private Rectangle getLifelineIntersectBounds(LifelineEditPart lifelineEP, LifelineEditPart parent, ChangeBoundsRequest request, PrecisionRectangle rect) {
- List children = parent.getChildren();
- for(Object o : children)
- if(o instanceof LifelineEditPart && o != lifelineEP){
- LifelineEditPart p = (LifelineEditPart)o;
- Rectangle bounds = p.getFigure().getBounds().getCopy();
- p.getFigure().translateToAbsolute(bounds);
- if(bounds.intersects(rect)){
- return bounds;
- }
- }
- return null;
- }
-
- private PrecisionRectangle getMovedRectangle(PrecisionRectangle rect , ChangeBoundsRequest request ){
- PrecisionRectangle c = rect.getPreciseCopy();
- c.translate(request.getMoveDelta());
- c.resize(request.getSizeDelta());
- return c;
- }
-
- private void changeCombinedFragmentBounds(ChangeBoundsRequest request, LifelineEditPart lifelineEP) {
- if(request.getMoveDelta().x > 0) // move right
- return;
-
- View shape = (View) lifelineEP.getModel();
- Lifeline element = (Lifeline) shape.getElement();
- EList<InteractionFragment> covereds = element.getCoveredBys();
- EditPart parent = lifelineEP.getParent();
- List<?> children = parent.getChildren();
- for (Object obj : children) {
- if(obj instanceof CombinedFragmentEditPart){
- CombinedFragmentEditPart et = (CombinedFragmentEditPart) obj;
- View sp = (View) et.getModel();
- if (!covereds.contains(sp.getElement())) {
- continue;
- }
- changeCombinedFragmentBounds( request, et, lifelineEP);
- }
- }
- }
-
- Point maxMoveDelta;
-
- @Override
- protected void eraseChangeBoundsFeedback(ChangeBoundsRequest request) {
- super.eraseChangeBoundsFeedback(request);
- maxMoveDelta = null;
- }
-
- void changeCombinedFragmentBounds(ChangeBoundsRequest request, CombinedFragmentEditPart cep, LifelineEditPart lifelineEP){
- Rectangle rect = getTransformedRectangle(cep, request);
-
- if(rect.x <= 0){
- if(maxMoveDelta != null)
- request.getMoveDelta().x = maxMoveDelta.x;
- else{
- Point p = new Point(Math.abs(rect.x), 0 );
- cep.getFigure().translateToAbsolute(p);
- request.getMoveDelta().x = Math.min(0, request.getMoveDelta().x + p.x ) ;
- maxMoveDelta = request.getMoveDelta().getCopy();
- }
- }
- }
-
- private Rectangle getTransformedRectangle(CombinedFragmentEditPart cep, ChangeBoundsRequest request) {
- Rectangle rect = new PrecisionRectangle(cep.getFigure().getBounds());
- cep.getFigure().translateToAbsolute(rect);
- rect = request.getTransformedRectangle(rect);
- cep.getFigure().translateToRelative(rect);
- return rect;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message2ItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message2ItemSemanticEditPolicy.java
deleted file mode 100644
index 2ada9c2064f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message2ItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @generated
- */
-public class Message2ItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public Message2ItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_4004);
- }
-
- /**
- * Added to add duration constraint
- *
- * @generated NOT
- * add Duration Constraint
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new DurationConstraintCreateCommand(req));
- }
- if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new DurationObservationCreateCommand(req));
- }
- return null;
- }
-
- /**
- * the added code to delete the messageoccurencespecification when the message is deleted
- *
- * @generated NOT
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req,getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @generated NOT
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if(mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message3ItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message3ItemSemanticEditPolicy.java
deleted file mode 100644
index 7cde3250265..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message3ItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @generated
- */
-public class Message3ItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public Message3ItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_4005);
- }
-
- /**
- * Added to add duration constraint
- *
- * @generated NOT
- * add Duration Constraint
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new DurationConstraintCreateCommand(req));
- }
- if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new DurationObservationCreateCommand(req));
- }
- return null;
- }
-
- /**
- * @generated NOT
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req,getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @generated NOT
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if(mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message4ItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message4ItemSemanticEditPolicy.java
deleted file mode 100644
index 836540cf085..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message4ItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.LifelineMessageCreateHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @generated
- */
-public class Message4ItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public Message4ItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_4006);
- }
-
- /**
- * Added to add duration constraint
- *
- * @generated NOT
- * add Duration Constraint
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new DurationConstraintCreateCommand(req));
- }
- if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new DurationObservationCreateCommand(req));
- }
- return null;
- }
-
- /**
- * @generated NOT
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- CompoundCommand destroyElementCommand = new CompoundCommand();
- Command deleteCommand = SequenceDeleteHelper.completeDeleteMessageCommand(req,getHost());
- destroyElementCommand.add(deleteCommand);
-
- return LifelineMessageCreateHelper.restoreLifelineOnMessageDelete(destroyElementCommand, getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @generated NOT
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if(mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message5ItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message5ItemSemanticEditPolicy.java
deleted file mode 100644
index 13baa6fb438..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message5ItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @generated
- */
-public class Message5ItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public Message5ItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_4007);
- }
-
- /**
- * Added to add duration constraint
- *
- * @generated NOT
- * add Duration Constraint
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new DurationConstraintCreateCommand(req));
- }
- if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new DurationObservationCreateCommand(req));
- }
- return null;
- }
-
- /**
- * @generated NOT
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req,getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @generated NOT
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if(mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message6ItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message6ItemSemanticEditPolicy.java
deleted file mode 100644
index cd094e72933..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message6ItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @generated
- */
-public class Message6ItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public Message6ItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_4008);
- }
-
- /**
- * Added to add duration constraint
- *
- * @generated NOT
- * add Duration Constraint
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new DurationConstraintCreateCommand(req));
- }
- if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new DurationObservationCreateCommand(req));
- }
- return null;
- }
-
- /**
- * @generated NOT
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req,getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @generated NOT
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if(mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message7ItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message7ItemSemanticEditPolicy.java
deleted file mode 100644
index 23479a97b2a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/Message7ItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @generated
- */
-public class Message7ItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public Message7ItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_4009);
- }
-
- /**
- * Added to add duration constraint
- *
- * @generated NOT
- * add Duration Constraint
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new DurationConstraintCreateCommand(req));
- }
- if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new DurationObservationCreateCommand(req));
- }
- return null;
- }
-
- /**
- * @generated NOT
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req,getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @generated NOT
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if(mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageItemSemanticEditPolicy.java
deleted file mode 100644
index 68a5afe7189..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/MessageItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationObservationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceDeleteHelper;
-
-/**
- * @generated
- */
-public class MessageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public MessageItemSemanticEditPolicy() {
- super(UMLElementTypes.Message_4003);
- }
-
- /**
- * Added to add duration constraint
- *
- * @generated NOT
- * add Duration Constraint
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new DurationConstraintCreateCommand(req));
- }
- if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new DurationObservationCreateCommand(req));
- }
- return null;
- }
-
- /**
- * @generated NOT
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return SequenceDeleteHelper.completeDeleteMessageCommand(req,getHost());
- }
-
- /**
- * This method has been overridden to also delete linked time/duration views
- *
- * @generated NOT
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- CompoundCommand deleteViewsCommand = new CompoundCommand();
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
- deleteViewsCommand.add(deleteViewCommand);
- SequenceDeleteHelper.completeDeleteMessageViewCommand(deleteViewsCommand, getEditingDomain(), getHost());
- if(mainCommand == null) {
- return deleteViewsCommand;
- } else {
- return mainCommand.chain(deleteViewsCommand);
- }
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source should be the domain
- * model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OpenDiagramEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OpenDiagramEditPolicy.java
deleted file mode 100644
index 8df57947c57..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/OpenDiagramEditPolicy.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.OpenEditPolicy;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.Style;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorUtil;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * @generated
- */
-public class OpenDiagramEditPolicy extends OpenEditPolicy {
-
- /**
- * @generated
- */
- protected Command getOpenCommand(Request request) {
- EditPart targetEditPart = getTargetEditPart(request);
- if(false == targetEditPart.getModel() instanceof View) {
- return null;
- }
- View view = (View)targetEditPart.getModel();
- Style link = view.getStyle(NotationPackage.eINSTANCE.getHintedDiagramLinkStyle());
- if(false == link instanceof HintedDiagramLinkStyle) {
- return null;
- }
- return new ICommandProxy(new OpenDiagramCommand((HintedDiagramLinkStyle)link));
- }
-
- /**
- * @generated
- */
- private static class OpenDiagramCommand extends AbstractTransactionalCommand {
-
- /**
- * @generated
- */
- private final HintedDiagramLinkStyle diagramFacet;
-
- /**
- * @generated
- */
- OpenDiagramCommand(HintedDiagramLinkStyle linkStyle) {
- // editing domain is taken for original diagram,
- // if we open diagram from another file, we should use another editing domain
- super(TransactionUtil.getEditingDomain(linkStyle), Messages.CommandName_OpenDiagram, null);
- diagramFacet = linkStyle;
- }
-
- // FIXME canExecute if !(readOnly && getDiagramToOpen == null), i.e.
- // open works on ro diagrams only when there's associated diagram
- // already
-
- /**
- * @generated
- */
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- try {
- Diagram diagram = getDiagramToOpen();
- if(diagram == null) {
- diagram = intializeNewDiagram();
- }
- URI uri = EcoreUtil.getURI(diagram);
- String editorName = uri.lastSegment() + '#' + diagram.eResource().getContents().indexOf(diagram);
- IEditorInput editorInput = new URIEditorInput(uri, editorName);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- page.openEditor(editorInput, getEditorID());
- return CommandResult.newOKCommandResult();
- } catch (Exception ex) {
- throw new ExecutionException("Can't open diagram", ex);
- }
- }
-
- /**
- * @generated
- */
- protected Diagram getDiagramToOpen() {
- return diagramFacet.getDiagramLink();
- }
-
- /**
- * @generated
- */
- protected Diagram intializeNewDiagram() throws ExecutionException {
- Diagram d = ViewService.createDiagram(getDiagramDomainElement(), getDiagramKind(), getPreferencesHint());
- if(d == null) {
- throw new ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind");
- }
- diagramFacet.setDiagramLink(d);
- assert diagramFacet.eResource() != null;
- diagramFacet.eResource().getContents().add(d);
- EObject container = diagramFacet.eContainer();
- while(container instanceof View) {
- ((View)container).persist();
- container = container.eContainer();
- }
- try {
- new WorkspaceModifyOperation() {
-
- protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
- try {
- for(Iterator it = diagramFacet.eResource().getResourceSet().getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource)it.next();
- if(nextResource.isLoaded() && !getEditingDomain().isReadOnly(nextResource)) {
- nextResource.save(UMLDiagramEditorUtil.getSaveOptions());
- }
- }
- } catch (IOException ex) {
- throw new InvocationTargetException(ex, "Save operation failed");
- }
- }
- }.run(null);
- } catch (InvocationTargetException e) {
- throw new ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind", e);
- } catch (InterruptedException e) {
- throw new ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind", e);
- }
- return d;
- }
-
- /**
- * @generated
- */
- protected EObject getDiagramDomainElement() {
- // use same element as associated with EP
- return ((View)diagramFacet.eContainer()).getElement();
- }
-
- /**
- * @generated
- */
- protected PreferencesHint getPreferencesHint() {
- // XXX prefhint from target diagram's editor?
- return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * @generated
- */
- protected String getDiagramKind() {
- return PackageEditPart.MODEL_ID;
- }
-
- /**
- * @generated
- */
- protected String getEditorID() {
- return UMLDiagramEditor.ID;
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageCanonicalEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageCanonicalEditPolicy.java
deleted file mode 100644
index 0c01a39ffd3..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageCanonicalEditPolicy.java
+++ /dev/null
@@ -1,592 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart;
-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.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLLinkDescriptor;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for(int i = 0; i < c.size(); i++) {
- ((EditPart)c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- protected EStructuralFeature getFeatureToSynchronize() {
- return UMLPackage.eINSTANCE.getPackage_PackagedElement();
- }
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- protected List getSemanticChildrenList() {
- View viewObject = (View)getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getPackage_1000SemanticChildren(viewObject);
- for(UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- return InteractionEditPart.VISUAL_ID == UMLVisualIDRegistry.getVisualID(view);
- }
-
- /**
- * @generated
- */
- protected void refreshSemantic() {
- if(resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getPackage_1000SemanticChildren((View)getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for(View v : getViewChildren()) {
- if(isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for(Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for(View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if(next.getModelElement().equals(semanticElement)) {
- if(hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if(perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for(UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if(cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>)request.getNewObject();
- createdViews.addAll(nl);
- }
- if(changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
-
- Collection<IAdaptable> createdConnectionViews = refreshConnections();
-
- if(createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- createdViews.addAll(createdConnectionViews);
-
- makeViewsImmutable(createdViews);
- }
-
- /**
- * @generated
- */
- private Diagram getDiagram() {
- return ((View)getHost().getModel()).getDiagram();
- }
-
- /**
- * @generated
- */
- private Collection<IAdaptable> refreshConnections() {
- Map<EObject, View> domain2NotationMap = new HashMap<EObject, View>();
- Collection<UMLLinkDescriptor> linkDescriptors = collectAllLinks(getDiagram(), domain2NotationMap);
- Collection existingLinks = new LinkedList(getDiagram().getEdges());
- for(Iterator linksIterator = existingLinks.iterator(); linksIterator.hasNext();) {
- Edge nextDiagramLink = (Edge)linksIterator.next();
- int diagramLinkVisualID = UMLVisualIDRegistry.getVisualID(nextDiagramLink);
- if(diagramLinkVisualID == -1) {
- if(nextDiagramLink.getSource() != null && nextDiagramLink.getTarget() != null) {
- linksIterator.remove();
- }
- continue;
- }
- EObject diagramLinkObject = nextDiagramLink.getElement();
- EObject diagramLinkSrc = nextDiagramLink.getSource().getElement();
- EObject diagramLinkDst = nextDiagramLink.getTarget().getElement();
- for(Iterator<UMLLinkDescriptor> linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator.hasNext();) {
- UMLLinkDescriptor nextLinkDescriptor = linkDescriptorsIterator.next();
- if(diagramLinkObject == nextLinkDescriptor.getModelElement() && diagramLinkSrc == nextLinkDescriptor.getSource() && diagramLinkDst == nextLinkDescriptor.getDestination() && diagramLinkVisualID == nextLinkDescriptor.getVisualID()) {
- linksIterator.remove();
- linkDescriptorsIterator.remove();
- break;
- }
- }
- }
- deleteViews(existingLinks.iterator());
- return createConnections(linkDescriptors, domain2NotationMap);
- }
-
- /**
- * @generated
- */
- private Collection<UMLLinkDescriptor> collectAllLinks(View view, Map<EObject, View> domain2NotationMap) {
- if(!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view))) {
- return Collections.emptyList();
- }
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- switch(UMLVisualIDRegistry.getVisualID(view)) {
- case PackageEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getPackage_1000ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case InteractionEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getInteraction_2001ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getConsiderIgnoreFragment_3007ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case CombinedFragmentEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getCombinedFragment_3004ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case InteractionOperandEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getInteractionOperand_3005ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case InteractionUseEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getInteractionUse_3002ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case ContinuationEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getContinuation_3016ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case LifelineEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getLifeline_3001ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getActionExecutionSpecification_3006ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getBehaviorExecutionSpecification_3003ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case StateInvariantEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getStateInvariant_3017ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case CombinedFragment2EditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getCombinedFragment_3018ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case TimeConstraintEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getTimeConstraint_3019ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case TimeObservationEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getTimeObservation_3020ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case DurationConstraintEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getDurationConstraint_3021ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getDestructionOccurrenceSpecification_3022ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case ConstraintEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getConstraint_3008ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case CommentEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getComment_3009ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getDurationConstraint_3023ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case DurationObservationEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getDurationObservation_3024ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case MessageEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getMessage_4003ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case Message2EditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getMessage_4004ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case Message3EditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getMessage_4005ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case Message4EditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getMessage_4006ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case Message5EditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getMessage_4007ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case Message6EditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getMessage_4008ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case Message7EditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getMessage_4009ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- case GeneralOrderingEditPart.VISUAL_ID:
- {
- if(!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.getGeneralOrdering_4012ContainedLinks(view));
- }
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
- break;
- }
- }
- for(Iterator children = view.getChildren().iterator(); children.hasNext();) {
- result.addAll(collectAllLinks((View)children.next(), domain2NotationMap));
- }
- for(Iterator edges = view.getSourceEdges().iterator(); edges.hasNext();) {
- result.addAll(collectAllLinks((View)edges.next(), domain2NotationMap));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection<IAdaptable> createConnections(Collection<UMLLinkDescriptor> linkDescriptors, Map<EObject, View> domain2NotationMap) {
- LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
- for(UMLLinkDescriptor nextLinkDescriptor : linkDescriptors) {
- EditPart sourceEditPart = getEditPart(nextLinkDescriptor.getSource(), domain2NotationMap);
- EditPart targetEditPart = getEditPart(nextLinkDescriptor.getDestination(), domain2NotationMap);
- if(sourceEditPart == null || targetEditPart == null) {
- continue;
- }
- CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(nextLinkDescriptor.getSemanticAdapter(), UMLVisualIDRegistry.getType(nextLinkDescriptor.getVisualID()), ViewUtil.APPEND, false, ((IGraphicalEditPart)getHost()).getDiagramPreferencesHint());
- CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
- ccr.setType(RequestConstants.REQ_CONNECTION_START);
- ccr.setSourceEditPart(sourceEditPart);
- sourceEditPart.getCommand(ccr);
- ccr.setTargetEditPart(targetEditPart);
- ccr.setType(RequestConstants.REQ_CONNECTION_END);
- Command cmd = targetEditPart.getCommand(ccr);
- if(cmd != null && cmd.canExecute()) {
- executeCommand(cmd);
- IAdaptable viewAdapter = (IAdaptable)ccr.getNewObject();
- if(viewAdapter != null) {
- adapters.add(viewAdapter);
- }
- }
- }
- return adapters;
- }
-
- /**
- * @generated
- */
- private EditPart getEditPart(EObject domainModelElement, Map<EObject, View> domain2NotationMap) {
- View view = (View)domain2NotationMap.get(domainModelElement);
- if(view != null) {
- return (EditPart)getHost().getViewer().getEditPartRegistry().get(view);
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java
deleted file mode 100644
index 7e614003286..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PackageItemSemanticEditPolicy() {
- super(UMLElementTypes.Package_1000);
- }
-
- /**
- * @generated
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.Interaction_2001 == req.getElementType()) {
- return getGEFWrapper(new InteractionCreateCommand(req));
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getDuplicateCommand(DuplicateElementsRequest req) {
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
- Diagram currentDiagram = null;
- if(getHost() instanceof IGraphicalEditPart) {
- currentDiagram = ((IGraphicalEditPart)getHost()).getNotationView().getDiagram();
- }
- return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req, currentDiagram));
- }
-
- /**
- * @generated
- */
- private static class DuplicateAnythingCommand extends DuplicateNamedElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram;
-
- /**
- * @generated
- */
- public DuplicateAnythingCommand(TransactionalEditingDomain editingDomain, DuplicateElementsRequest req, Diagram currentDiagram) {
- super(editingDomain, req.getLabel(), req.getElementsToBeDuplicated(), req.getAllDuplicatedElementsMap(), currentDiagram);
- this.diagram = currentDiagram;
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/StateInvariantItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/StateInvariantItemSemanticEditPolicy.java
deleted file mode 100644
index b93da929700..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/StateInvariantItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class StateInvariantItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public StateInvariantItemSemanticEditPolicy() {
- super(UMLElementTypes.StateInvariant_3017);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View)getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
-
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if(annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeConstraintItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeConstraintItemSemanticEditPolicy.java
deleted file mode 100644
index ef932e71bff..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeConstraintItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public TimeConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.TimeConstraint_3019);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View)getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
-
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if(annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeObservationItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeObservationItemSemanticEditPolicy.java
deleted file mode 100644
index 073ed46416f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/TimeObservationItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message2ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message3ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message4ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message5ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message6ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7CreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.Message7ReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageCreateCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.MessageReorientCommand;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public TimeObservationItemSemanticEditPolicy() {
- super(UMLElementTypes.TimeObservation_3020);
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View)getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
-
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if(annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new org.eclipse.emf.edit.command.DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return null;
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- if(UMLElementTypes.Message_4003 == req.getElementType()) {
- return getGEFWrapper(new MessageCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4004 == req.getElementType()) {
- return getGEFWrapper(new Message2CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4005 == req.getElementType()) {
- return getGEFWrapper(new Message3CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4006 == req.getElementType()) {
- return getGEFWrapper(new Message4CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4007 == req.getElementType()) {
- return getGEFWrapper(new Message5CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4008 == req.getElementType()) {
- return getGEFWrapper(new Message6CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.Message_4009 == req.getElementType()) {
- return getGEFWrapper(new Message7CreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.CommentAnnotatedElement_4010 == req.getElementType()) {
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- if(UMLElementTypes.ConstraintConstrainedElement_4011 == req.getElementType()) {
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch(getVisualID(req)) {
- case MessageEditPart.VISUAL_ID:
- return getGEFWrapper(new MessageReorientCommand(req));
- case Message2EditPart.VISUAL_ID:
- return getGEFWrapper(new Message2ReorientCommand(req));
- case Message3EditPart.VISUAL_ID:
- return getGEFWrapper(new Message3ReorientCommand(req));
- case Message4EditPart.VISUAL_ID:
- return getGEFWrapper(new Message4ReorientCommand(req));
- case Message5EditPart.VISUAL_ID:
- return getGEFWrapper(new Message5ReorientCommand(req));
- case Message6EditPart.VISUAL_ID:
- return getGEFWrapper(new Message6ReorientCommand(req));
- case Message7EditPart.VISUAL_ID:
- return getGEFWrapper(new Message7ReorientCommand(req));
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch(getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java
deleted file mode 100644
index b95fa64dbdf..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ /dev/null
@@ -1,693 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.MoveElementsCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.helpers.UMLBaseEditHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.expressions.UMLOCLFactory;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.GeneralOrdering;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
-
- /**
- * Extended request data key to hold editpart visual id.
- *
- * @generated
- */
- public static final String VISUAL_ID_KEY = "visual_id"; //$NON-NLS-1$
-
- /**
- * Extended request data key to hold the edge view during a reconnect request.
- *
- * @generated
- */
- public static final String GRAPHICAL_RECONNECTED_EDGE = "graphical_edge"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final IElementType myElementType;
-
- /**
- * @generated
- */
- protected UMLBaseItemSemanticEditPolicy(IElementType elementType) {
- myElementType = elementType;
- }
-
- /**
- * Extended request data key to hold editpart visual id. Add visual id of edited editpart to
- * extended data of the request so command switch can decide what kind of diagram element is
- * being edited. It is done in those cases when it's not possible to deduce diagram element kind
- * from domain element.
- *
- * @generated
- */
- @SuppressWarnings("unchecked")
- public Command getCommand(Request request) {
- if(request instanceof ReconnectRequest) {
- Object view = ((ReconnectRequest)request).getConnectionEditPart().getModel();
- if(view instanceof View) {
- Integer id = new Integer(UMLVisualIDRegistry.getVisualID((View)view));
- request.getExtendedData().put(VISUAL_ID_KEY, id);
- request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, (View)view);
- }
- }
- return super.getCommand(request);
- }
-
- /**
- * Returns visual id from request parameters.
- *
- * @generated
- */
- protected int getVisualID(IEditCommandRequest request) {
- Object id = request.getParameter(VISUAL_ID_KEY);
- return id instanceof Integer ? ((Integer)id).intValue() : -1;
- }
-
- /**
- * @generated
- */
- protected Command getSemanticCommand(IEditCommandRequest request) {
- IEditCommandRequest completedRequest = completeRequest(request);
- Command semanticCommand = getSemanticCommandSwitch(completedRequest);
- semanticCommand = getEditHelperCommand(completedRequest, semanticCommand);
- if(completedRequest instanceof DestroyRequest) {
- DestroyRequest destroyRequest = (DestroyRequest)completedRequest;
- return shouldProceed(destroyRequest) ? addDeleteViewCommand(semanticCommand, destroyRequest) : null;
- }
- return semanticCommand;
- }
-
- /**
- * @generated
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
- return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand);
- }
-
- /**
- * @generated
- */
- private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
- if(editPolicyCommand != null) {
- ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy)editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
- request.setParameter(UMLBaseEditHelper.EDIT_POLICY_COMMAND, command);
- }
- IElementType requestContextElementType = getContextElementType(request);
- request.setParameter(UMLBaseEditHelper.CONTEXT_ELEMENT_TYPE, requestContextElementType);
- ICommand command = requestContextElementType.getEditCommand(request);
- request.setParameter(UMLBaseEditHelper.EDIT_POLICY_COMMAND, null);
- request.setParameter(UMLBaseEditHelper.CONTEXT_ELEMENT_TYPE, null);
- if(command != null) {
- if(!(command instanceof CompositeTransactionalCommand)) {
- command = new CompositeTransactionalCommand(getEditingDomain(), command.getLabel()).compose(command);
- }
- return new ICommandProxy(command);
- }
- return editPolicyCommand;
- }
-
- /**
- * @generated
- */
- protected IElementType getContextElementType(IEditCommandRequest request) {
- IElementType requestContextElementType = UMLElementTypes.getElementType(getVisualID(request));
- return requestContextElementType != null ? requestContextElementType : myElementType;
- }
-
- /**
- * @generated
- */
- protected Command getSemanticCommandSwitch(IEditCommandRequest req) {
- if(req instanceof CreateRelationshipRequest) {
- return getCreateRelationshipCommand((CreateRelationshipRequest)req);
- } else if(req instanceof CreateElementRequest) {
- return getCreateCommand((CreateElementRequest)req);
- } else if(req instanceof ConfigureRequest) {
- return getConfigureCommand((ConfigureRequest)req);
- } else if(req instanceof DestroyElementRequest) {
- return getDestroyElementCommand((DestroyElementRequest)req);
- } else if(req instanceof DestroyReferenceRequest) {
- return getDestroyReferenceCommand((DestroyReferenceRequest)req);
- } else if(req instanceof DuplicateElementsRequest) {
- return getDuplicateCommand((DuplicateElementsRequest)req);
- } else if(req instanceof GetEditContextRequest) {
- return getEditContextCommand((GetEditContextRequest)req);
- } else if(req instanceof MoveRequest) {
- return getMoveCommand((MoveRequest)req);
- } else if(req instanceof ReorientReferenceRelationshipRequest) {
- return getReorientReferenceRelationshipCommand((ReorientReferenceRelationshipRequest)req);
- } else if(req instanceof ReorientRelationshipRequest) {
- return getReorientRelationshipCommand((ReorientRelationshipRequest)req);
- } else if(req instanceof SetRequest) {
- return getSetCommand((SetRequest)req);
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getConfigureCommand(ConfigureRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- // check if the type is an extended type, and then create directly the element...
- IElementType type = req.getElementType();
- if(type instanceof IExtendedHintedElementType) {
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getContainer());
- if(provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- // Retrieve create command from the Element Edit service
- ICommand createGMFCommand = provider.getEditCommand(req);
-
- return getGEFWrapper(createGMFCommand);
- }
-
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getSetCommand(SetRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getEditContextCommand(GetEditContextRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDuplicateCommand(DuplicateElementsRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getMoveCommand(MoveRequest req) {
- EObject targetCEObject = req.getTargetContainer();
- if(targetCEObject != null) {
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
- if(provider != null) {
- ICommand moveCommand = provider.getEditCommand(req);
- if(moveCommand != null) {
- return new ICommandProxy(moveCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- } else {
- return getGEFWrapper(new MoveElementsCommand(req));
- }
- }
-
- /**
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected final Command getGEFWrapper(ICommand cmd) {
- return new ICommandProxy(cmd);
- }
-
- /**
- * Returns editing domain from the host edit part.
- *
- * @generated
- */
- protected TransactionalEditingDomain getEditingDomain() {
- return ((IGraphicalEditPart)getHost()).getEditingDomain();
- }
-
- /**
- * Clean all shortcuts to the host element from the same diagram
- *
- * @generated
- */
- protected void addDestroyShortcutsCommand(ICompositeCommand cmd, View view) {
- assert view.getEAnnotation("Shortcut") == null; //$NON-NLS-1$
- for(Iterator it = view.getDiagram().getChildren().iterator(); it.hasNext();) {
- View nextView = (View)it.next();
- if(nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
- continue;
- }
- cmd.add(new DeleteCommand(getEditingDomain(), nextView));
- }
- }
-
- /**
- * @generated
- */
- public static LinkConstraints getLinkConstraints() {
- LinkConstraints cached = UMLDiagramEditorPlugin.getInstance().getLinkConstraints();
- if(cached == null) {
- UMLDiagramEditorPlugin.getInstance().setLinkConstraints(cached = new LinkConstraints());
- }
- return cached;
- }
-
- /**
- * @generated
- */
- public static class LinkConstraints {
-
- /**
- * @generated
- */
- public LinkConstraints() {
- // use static method #getLinkConstraints() to access instance
- }
-
- /**
- * @generated
- */
- public boolean canCreateMessage_4003(Interaction container, Element source, Element target) {
- return canExistMessage_4003(container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateMessage_4004(Interaction container, Element source, Element target) {
- return canExistMessage_4004(container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateMessage_4005(Interaction container, Element source, Element target) {
- return canExistMessage_4005(container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateMessage_4006(Interaction container, Element source, Element target) {
- return canExistMessage_4006(container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateMessage_4007(Interaction container, Element source, Element target) {
- return canExistMessage_4007(container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateMessage_4008(Interaction container, Element source, Element target) {
- return canExistMessage_4008(container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateMessage_4009(Interaction container, Element source, Element target) {
- return canExistMessage_4009(container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateCommentAnnotatedElement_4010(Comment source, Element target) {
- if(source != null) {
- if(source.getAnnotatedElements().contains(target)
-
- ) {
- return false;
- }
- }
-
- return canExistCommentAnnotatedElement_4010(source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateConstraintConstrainedElement_4011(Constraint source, Element target) {
- if(source != null) {
- if(source.getConstrainedElements().contains(target)
-
- ) {
- return false;
- }
- }
-
- return canExistConstraintConstrainedElement_4011(source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateGeneralOrdering_4012(InteractionFragment container, OccurrenceSpecification source, OccurrenceSpecification target) {
- return canExistGeneralOrdering_4012(container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canExistMessage_4003(Interaction container, Message linkInstance, Element source, Element target) {
- try {
- if(source == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object sourceVal = UMLOCLFactory.getExpression(2, UMLPackage.eINSTANCE.getElement(), env).evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
- if(false == sourceVal instanceof Boolean || !((Boolean)sourceVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- if(target == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object targetVal = UMLOCLFactory.getExpression(3, UMLPackage.eINSTANCE.getElement(), env).evaluate(target, Collections.singletonMap("oppositeEnd", source)); //$NON-NLS-1$
- if(false == targetVal instanceof Boolean || !((Boolean)targetVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- return true;
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
- return false;
- }
- }
-
- /**
- * @generated
- */
- public boolean canExistMessage_4004(Interaction container, Message linkInstance, Element source, Element target) {
- try {
- if(source == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object sourceVal = UMLOCLFactory.getExpression(5, UMLPackage.eINSTANCE.getElement(), env).evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
- if(false == sourceVal instanceof Boolean || !((Boolean)sourceVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- if(target == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object targetVal = UMLOCLFactory.getExpression(6, UMLPackage.eINSTANCE.getElement(), env).evaluate(target, Collections.singletonMap("oppositeEnd", source)); //$NON-NLS-1$
- if(false == targetVal instanceof Boolean || !((Boolean)targetVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- return true;
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
- return false;
- }
- }
-
- /**
- * @generated
- */
- public boolean canExistMessage_4005(Interaction container, Message linkInstance, Element source, Element target) {
- try {
- if(source == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object sourceVal = UMLOCLFactory.getExpression(8, UMLPackage.eINSTANCE.getElement(), env).evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
- if(false == sourceVal instanceof Boolean || !((Boolean)sourceVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- if(target == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object targetVal = UMLOCLFactory.getExpression(9, UMLPackage.eINSTANCE.getElement(), env).evaluate(target, Collections.singletonMap("oppositeEnd", source)); //$NON-NLS-1$
- if(false == targetVal instanceof Boolean || !((Boolean)targetVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- return true;
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
- return false;
- }
- }
-
- /**
- * @generated
- */
- public boolean canExistMessage_4006(Interaction container, Message linkInstance, Element source, Element target) {
- try {
- if(source == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object sourceVal = UMLOCLFactory.getExpression(11, UMLPackage.eINSTANCE.getElement(), env).evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
- if(false == sourceVal instanceof Boolean || !((Boolean)sourceVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- if(target == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object targetVal = UMLOCLFactory.getExpression(12, UMLPackage.eINSTANCE.getElement(), env).evaluate(target, Collections.singletonMap("oppositeEnd", source)); //$NON-NLS-1$
- if(false == targetVal instanceof Boolean || !((Boolean)targetVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- return true;
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
- return false;
- }
- }
-
- /**
- * @generated
- */
- public boolean canExistMessage_4007(Interaction container, Message linkInstance, Element source, Element target) {
- try {
- if(source == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object sourceVal = UMLOCLFactory.getExpression(14, UMLPackage.eINSTANCE.getElement(), env).evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
- if(false == sourceVal instanceof Boolean || !((Boolean)sourceVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- if(target == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object targetVal = UMLOCLFactory.getExpression(15, UMLPackage.eINSTANCE.getElement(), env).evaluate(target, Collections.singletonMap("oppositeEnd", source)); //$NON-NLS-1$
- if(false == targetVal instanceof Boolean || !((Boolean)targetVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- return true;
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
- return false;
- }
- }
-
- /**
- * @generated
- */
- public boolean canExistMessage_4008(Interaction container, Message linkInstance, Element source, Element target) {
- try {
- if(source == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object sourceVal = UMLOCLFactory.getExpression(17, UMLPackage.eINSTANCE.getElement(), env).evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
- if(false == sourceVal instanceof Boolean || !((Boolean)sourceVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- if(target == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object targetVal = UMLOCLFactory.getExpression(18, UMLPackage.eINSTANCE.getElement(), env).evaluate(target, Collections.singletonMap("oppositeEnd", source)); //$NON-NLS-1$
- if(false == targetVal instanceof Boolean || !((Boolean)targetVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- return true;
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
- return false;
- }
- }
-
- /**
- * @generated
- */
- public boolean canExistMessage_4009(Interaction container, Message linkInstance, Element source, Element target) {
- try {
- if(source == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object sourceVal = UMLOCLFactory.getExpression(20, UMLPackage.eINSTANCE.getElement(), env).evaluate(source, Collections.singletonMap("oppositeEnd", target)); //$NON-NLS-1$
- if(false == sourceVal instanceof Boolean || !((Boolean)sourceVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- if(target == null) {
- return true;
- } else {
- Map<String, EClassifier> env = Collections.<String, EClassifier> singletonMap("oppositeEnd", UMLPackage.eINSTANCE.getElement()); //$NON-NLS-1$
- Object targetVal = UMLOCLFactory.getExpression(21, UMLPackage.eINSTANCE.getElement(), env).evaluate(target, Collections.singletonMap("oppositeEnd", source)); //$NON-NLS-1$
- if(false == targetVal instanceof Boolean || !((Boolean)targetVal).booleanValue()) {
- return false;
- } // else fall-through
- }
- return true;
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
- return false;
- }
- }
-
- /**
- * @generated
- */
- public boolean canExistCommentAnnotatedElement_4010(Comment source, Element target) {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean canExistConstraintConstrainedElement_4011(Constraint source, Element target) {
- return true;
- }
-
- /**
- * @generated NOT disable general ordering on same lifeline
- */
- public boolean canExistGeneralOrdering_4012(InteractionFragment container, GeneralOrdering linkInstance, OccurrenceSpecification source, OccurrenceSpecification target) {
- // disable general ordering on same lifeline
- if(source != null && target != null) {
- return Collections.disjoint(source.getCovereds(), target.getCovereds());
- }
- return true;
- }
-
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextNonResizableEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextNonResizableEditPolicy.java
deleted file mode 100644
index f945bd54676..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextNonResizableEditPolicy.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.FigureListener;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx;
-import org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-
-/**
- * @generated
- */
-public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx {
-
- /**
- * @generated
- */
- private IFigure selectionFeedbackFigure;
-
- /**
- * @generated
- */
- private IFigure focusFeedbackFigure;
-
- /**
- * @generated
- */
- private FigureListener hostPositionListener;
-
- /**
- * @generated
- */
- protected void showPrimarySelection() {
- if(getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getHostFigure()).setSelected(true);
- ((WrappingLabel)getHostFigure()).setFocus(true);
- } else {
- showSelection();
- showFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void showSelection() {
- if(getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getHostFigure()).setSelected(true);
- ((WrappingLabel)getHostFigure()).setFocus(false);
- } else {
- hideSelection();
- addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
- getHostFigure().addFigureListener(getHostPositionListener());
- refreshSelectionFeedback();
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void hideSelection() {
- if(getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getHostFigure()).setSelected(false);
- ((WrappingLabel)getHostFigure()).setFocus(false);
- } else {
- if(selectionFeedbackFigure != null) {
- removeFeedback(selectionFeedbackFigure);
- getHostFigure().removeFigureListener(getHostPositionListener());
- selectionFeedbackFigure = null;
- }
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void showFocus() {
- if(getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getHostFigure()).setFocus(true);
- } else {
- hideFocus();
- addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
- refreshFocusFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void hideFocus() {
- if(getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getHostFigure()).setFocus(false);
- } else {
- if(focusFeedbackFigure != null) {
- removeFeedback(focusFeedbackFigure);
- focusFeedbackFigure = null;
- }
- }
- }
-
- /**
- * @generated
- */
- protected Rectangle getFeedbackBounds() {
- Rectangle bounds;
- if(getHostFigure() instanceof Label) {
- bounds = ((Label)getHostFigure()).getTextBounds();
- bounds.intersect(getHostFigure().getBounds());
- } else {
- bounds = getHostFigure().getBounds().getCopy();
- }
- getHostFigure().getParent().translateToAbsolute(bounds);
- getFeedbackLayer().translateToRelative(bounds);
- return bounds;
- }
-
- /**
- * @generated
- */
- protected IFigure createSelectionFeedbackFigure() {
- if(getHostFigure() instanceof Label) {
- Label feedbackFigure = new Label();
- feedbackFigure.setOpaque(true);
- feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
- feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
- return feedbackFigure;
- } else {
- RectangleFigure feedbackFigure = new RectangleFigure();
- feedbackFigure.setFill(false);
- return feedbackFigure;
- }
- }
-
- /**
- * @generated
- */
- protected IFigure createFocusFeedbackFigure() {
- return new Figure() {
-
- protected void paintFigure(Graphics graphics) {
- graphics.drawFocus(getBounds().getResized(-1, -1));
- }
- };
- }
-
- /**
- * @generated
- */
- protected void updateLabel(Label target) {
- Label source = (Label)getHostFigure();
- target.setText(source.getText());
- target.setTextAlignment(source.getTextAlignment());
- target.setFont(source.getFont());
- }
-
- /**
- * @generated
- */
- protected void refreshSelectionFeedback() {
- if(selectionFeedbackFigure != null) {
- if(selectionFeedbackFigure instanceof Label) {
- updateLabel((Label)selectionFeedbackFigure);
- selectionFeedbackFigure.setBounds(getFeedbackBounds());
- } else {
- selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
- }
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFocusFeedback() {
- if(focusFeedbackFigure != null) {
- focusFeedbackFigure.setBounds(getFeedbackBounds());
- }
- }
-
- /**
- * @generated
- */
- public void refreshFeedback() {
- refreshSelectionFeedback();
- refreshFocusFeedback();
- }
-
- /**
- * @generated
- */
- private FigureListener getHostPositionListener() {
- if(hostPositionListener == null) {
- hostPositionListener = new FigureListener() {
-
- public void figureMoved(IFigure source) {
- refreshFeedback();
- }
- };
- }
- return hostPositionListener;
- }
-
- /**
- * @generated
- */
- protected List createSelectionHandles() {
- MoveHandle moveHandle = new MoveHandle((GraphicalEditPart)getHost());
- moveHandle.setBorder(null);
- moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
- return Collections.singletonList(moveHandle);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextSelectionEditPolicy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextSelectionEditPolicy.java
deleted file mode 100644
index 6d28b48b256..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/UMLTextSelectionEditPolicy.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.FigureListener;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.editpolicies.SelectionEditPolicy;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-
-/**
- * @generated
- */
-public class UMLTextSelectionEditPolicy extends SelectionEditPolicy {
-
- /**
- * @generated
- */
- private IFigure selectionFeedbackFigure;
-
- /**
- * @generated
- */
- private IFigure focusFeedbackFigure;
-
- /**
- * @generated
- */
- private FigureListener hostPositionListener;
-
- /**
- * @generated
- */
- protected void showPrimarySelection() {
- if(getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getHostFigure()).setSelected(true);
- ((WrappingLabel)getHostFigure()).setFocus(true);
- } else {
- showSelection();
- showFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void showSelection() {
- if(getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getHostFigure()).setSelected(true);
- ((WrappingLabel)getHostFigure()).setFocus(false);
- } else {
- hideSelection();
- addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
- getHostFigure().addFigureListener(getHostPositionListener());
- refreshSelectionFeedback();
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void hideSelection() {
- if(getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getHostFigure()).setSelected(false);
- ((WrappingLabel)getHostFigure()).setFocus(false);
- } else {
- if(selectionFeedbackFigure != null) {
- removeFeedback(selectionFeedbackFigure);
- getHostFigure().removeFigureListener(getHostPositionListener());
- selectionFeedbackFigure = null;
- }
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- protected void showFocus() {
- if(getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getHostFigure()).setFocus(true);
- } else {
- hideFocus();
- addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
- refreshFocusFeedback();
- }
- }
-
- /**
- * @generated
- */
- protected void hideFocus() {
- if(getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getHostFigure()).setFocus(false);
- } else {
- if(focusFeedbackFigure != null) {
- removeFeedback(focusFeedbackFigure);
- focusFeedbackFigure = null;
- }
- }
- }
-
- /**
- * @generated
- */
- protected Rectangle getFeedbackBounds() {
- Rectangle bounds;
- if(getHostFigure() instanceof Label) {
- bounds = ((Label)getHostFigure()).getTextBounds();
- bounds.intersect(getHostFigure().getBounds());
- } else {
- bounds = getHostFigure().getBounds().getCopy();
- }
- getHostFigure().getParent().translateToAbsolute(bounds);
- getFeedbackLayer().translateToRelative(bounds);
- return bounds;
- }
-
- /**
- * @generated
- */
- protected IFigure createSelectionFeedbackFigure() {
- if(getHostFigure() instanceof Label) {
- Label feedbackFigure = new Label();
- feedbackFigure.setOpaque(true);
- feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
- feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
- return feedbackFigure;
- } else {
- RectangleFigure feedbackFigure = new RectangleFigure();
- feedbackFigure.setFill(false);
- return feedbackFigure;
- }
- }
-
- /**
- * @generated
- */
- protected IFigure createFocusFeedbackFigure() {
- return new Figure() {
-
- protected void paintFigure(Graphics graphics) {
- graphics.drawFocus(getBounds().getResized(-1, -1));
- }
- };
- }
-
- /**
- * @generated
- */
- protected void updateLabel(Label target) {
- Label source = (Label)getHostFigure();
- target.setText(source.getText());
- target.setTextAlignment(source.getTextAlignment());
- target.setFont(source.getFont());
- }
-
- /**
- * @generated
- */
- protected void refreshSelectionFeedback() {
- if(selectionFeedbackFigure != null) {
- if(selectionFeedbackFigure instanceof Label) {
- updateLabel((Label)selectionFeedbackFigure);
- selectionFeedbackFigure.setBounds(getFeedbackBounds());
- } else {
- selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
- }
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFocusFeedback() {
- if(focusFeedbackFigure != null) {
- focusFeedbackFigure.setBounds(getFeedbackBounds());
- }
- }
-
- /**
- * @generated
- */
- public void refreshFeedback() {
- refreshSelectionFeedback();
- refreshFocusFeedback();
- }
-
- /**
- * @generated
- */
- private FigureListener getHostPositionListener() {
- if(hostPositionListener == null) {
- hostPositionListener = new FigureListener() {
-
- public void figureMoved(IFigure source) {
- refreshFeedback();
- }
- };
- }
- return hostPositionListener;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLAbstractExpression.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLAbstractExpression.java
deleted file mode 100644
index 3bce130c2aa..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLAbstractExpression.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.expressions;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Collections;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public abstract class UMLAbstractExpression {
-
- /**
- * @generated
- */
- private IStatus status = Status.OK_STATUS;
-
- /**
- * @generated
- */
- protected void setStatus(int severity, String message, Throwable throwable) {
- String pluginID = UMLDiagramEditorPlugin.ID;
- this.status = new Status(severity, pluginID, -1, (message != null) ? message : "", throwable); //$NON-NLS-1$
- if(!this.status.isOK()) {
- UMLDiagramEditorPlugin.getInstance().logError("Expression problem:" + message + "body:" + body(), throwable); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * @generated
- */
- public IStatus getStatus() {
- return status;
- }
-
- /**
- * @generated
- */
- private final String myBody;
-
- /**
- * @generated
- */
- public String body() {
- return myBody;
- }
-
- /**
- * @generated
- */
- private final EClassifier myContext;
-
- /**
- * @generated
- */
- public EClassifier context() {
- return myContext;
- }
-
- /**
- * @generated
- */
- protected UMLAbstractExpression(String body, EClassifier context) {
- myBody = body;
- myContext = context;
- }
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- protected abstract Object doEvaluate(Object context, Map env);
-
- /**
- * @generated
- */
- public Object evaluate(Object context) {
- return evaluate(context, Collections.EMPTY_MAP);
- }
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- public Object evaluate(Object context, Map env) {
- if(context().isInstance(context)) {
- try {
- return doEvaluate(context, env);
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Expression evaluation failure: " + body(), e); //$NON-NLS-1$
- }
- }
- return null;
- }
-
- /**
- * Expression may return number value which is not directly compatible with feature type (e.g.
- * Double when Integer is expected), or EEnumLiteral meta-object when literal instance is
- * expected
- *
- * @generated
- */
- public static Object performCast(Object value, EDataType targetType) {
- if(targetType instanceof EEnum) {
- if(value instanceof EEnumLiteral) {
- EEnumLiteral literal = (EEnumLiteral)value;
- return (literal.getInstance() != null) ? literal.getInstance() : literal;
- }
- }
- if(false == value instanceof Number || targetType == null || targetType.getInstanceClass() == null) {
- return value;
- }
- Class<?> targetClass = targetType.getInstanceClass();
- Number num = (Number)value;
- Class<?> valClass = value.getClass();
- Class<?> targetWrapperClass = targetClass;
- if(targetClass.isPrimitive()) {
- targetWrapperClass = EcoreUtil.wrapperClassFor(targetClass);
- }
- if(valClass.equals(targetWrapperClass)) {
- return value;
- }
- if(Number.class.isAssignableFrom(targetWrapperClass)) {
- if(targetWrapperClass.equals(Byte.class))
- return new Byte(num.byteValue());
- if(targetWrapperClass.equals(Integer.class))
- return new Integer(num.intValue());
- if(targetWrapperClass.equals(Short.class))
- return new Short(num.shortValue());
- if(targetWrapperClass.equals(Long.class))
- return new Long(num.longValue());
- if(targetWrapperClass.equals(BigInteger.class))
- return BigInteger.valueOf(num.longValue());
- if(targetWrapperClass.equals(Float.class))
- return new Float(num.floatValue());
- if(targetWrapperClass.equals(Double.class))
- return new Double(num.doubleValue());
- if(targetWrapperClass.equals(BigDecimal.class))
- return new BigDecimal(num.doubleValue());
- }
- return value;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLOCLFactory.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLOCLFactory.java
deleted file mode 100644
index 7a8b6ba03a1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/expressions/UMLOCLFactory.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.expressions;
-
-import java.util.Collections;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EParameter;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.ocl.Environment;
-import org.eclipse.ocl.EvaluationEnvironment;
-import org.eclipse.ocl.ParserException;
-import org.eclipse.ocl.ecore.EcoreFactory;
-import org.eclipse.ocl.ecore.OCL.Helper;
-import org.eclipse.ocl.ecore.OCLExpression;
-import org.eclipse.ocl.ecore.Variable;
-import org.eclipse.ocl.options.ParsingOptions;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class UMLOCLFactory {
-
- /**
- * @generated
- */
- private final UMLAbstractExpression[] expressions;
-
- /**
- * @generated
- */
- protected UMLOCLFactory() {
- this.expressions = new UMLAbstractExpression[22];
- }
-
- /**
- * @generated
- */
- public static UMLAbstractExpression getExpression(int index, EClassifier context, Map<String, EClassifier> environment) {
- UMLOCLFactory cached = UMLDiagramEditorPlugin.getInstance().getUMLOCLFactory();
- if(cached == null) {
- UMLDiagramEditorPlugin.getInstance().setUMLOCLFactory(cached = new UMLOCLFactory());
- }
- if(index < 0 || index >= cached.expressions.length) {
- throw new IllegalArgumentException();
- }
- if(cached.expressions[index] == null) {
- final String[] exprBodies = new String[]{ "\' \'", //$NON-NLS-1$
- "self.messageSort=MessageSort::synchCall and self.sendEvent<>null and self.receiveEvent<>null", //$NON-NLS-1$
- "self.oclIsKindOf(uml::InteractionFragment)", //$NON-NLS-1$
- "self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)", //$NON-NLS-1$
- "(self.messageSort=MessageSort::asynchCall or self.messageSort=MessageSort::asynchSignal) and self.sendEvent<>null and self.receiveEvent<>null", //$NON-NLS-1$
- "self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)", //$NON-NLS-1$
- "true\r\n-- The following rule is completely false : check can not be performed with only source and target (depends on the the location on the lifeline). Anyway, job is previously done by method CommandHelper.hasValidContainer(IEditCommandRequest)\r\n--(self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)) and (self.owner = oppositeEnd.owner or self.owner = oppositeEnd or self = oppositeEnd.owner)", //$NON-NLS-1$
- "self.messageSort=MessageSort::reply and self.sendEvent<>null and self.receiveEvent<>null", //$NON-NLS-1$
- "self.oclIsKindOf(uml::InteractionFragment)", //$NON-NLS-1$
- "self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)", //$NON-NLS-1$
- "self.messageSort=MessageSort::createMessage and self.sendEvent<>null and self.receiveEvent<>null", //$NON-NLS-1$
- "self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)", //$NON-NLS-1$
- "self.oclIsKindOf(uml::Lifeline)", //$NON-NLS-1$
- "self.messageSort=MessageSort::deleteMessage and self.sendEvent<>null and self.receiveEvent<>null", //$NON-NLS-1$
- "self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)", //$NON-NLS-1$
- "self.oclIsKindOf(uml::DestructionOccurrenceSpecification) or self.oclIsKindOf(uml::Lifeline)", //$NON-NLS-1$
- "self.receiveEvent=null", //$NON-NLS-1$
- "self.oclIsKindOf(uml::Lifeline) or self.oclIsKindOf(uml::InteractionFragment)", //$NON-NLS-1$
- "self.oclIsKindOf(uml::Interaction)", //$NON-NLS-1$
- "self.sendEvent=null", //$NON-NLS-1$
- "self.oclIsKindOf(uml::Interaction)", //$NON-NLS-1$
- "(self.oclIsKindOf(uml::Lifeline) or self.oclIsKindOf(uml::InteractionFragment))", //$NON-NLS-1$
- };
- cached.expressions[index] = getExpression(exprBodies[index], context, environment == null ? Collections.<String, EClassifier> emptyMap() : environment);
- }
- return cached.expressions[index];
- }
-
- /**
- * @generated
- */
- public static UMLAbstractExpression getExpression(String body, EClassifier context, Map<String, EClassifier> environment) {
- return new Expression(body, context, environment);
- }
-
- /**
- * @generated
- */
- public static UMLAbstractExpression getExpression(String body, EClassifier context) {
- return getExpression(body, context, Collections.<String, EClassifier> emptyMap());
- }
-
- /**
- * @generated
- */
- private static class Expression extends UMLAbstractExpression {
-
- /**
- * @generated
- */
- private final org.eclipse.ocl.ecore.OCL oclInstance;
-
- /**
- * @generated
- */
- private OCLExpression oclExpression;
-
- /**
- * @generated
- */
- public Expression(String body, EClassifier context, Map<String, EClassifier> environment) {
- super(body, context);
- oclInstance = org.eclipse.ocl.ecore.OCL.newInstance();
- initCustomEnv(oclInstance.getEnvironment(), environment);
- Helper oclHelper = oclInstance.createOCLHelper();
- oclHelper.setContext(context());
- try {
- oclExpression = oclHelper.createQuery(body());
- setStatus(IStatus.OK, null, null);
- } catch (ParserException e) {
- setStatus(IStatus.ERROR, e.getMessage(), e);
- }
- }
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- protected Object doEvaluate(Object context, Map env) {
- if(oclExpression == null) {
- return null;
- }
- // on the first call, both evalEnvironment and extentMap are clear, for later we have finally, below.
- EvaluationEnvironment<?, ?, ?, ?, ?> evalEnv = oclInstance.getEvaluationEnvironment();
- // initialize environment
- for(Object nextKey : env.keySet()) {
- evalEnv.replace((String)nextKey, env.get(nextKey));
- }
- try {
- Object result = oclInstance.evaluate(context, oclExpression);
- return oclInstance.isInvalid(result) ? null : result;
- } finally {
- evalEnv.clear();
- oclInstance.setExtentMap(null); // clear allInstances cache, and get the oclInstance ready for the next call
- }
- }
-
- /**
- * @generated
- */
- private static void initCustomEnv(Environment<?, EClassifier, ?, ?, ?, EParameter, ?, ?, ?, ?, ?, ?> ecoreEnv, Map<String, EClassifier> environment) {
- // Use EObject as implicit root class for any object, to allow eContainer() and other EObject operations from OCL expressions
- ParsingOptions.setOption(ecoreEnv, ParsingOptions.implicitRootClass(ecoreEnv), EcorePackage.eINSTANCE.getEObject());
- for(String varName : environment.keySet()) {
- EClassifier varType = environment.get(varName);
- ecoreEnv.addElement(varName, createVar(ecoreEnv, varName, varType), false);
- }
- }
-
- /**
- * @generated
- */
- private static Variable createVar(Environment<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?> ecoreEnv, String name, EClassifier type) {
- Variable var = EcoreFactory.eINSTANCE.createVariable();
- var.setName(name);
- var.setType(ecoreEnv.getUMLReflection().getOCLType(type));
- return var;
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLAbstractNavigatorItem.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLAbstractNavigatorItem.java
deleted file mode 100644
index 7d55f586e68..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLAbstractNavigatorItem.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.navigator;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
-
-/**
- * @generated
- */
-public abstract class UMLAbstractNavigatorItem extends PlatformObject {
-
- /**
- * @generated
- */
- static {
- final Class[] supportedTypes = new Class[]{ ITabbedPropertySheetPageContributor.class };
- final ITabbedPropertySheetPageContributor propertySheetPageContributor = new ITabbedPropertySheetPageContributor() {
-
- public String getContributorId() {
- return "org.eclipse.papyrus.uml.diagram.sequence"; //$NON-NLS-1$
- }
- };
- Platform.getAdapterManager().registerAdapters(new IAdapterFactory() {
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if(adaptableObject instanceof org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLAbstractNavigatorItem && adapterType == ITabbedPropertySheetPageContributor.class) {
- return propertySheetPageContributor;
- }
- return null;
- }
-
- public Class[] getAdapterList() {
- return supportedTypes;
- }
- }, org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLAbstractNavigatorItem.class);
- }
-
- /**
- * @generated
- */
- private Object myParent;
-
- /**
- * @generated
- */
- protected UMLAbstractNavigatorItem(Object parent) {
- myParent = parent;
- }
-
- /**
- * @generated
- */
- public Object getParent() {
- return myParent;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorContentProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorContentProvider.java
deleted file mode 100644
index 58b7017800f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorContentProvider.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.navigator;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-import org.eclipse.ui.navigator.ICommonContentProvider;
-
-/**
- * @generated
- */
-public class UMLDomainNavigatorContentProvider implements ICommonContentProvider {
-
- /**
- * @generated
- */
- private AdapterFactoryContentProvider myAdapterFctoryContentProvier;
-
- /**
- * @generated
- */
- private static final Object[] EMPTY_ARRAY = new Object[0];
-
- /**
- * @generated
- */
- private Viewer myViewer;
-
- /**
- * @generated
- */
- private AdapterFactoryEditingDomain myEditingDomain;
-
- /**
- * @generated
- */
- private WorkspaceSynchronizer myWorkspaceSynchronizer;
-
- /**
- * @generated
- */
- private Runnable myViewerRefreshRunnable;
-
- /**
- * @generated
- */
- public UMLDomainNavigatorContentProvider() {
- myAdapterFctoryContentProvier = new AdapterFactoryContentProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
- TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain();
- myEditingDomain = (AdapterFactoryEditingDomain)editingDomain;
- myEditingDomain.setResourceToReadOnlyMap(new HashMap() {
-
- public Object get(Object key) {
- if(!containsKey(key)) {
- put(key, Boolean.TRUE);
- }
- return super.get(key);
- }
- });
- myViewerRefreshRunnable = new Runnable() {
-
- public void run() {
- if(myViewer != null) {
- myViewer.refresh();
- }
- }
- };
- myWorkspaceSynchronizer = new WorkspaceSynchronizer(editingDomain, new WorkspaceSynchronizer.Delegate() {
-
- public void dispose() {
- }
-
- public boolean handleResourceChanged(final Resource resource) {
- for(Iterator it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource)it.next();
- nextResource.unload();
- }
- if(myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(myViewerRefreshRunnable);
- }
- return true;
- }
-
- public boolean handleResourceDeleted(Resource resource) {
- for(Iterator it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource)it.next();
- nextResource.unload();
- }
- if(myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(myViewerRefreshRunnable);
- }
- return true;
- }
-
- public boolean handleResourceMoved(Resource resource, final URI newURI) {
- for(Iterator it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource)it.next();
- nextResource.unload();
- }
- if(myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(myViewerRefreshRunnable);
- }
- return true;
- }
- });
- }
-
- /**
- * @generated
- */
- public void dispose() {
- myWorkspaceSynchronizer.dispose();
- myWorkspaceSynchronizer = null;
- myViewerRefreshRunnable = null;
- for(Iterator it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
- Resource resource = (Resource)it.next();
- resource.unload();
- }
- ((TransactionalEditingDomain)myEditingDomain).dispose();
- myEditingDomain = null;
- }
-
- /**
- * @generated
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- myViewer = viewer;
- }
-
- /**
- * @generated
- */
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- /**
- * @generated
- */
- public void restoreState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void saveState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void init(ICommonContentExtensionSite aConfig) {
- }
-
- /**
- * @generated
- */
- public Object[] getChildren(Object parentElement) {
- if(parentElement instanceof IFile) {
- IFile file = (IFile)parentElement;
- URI fileURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
- Resource resource = myEditingDomain.getResourceSet().getResource(fileURI, true);
- return wrapEObjects(myAdapterFctoryContentProvier.getChildren(resource), parentElement);
- }
-
- if(parentElement instanceof UMLDomainNavigatorItem) {
- return wrapEObjects(myAdapterFctoryContentProvier.getChildren(((UMLDomainNavigatorItem)parentElement).getEObject()), parentElement);
- }
- return EMPTY_ARRAY;
- }
-
- /**
- * @generated
- */
- public Object[] wrapEObjects(Object[] objects, Object parentElement) {
- Collection result = new ArrayList();
- for(int i = 0; i < objects.length; i++) {
- if(objects[i] instanceof EObject) {
- result.add(new UMLDomainNavigatorItem((EObject)objects[i], parentElement, myAdapterFctoryContentProvier));
- }
- }
- return result.toArray();
- }
-
- /**
- * @generated
- */
- public Object getParent(Object element) {
- if(element instanceof UMLAbstractNavigatorItem) {
- UMLAbstractNavigatorItem abstractNavigatorItem = (UMLAbstractNavigatorItem)element;
- return abstractNavigatorItem.getParent();
- }
- return null;
- }
-
- /**
- * @generated
- */
- public boolean hasChildren(Object element) {
- return element instanceof IFile || getChildren(element).length > 0;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorItem.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorItem.java
deleted file mode 100644
index 7d7b9f7e04a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorItem.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.navigator;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.IPropertySourceProvider;
-
-/**
- * @generated
- */
-public class UMLDomainNavigatorItem extends PlatformObject {
-
- /**
- * @generated
- */
- static {
- final Class[] supportedTypes = new Class[]{ EObject.class, IPropertySource.class };
- Platform.getAdapterManager().registerAdapters(new IAdapterFactory() {
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if(adaptableObject instanceof org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLDomainNavigatorItem) {
- org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLDomainNavigatorItem domainNavigatorItem = (org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLDomainNavigatorItem)adaptableObject;
- EObject eObject = domainNavigatorItem.getEObject();
- if(adapterType == EObject.class) {
- return eObject;
- }
- if(adapterType == IPropertySource.class) {
- return domainNavigatorItem.getPropertySourceProvider().getPropertySource(eObject);
- }
- }
-
- return null;
- }
-
- public Class[] getAdapterList() {
- return supportedTypes;
- }
- }, org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLDomainNavigatorItem.class);
- }
-
- /**
- * @generated
- */
- private Object myParent;
-
- /**
- * @generated
- */
- private EObject myEObject;
-
- /**
- * @generated
- */
- private IPropertySourceProvider myPropertySourceProvider;
-
- /**
- * @generated
- */
- public UMLDomainNavigatorItem(EObject eObject, Object parent, IPropertySourceProvider propertySourceProvider) {
- myParent = parent;
- myEObject = eObject;
- myPropertySourceProvider = propertySourceProvider;
- }
-
- /**
- * @generated
- */
- public Object getParent() {
- return myParent;
- }
-
- /**
- * @generated
- */
- public EObject getEObject() {
- return myEObject;
- }
-
- /**
- * @generated
- */
- public IPropertySourceProvider getPropertySourceProvider() {
- return myPropertySourceProvider;
- }
-
- /**
- * @generated
- */
- public boolean equals(Object obj) {
- if(obj instanceof org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLDomainNavigatorItem) {
- return EcoreUtil.getURI(getEObject()).equals(EcoreUtil.getURI(((org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLDomainNavigatorItem)obj).getEObject()));
- }
- return super.equals(obj);
- }
-
- /**
- * @generated
- */
- public int hashCode() {
- return EcoreUtil.getURI(getEObject()).hashCode();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorLabelProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorLabelProvider.java
deleted file mode 100644
index 1445e909fbf..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLDomainNavigatorLabelProvider.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.navigator;
-
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-import org.eclipse.ui.navigator.ICommonLabelProvider;
-
-/**
- * @generated
- */
-public class UMLDomainNavigatorLabelProvider implements ICommonLabelProvider {
-
- /**
- * @generated
- */
- private AdapterFactoryLabelProvider myAdapterFactoryLabelProvider = new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
-
- /**
- * @generated
- */
- public void init(ICommonContentExtensionSite aConfig) {
- }
-
- /**
- * @generated
- */
- public Image getImage(Object element) {
- if(element instanceof UMLDomainNavigatorItem) {
- return myAdapterFactoryLabelProvider.getImage(((UMLDomainNavigatorItem)element).getEObject());
- }
- return null;
- }
-
- /**
- * @generated
- */
- public String getText(Object element) {
- if(element instanceof UMLDomainNavigatorItem) {
- return myAdapterFactoryLabelProvider.getText(((UMLDomainNavigatorItem)element).getEObject());
- }
- return null;
- }
-
- /**
- * @generated
- */
- public void addListener(ILabelProviderListener listener) {
- myAdapterFactoryLabelProvider.addListener(listener);
- }
-
- /**
- * @generated
- */
- public void dispose() {
- myAdapterFactoryLabelProvider.dispose();
- }
-
- /**
- * @generated
- */
- public boolean isLabelProperty(Object element, String property) {
- return myAdapterFactoryLabelProvider.isLabelProperty(element, property);
- }
-
- /**
- * @generated
- */
- public void removeListener(ILabelProviderListener listener) {
- myAdapterFactoryLabelProvider.removeListener(listener);
- }
-
- /**
- * @generated
- */
- public void restoreState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void saveState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public String getDescription(Object anElement) {
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorActionProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorActionProvider.java
deleted file mode 100644
index dd7a81b4be8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorActionProvider.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.navigator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.navigator.CommonActionProvider;
-import org.eclipse.ui.navigator.ICommonActionConstants;
-import org.eclipse.ui.navigator.ICommonActionExtensionSite;
-import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
-import org.eclipse.ui.part.FileEditorInput;
-
-/**
- * @generated
- */
-public class UMLNavigatorActionProvider extends CommonActionProvider {
-
- /**
- * @generated
- */
- private boolean myContribute;
-
- /**
- * @generated
- */
- private OpenDiagramAction myOpenDiagramAction;
-
- /**
- * @generated
- */
- public void init(ICommonActionExtensionSite aSite) {
- super.init(aSite);
- if(aSite.getViewSite() instanceof ICommonViewerWorkbenchSite) {
- myContribute = true;
- makeActions((ICommonViewerWorkbenchSite)aSite.getViewSite());
- } else {
- myContribute = false;
- }
- }
-
- /**
- * @generated
- */
- private void makeActions(ICommonViewerWorkbenchSite viewerSite) {
- myOpenDiagramAction = new OpenDiagramAction(viewerSite);
- }
-
- /**
- * @generated
- */
- public void fillActionBars(IActionBars actionBars) {
- if(!myContribute) {
- return;
- }
- IStructuredSelection selection = (IStructuredSelection)getContext().getSelection();
- myOpenDiagramAction.selectionChanged(selection);
- if(myOpenDiagramAction.isEnabled()) {
- actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, myOpenDiagramAction);
- }
- }
-
- /**
- * @generated
- */
- public void fillContextMenu(IMenuManager menu) {
- }
-
- /**
- * @generated
- */
- private static class OpenDiagramAction extends Action {
-
- /**
- * @generated
- */
- private Diagram myDiagram;
-
- /**
- * @generated
- */
- private ICommonViewerWorkbenchSite myViewerSite;
-
- /**
- * @generated
- */
- public OpenDiagramAction(ICommonViewerWorkbenchSite viewerSite) {
- super(Messages.NavigatorActionProvider_OpenDiagramActionName);
- myViewerSite = viewerSite;
- }
-
- /**
- * @generated
- */
- public final void selectionChanged(IStructuredSelection selection) {
- myDiagram = null;
- if(selection.size() == 1) {
- Object selectedElement = selection.getFirstElement();
- if(selectedElement instanceof UMLNavigatorItem) {
- selectedElement = ((UMLNavigatorItem)selectedElement).getView();
- } else if(selectedElement instanceof IAdaptable) {
- selectedElement = ((IAdaptable)selectedElement).getAdapter(View.class);
- }
- if(selectedElement instanceof Diagram) {
- Diagram diagram = (Diagram)selectedElement;
- if(PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(diagram))) {
- myDiagram = diagram;
- }
- }
- }
- setEnabled(myDiagram != null);
- }
-
- /**
- * @generated
- */
- public void run() {
- if(myDiagram == null || myDiagram.eResource() == null) {
- return;
- }
-
- IEditorInput editorInput = getEditorInput(myDiagram);
- IWorkbenchPage page = myViewerSite.getPage();
- try {
- page.openEditor(editorInput, UMLDiagramEditor.ID);
- } catch (PartInitException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Exception while openning diagram", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private static IEditorInput getEditorInput(Diagram diagram) {
- Resource diagramResource = diagram.eResource();
- for(EObject nextEObject : diagramResource.getContents()) {
- if(nextEObject == diagram) {
- return new FileEditorInput(WorkspaceSynchronizer.getFile(diagramResource));
- }
- if(nextEObject instanceof Diagram) {
- break;
- }
- }
- URI uri = EcoreUtil.getURI(diagram);
- String editorName = uri.lastSegment() + '#' + diagram.eResource().getContents().indexOf(diagram);
- IEditorInput editorInput = new URIEditorInput(uri, editorName);
- return editorInput;
- }
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java
deleted file mode 100644
index b4485652e07..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorContentProvider.java
+++ /dev/null
@@ -1,2549 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.navigator;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart;
-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.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-import org.eclipse.ui.navigator.ICommonContentProvider;
-
-/**
- * @generated
- */
-public class UMLNavigatorContentProvider implements ICommonContentProvider {
-
- /**
- * @generated
- */
- private static final Object[] EMPTY_ARRAY = new Object[0];
-
- /**
- * @generated
- */
- private Viewer myViewer;
-
- /**
- * @generated
- */
- private AdapterFactoryEditingDomain myEditingDomain;
-
- /**
- * @generated
- */
- private WorkspaceSynchronizer myWorkspaceSynchronizer;
-
- /**
- * @generated
- */
- private Runnable myViewerRefreshRunnable;
-
- /**
- * @generated
- */
- @SuppressWarnings({ "unchecked", "serial", "rawtypes" })
- public UMLNavigatorContentProvider() {
- TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain();
- myEditingDomain = (AdapterFactoryEditingDomain)editingDomain;
- myEditingDomain.setResourceToReadOnlyMap(new HashMap() {
-
- public Object get(Object key) {
- if(!containsKey(key)) {
- put(key, Boolean.TRUE);
- }
- return super.get(key);
- }
- });
- myViewerRefreshRunnable = new Runnable() {
-
- public void run() {
- if(myViewer != null) {
- myViewer.refresh();
- }
- }
- };
- myWorkspaceSynchronizer = new WorkspaceSynchronizer(editingDomain, new WorkspaceSynchronizer.Delegate() {
-
- public void dispose() {
- }
-
- public boolean handleResourceChanged(final Resource resource) {
- for(Iterator it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource)it.next();
- nextResource.unload();
- }
- if(myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(myViewerRefreshRunnable);
- }
- return true;
- }
-
- public boolean handleResourceDeleted(Resource resource) {
- for(Iterator it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource)it.next();
- nextResource.unload();
- }
- if(myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(myViewerRefreshRunnable);
- }
- return true;
- }
-
- public boolean handleResourceMoved(Resource resource, final URI newURI) {
- for(Iterator it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
- Resource nextResource = (Resource)it.next();
- nextResource.unload();
- }
- if(myViewer != null) {
- myViewer.getControl().getDisplay().asyncExec(myViewerRefreshRunnable);
- }
- return true;
- }
- });
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForPackageEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup links = new UMLNavigatorGroup(Messages.NavigatorGroupName_Package_1000_links, "icons/linksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getDiagramLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- connectedViews = getDiagramLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- connectedViews = getDiagramLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- connectedViews = getDiagramLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- connectedViews = getDiagramLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- connectedViews = getDiagramLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- connectedViews = getDiagramLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- connectedViews = getDiagramLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- connectedViews = getDiagramLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- connectedViews = getDiagramLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(GeneralOrderingEditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- if(!links.isEmpty()) {
- result.add(links);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForInteractionEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Interaction_2001_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Interaction_2001_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionInteractionCompartmentEditPart.VISUAL_ID));
- connectedViews = getChildrenByType(connectedViews, UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionInteractionCompartmentEditPart.VISUAL_ID));
- connectedViews = getChildrenByType(connectedViews, UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionInteractionCompartmentEditPart.VISUAL_ID));
- connectedViews = getChildrenByType(connectedViews, UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionInteractionCompartmentEditPart.VISUAL_ID));
- connectedViews = getChildrenByType(connectedViews, UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionInteractionCompartmentEditPart.VISUAL_ID));
- connectedViews = getChildrenByType(connectedViews, UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionInteractionCompartmentEditPart.VISUAL_ID));
- connectedViews = getChildrenByType(connectedViews, UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForLifelineEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Lifeline_3001_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Lifeline_3001_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForActionExecutionSpecificationEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_ActionExecutionSpecification_3006_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_ActionExecutionSpecification_3006_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForBehaviorExecutionSpecificationEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_BehaviorExecutionSpecification_3003_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_BehaviorExecutionSpecification_3003_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForStateInvariantEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_StateInvariant_3017_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_StateInvariant_3017_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForCombinedFragment2EditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_CombinedFragment_3018_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_CombinedFragment_3018_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForTimeConstraintEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_TimeConstraint_3019_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_TimeConstraint_3019_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForDurationObservationEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_DurationObservation_3024_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_DurationObservation_3024_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForTimeObservationEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_TimeObservation_3020_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_TimeObservation_3020_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForDurationConstraintEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_DurationConstraint_3021_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_DurationConstraint_3021_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForInteractionUseEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_InteractionUse_3002_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_InteractionUse_3002_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForCombinedFragmentEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_CombinedFragment_3004_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_CombinedFragment_3004_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID));
- connectedViews = getChildrenByType(connectedViews, UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForInteractionOperandEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_InteractionOperand_3005_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_InteractionOperand_3005_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getChildrenByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement, false));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForContinuationEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Continuation_3016_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Continuation_3016_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForConstraintEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Constraint_3008_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Constraint_3008_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForDurationConstraintInMessageEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_DurationConstraint_3023_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_DurationConstraint_3023_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForCommentEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Comment_3009_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Comment_3009_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForConsiderIgnoreFragmentEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_ConsiderIgnoreFragment_3007_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_ConsiderIgnoreFragment_3007_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForMessageEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup target = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4003_target, "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4003_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup source = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4003_source, "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4003_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- if(!target.isEmpty()) {
- result.add(target);
- }
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!source.isEmpty()) {
- result.add(source);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForMessage2EditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup target = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4004_target, "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4004_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup source = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4004_source, "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4004_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- if(!target.isEmpty()) {
- result.add(target);
- }
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!source.isEmpty()) {
- result.add(source);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForMessage3EditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup target = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4005_target, "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4005_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup source = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4005_source, "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4005_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- if(!target.isEmpty()) {
- result.add(target);
- }
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!source.isEmpty()) {
- result.add(source);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForMessage4EditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup target = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4006_target, "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4006_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup source = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4006_source, "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4006_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- if(!target.isEmpty()) {
- result.add(target);
- }
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!source.isEmpty()) {
- result.add(source);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForMessage5EditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup target = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4007_target, "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4007_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup source = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4007_source, "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4007_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- if(!target.isEmpty()) {
- result.add(target);
- }
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!source.isEmpty()) {
- result.add(source);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForMessage6EditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup target = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4008_target, "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4008_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup source = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4008_source, "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4008_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- if(!target.isEmpty()) {
- result.add(target);
- }
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!source.isEmpty()) {
- result.add(source);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template this method is a modification of gmf code in order to avoid
- * getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForMessage7EditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup target = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4009_target, "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4009_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup source = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4009_source, "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_Message_4009_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- if(!target.isEmpty()) {
- result.add(target);
- }
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!source.isEmpty()) {
- result.add(source);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForCommentAnnotatedElementEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup target = new UMLNavigatorGroup(Messages.NavigatorGroupName_CommentAnnotatedElement_4010_target, "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup source = new UMLNavigatorGroup(Messages.NavigatorGroupName_CommentAnnotatedElement_4010_source, "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- if(!target.isEmpty()) {
- result.add(target);
- }
- if(!source.isEmpty()) {
- result.add(source);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForDestructionOccurrenceSpecificationEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup incominglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_DestructionOccurrenceSpecification_3022_incominglinks, "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup(Messages.NavigatorGroupName_DestructionOccurrenceSpecification_3022_outgoinglinks, "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
- if(!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if(!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- /**
- *
- * Papyrus Template
- * this method is a modification of gmf code in order to avoid getViewChidreen() method becoming greater than 64kb.
- *
- * @generated
- **/
- private Object[] getViewChildrenForConstraintConstrainedElementEditPart(View view, Object parentElement) {
- Collection result = new ArrayList();
- UMLNavigatorGroup target = new UMLNavigatorGroup(Messages.NavigatorGroupName_ConstraintConstrainedElement_4011_target, "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- UMLNavigatorGroup source = new UMLNavigatorGroup(Messages.NavigatorGroupName_ConstraintConstrainedElement_4011_source, "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksTargetByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- target.addChildren(createNavigatorItems(connectedViews, target, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- connectedViews = getLinksSourceByType(Collections.singleton(view), UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- source.addChildren(createNavigatorItems(connectedViews, source, true));
- if(!target.isEmpty()) {
- result.add(target);
- }
- if(!source.isEmpty()) {
- result.add(source);
- }
- return result.toArray();
- }
-
- /**
- * @generated
- */
- public void dispose() {
- myWorkspaceSynchronizer.dispose();
- myWorkspaceSynchronizer = null;
- myViewerRefreshRunnable = null;
- for(Iterator it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
- Resource resource = (Resource)it.next();
- resource.unload();
- }
- ((TransactionalEditingDomain)myEditingDomain).dispose();
- myEditingDomain = null;
- }
-
- /**
- * @generated
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- myViewer = viewer;
- }
-
- /**
- * @generated
- */
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- /**
- * @generated
- */
- public void restoreState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void saveState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void init(ICommonContentExtensionSite aConfig) {
- }
-
- /**
- * @generated
- */
- public Object[] getChildren(Object parentElement) {
- if(parentElement instanceof IFile) {
- IFile file = (IFile)parentElement;
- URI fileURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
- Resource resource = myEditingDomain.getResourceSet().getResource(fileURI, true);
- Collection result = new ArrayList();
- return result.toArray();
- }
-
- if(parentElement instanceof UMLNavigatorGroup) {
- UMLNavigatorGroup group = (UMLNavigatorGroup)parentElement;
- return group.getChildren();
- }
-
- if(parentElement instanceof UMLNavigatorItem) {
- UMLNavigatorItem navigatorItem = (UMLNavigatorItem)parentElement;
- if(navigatorItem.isLeaf() || !isOwnView(navigatorItem.getView())) {
- return EMPTY_ARRAY;
- }
- return getViewChildren(navigatorItem.getView(), parentElement);
- }
-
- return EMPTY_ARRAY;
- }
-
- /**
- * @generated
- */
- private Object[] getViewChildren(View view, Object parentElement) {
- switch(UMLVisualIDRegistry.getVisualID(view)) {
-
- case Message5EditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForMessage5EditPart(view, parentElement);
-
- }
-
- case MessageEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForMessageEditPart(view, parentElement);
-
- }
-
- case ConstraintEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForConstraintEditPart(view, parentElement);
-
- }
-
- case TimeObservationEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForTimeObservationEditPart(view, parentElement);
-
- }
-
- case CombinedFragment2EditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForCombinedFragment2EditPart(view, parentElement);
-
- }
-
- case StateInvariantEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForStateInvariantEditPart(view, parentElement);
-
- }
-
- case InteractionUseEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForInteractionUseEditPart(view, parentElement);
-
- }
-
- case CommentEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForCommentEditPart(view, parentElement);
-
- }
-
- case Message3EditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForMessage3EditPart(view, parentElement);
-
- }
-
- case DurationConstraintEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForDurationConstraintEditPart(view, parentElement);
-
- }
-
- case TimeConstraintEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForTimeConstraintEditPart(view, parentElement);
-
- }
-
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForConsiderIgnoreFragmentEditPart(view, parentElement);
-
- }
-
- case ContinuationEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForContinuationEditPart(view, parentElement);
-
- }
-
- case LifelineEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForLifelineEditPart(view, parentElement);
-
- }
-
- case Message4EditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForMessage4EditPart(view, parentElement);
-
- }
-
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForBehaviorExecutionSpecificationEditPart(view, parentElement);
-
- }
-
- case InteractionOperandEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForInteractionOperandEditPart(view, parentElement);
-
- }
-
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForConstraintConstrainedElementEditPart(view, parentElement);
-
- }
-
- case Message6EditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForMessage6EditPart(view, parentElement);
-
- }
-
- case Message7EditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForMessage7EditPart(view, parentElement);
-
- }
-
- case DurationObservationEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForDurationObservationEditPart(view, parentElement);
-
- }
-
- case PackageEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForPackageEditPart(view, parentElement);
-
- }
-
- case Message2EditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForMessage2EditPart(view, parentElement);
-
- }
-
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForCommentAnnotatedElementEditPart(view, parentElement);
-
- }
-
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForDestructionOccurrenceSpecificationEditPart(view, parentElement);
-
- }
-
- case InteractionEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForInteractionEditPart(view, parentElement);
-
- }
-
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForActionExecutionSpecificationEditPart(view, parentElement);
-
- }
-
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForDurationConstraintInMessageEditPart(view, parentElement);
-
- }
-
- case CombinedFragmentEditPart.VISUAL_ID:
- {
-
- //modification of the template to avoid mistake of 65kb.
- return getViewChildrenForCombinedFragmentEditPart(view, parentElement);
-
- }
-
- }
- return EMPTY_ARRAY;
- }
-
- /**
- * @generated
- */
- private Collection getLinksSourceByType(Collection edges, String type) {
- Collection result = new ArrayList();
- for(Iterator it = edges.iterator(); it.hasNext();) {
- Edge nextEdge = (Edge)it.next();
- View nextEdgeSource = nextEdge.getSource();
- if(type.equals(nextEdgeSource.getType()) && isOwnView(nextEdgeSource)) {
- result.add(nextEdgeSource);
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection getLinksTargetByType(Collection edges, String type) {
- Collection result = new ArrayList();
- for(Iterator it = edges.iterator(); it.hasNext();) {
- Edge nextEdge = (Edge)it.next();
- View nextEdgeTarget = nextEdge.getTarget();
- if(type.equals(nextEdgeTarget.getType()) && isOwnView(nextEdgeTarget)) {
- result.add(nextEdgeTarget);
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection getOutgoingLinksByType(Collection nodes, String type) {
- Collection result = new ArrayList();
- for(Iterator it = nodes.iterator(); it.hasNext();) {
- View nextNode = (View)it.next();
- result.addAll(selectViewsByType(nextNode.getSourceEdges(), type));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection getIncomingLinksByType(Collection nodes, String type) {
- Collection result = new ArrayList();
- for(Iterator it = nodes.iterator(); it.hasNext();) {
- View nextNode = (View)it.next();
- result.addAll(selectViewsByType(nextNode.getTargetEdges(), type));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection getChildrenByType(Collection nodes, String type) {
- Collection result = new ArrayList();
- for(Iterator it = nodes.iterator(); it.hasNext();) {
- View nextNode = (View)it.next();
- result.addAll(selectViewsByType(nextNode.getChildren(), type));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection getDiagramLinksByType(Collection diagrams, String type) {
- Collection result = new ArrayList();
- for(Iterator it = diagrams.iterator(); it.hasNext();) {
- Diagram nextDiagram = (Diagram)it.next();
- result.addAll(selectViewsByType(nextDiagram.getEdges(), type));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection selectViewsByType(Collection views, String type) {
- Collection result = new ArrayList();
- for(Iterator it = views.iterator(); it.hasNext();) {
- View nextView = (View)it.next();
- if(type.equals(nextView.getType()) && isOwnView(nextView)) {
- result.add(nextView);
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- private boolean isOwnView(View view) {
- return PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
- }
-
- /**
- * @generated
- */
- private Collection createNavigatorItems(Collection views, Object parent, boolean isLeafs) {
- Collection result = new ArrayList();
- for(Iterator it = views.iterator(); it.hasNext();) {
- result.add(new UMLNavigatorItem((View)it.next(), parent, isLeafs));
- }
- return result;
- }
-
- /**
- * @generated
- */
- public Object getParent(Object element) {
- if(element instanceof UMLAbstractNavigatorItem) {
- UMLAbstractNavigatorItem abstractNavigatorItem = (UMLAbstractNavigatorItem)element;
- return abstractNavigatorItem.getParent();
- }
- return null;
- }
-
- /**
- * @generated
- */
- public boolean hasChildren(Object element) {
- return element instanceof IFile || getChildren(element).length > 0;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorGroup.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorGroup.java
deleted file mode 100644
index 2b6f3e97e38..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorGroup.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.navigator;
-
-import java.util.Collection;
-import java.util.LinkedList;
-
-/**
- * @generated
- */
-public class UMLNavigatorGroup extends UMLAbstractNavigatorItem {
-
- /**
- * @generated
- */
- private String myGroupName;
-
- /**
- * @generated
- */
- private String myIcon;
-
- /**
- * @generated
- */
- private Collection myChildren = new LinkedList();
-
- /**
- * @generated
- */
- UMLNavigatorGroup(String groupName, String icon, Object parent) {
- super(parent);
- myGroupName = groupName;
- myIcon = icon;
- }
-
- /**
- * @generated
- */
- public String getGroupName() {
- return myGroupName;
- }
-
- /**
- * @generated
- */
- public String getIcon() {
- return myIcon;
- }
-
- /**
- * @generated
- */
- public Object[] getChildren() {
- return myChildren.toArray();
- }
-
- /**
- * @generated
- */
- public void addChildren(Collection children) {
- myChildren.addAll(children);
- }
-
- /**
- * @generated
- */
- public void addChild(Object child) {
- myChildren.add(child);
- }
-
- /**
- * @generated
- */
- public boolean isEmpty() {
- return myChildren.size() == 0;
- }
-
- /**
- * @generated
- */
- public boolean equals(Object obj) {
- if(obj instanceof org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorGroup) {
- org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorGroup anotherGroup = (org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorGroup)obj;
- if(getGroupName().equals(anotherGroup.getGroupName())) {
- return getParent().equals(anotherGroup.getParent());
- }
- }
- return super.equals(obj);
- }
-
- /**
- * @generated
- */
- public int hashCode() {
- return getGroupName().hashCode();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorItem.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorItem.java
deleted file mode 100644
index 7b90ca14143..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorItem.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.navigator;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class UMLNavigatorItem extends UMLAbstractNavigatorItem {
-
- /**
- * @generated
- */
- static {
- final Class[] supportedTypes = new Class[]{ View.class, EObject.class };
- Platform.getAdapterManager().registerAdapters(new IAdapterFactory() {
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if(adaptableObject instanceof org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorItem && (adapterType == View.class || adapterType == EObject.class)) {
- return ((org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorItem)adaptableObject).getView();
- }
- return null;
- }
-
- public Class[] getAdapterList() {
- return supportedTypes;
- }
- }, org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorItem.class);
- }
-
- /**
- * @generated
- */
- private View myView;
-
- /**
- * @generated
- */
- private boolean myLeaf = false;
-
- /**
- * @generated
- */
- public UMLNavigatorItem(View view, Object parent, boolean isLeaf) {
- super(parent);
- myView = view;
- myLeaf = isLeaf;
- }
-
- /**
- * @generated
- */
- public View getView() {
- return myView;
- }
-
- /**
- * @generated
- */
- public boolean isLeaf() {
- return myLeaf;
- }
-
- /**
- * @generated
- */
- public boolean equals(Object obj) {
- if(obj instanceof org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorItem) {
- return EcoreUtil.getURI(getView()).equals(EcoreUtil.getURI(((org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorItem)obj).getView()));
- }
- return super.equals(obj);
- }
-
- /**
- * @generated
- */
- public int hashCode() {
- return EcoreUtil.getURI(getView()).hashCode();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java
deleted file mode 100644
index b2ea2007eb1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java
+++ /dev/null
@@ -1,741 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.navigator;
-
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.viewers.ITreePathLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.ViewerLabel;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart;
-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.ConstraintNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationNameEditPart;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLParserProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-import org.eclipse.ui.navigator.ICommonLabelProvider;
-import org.eclipse.uml2.uml.ActionExecutionSpecification;
-import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.ConsiderIgnoreFragment;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonLabelProvider, ITreePathLabelProvider {
-
- /**
- * @generated
- */
- static {
- UMLDiagramEditorPlugin.getInstance().getImageRegistry().put("Navigator?UnknownElement", ImageDescriptor.getMissingImageDescriptor()); //$NON-NLS-1$
- UMLDiagramEditorPlugin.getInstance().getImageRegistry().put("Navigator?ImageNotFound", ImageDescriptor.getMissingImageDescriptor()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- public void updateLabel(ViewerLabel label, TreePath elementPath) {
- Object element = elementPath.getLastSegment();
- if(element instanceof UMLNavigatorItem && !isOwnView(((UMLNavigatorItem)element).getView())) {
- return;
- }
- label.setText(getText(element));
- label.setImage(getImage(element));
- }
-
- /**
- * @generated
- */
- public Image getImage(Object element) {
- if(element instanceof UMLNavigatorGroup) {
- UMLNavigatorGroup group = (UMLNavigatorGroup)element;
- return UMLDiagramEditorPlugin.getInstance().getBundledImage(group.getIcon());
- }
-
- if(element instanceof UMLNavigatorItem) {
- UMLNavigatorItem navigatorItem = (UMLNavigatorItem)element;
- if(!isOwnView(navigatorItem.getView())) {
- return super.getImage(element);
- }
- return getImage(navigatorItem.getView());
- }
-
- return super.getImage(element);
- }
-
- /**
- * @generated
- */
- public Image getImage(View view) {
- switch(UMLVisualIDRegistry.getVisualID(view)) {
- case Message5EditPart.VISUAL_ID:
- return getImage("Navigator?Link?http://www.eclipse.org/uml2/4.0.0/UML?Message", UMLElementTypes.Message_4007); //$NON-NLS-1$
- case MessageEditPart.VISUAL_ID:
- return getImage("Navigator?Link?http://www.eclipse.org/uml2/4.0.0/UML?Message", UMLElementTypes.Message_4003); //$NON-NLS-1$
- case ConstraintEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?Constraint", UMLElementTypes.Constraint_3008); //$NON-NLS-1$
- case TimeObservationEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?TimeObservation", UMLElementTypes.TimeObservation_3020); //$NON-NLS-1$
- case CombinedFragment2EditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?CombinedFragment", UMLElementTypes.CombinedFragment_3018); //$NON-NLS-1$
- case GeneralOrderingEditPart.VISUAL_ID:
- return getImage("Navigator?Link?http://www.eclipse.org/uml2/4.0.0/UML?GeneralOrdering", UMLElementTypes.GeneralOrdering_4012); //$NON-NLS-1$
- case StateInvariantEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?StateInvariant", UMLElementTypes.StateInvariant_3017); //$NON-NLS-1$
- case InteractionUseEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?InteractionUse", UMLElementTypes.InteractionUse_3002); //$NON-NLS-1$
- case CommentEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?Comment", UMLElementTypes.Comment_3009); //$NON-NLS-1$
- case Message3EditPart.VISUAL_ID:
- return getImage("Navigator?Link?http://www.eclipse.org/uml2/4.0.0/UML?Message", UMLElementTypes.Message_4005); //$NON-NLS-1$
- case DurationConstraintEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?DurationConstraint", UMLElementTypes.DurationConstraint_3021); //$NON-NLS-1$
- case TimeConstraintEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?TimeConstraint", UMLElementTypes.TimeConstraint_3019); //$NON-NLS-1$
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?ConsiderIgnoreFragment", UMLElementTypes.ConsiderIgnoreFragment_3007); //$NON-NLS-1$
- case ContinuationEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?Continuation", UMLElementTypes.Continuation_3016); //$NON-NLS-1$
- case LifelineEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?Lifeline", UMLElementTypes.Lifeline_3001); //$NON-NLS-1$
- case Message4EditPart.VISUAL_ID:
- return getImage("Navigator?Link?http://www.eclipse.org/uml2/4.0.0/UML?Message", UMLElementTypes.Message_4006); //$NON-NLS-1$
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?BehaviorExecutionSpecification", UMLElementTypes.BehaviorExecutionSpecification_3003); //$NON-NLS-1$
- case InteractionOperandEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?InteractionOperand", UMLElementTypes.InteractionOperand_3005); //$NON-NLS-1$
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getImage("Navigator?Link?http://www.eclipse.org/uml2/4.0.0/UML?Constraint?constrainedElement", UMLElementTypes.ConstraintConstrainedElement_4011); //$NON-NLS-1$
- case Message6EditPart.VISUAL_ID:
- return getImage("Navigator?Link?http://www.eclipse.org/uml2/4.0.0/UML?Message", UMLElementTypes.Message_4008); //$NON-NLS-1$
- case Message7EditPart.VISUAL_ID:
- return getImage("Navigator?Link?http://www.eclipse.org/uml2/4.0.0/UML?Message", UMLElementTypes.Message_4009); //$NON-NLS-1$
- case DurationObservationEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?DurationObservation", UMLElementTypes.DurationObservation_3024); //$NON-NLS-1$
- case PackageEditPart.VISUAL_ID:
- return getImage("Navigator?Diagram?http://www.eclipse.org/uml2/4.0.0/UML?Package", UMLElementTypes.Package_1000); //$NON-NLS-1$
- case Message2EditPart.VISUAL_ID:
- return getImage("Navigator?Link?http://www.eclipse.org/uml2/4.0.0/UML?Message", UMLElementTypes.Message_4004); //$NON-NLS-1$
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getImage("Navigator?Link?http://www.eclipse.org/uml2/4.0.0/UML?Comment?annotatedElement", UMLElementTypes.CommentAnnotatedElement_4010); //$NON-NLS-1$
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?DestructionOccurrenceSpecification", UMLElementTypes.DestructionOccurrenceSpecification_3022); //$NON-NLS-1$
- case InteractionEditPart.VISUAL_ID:
- return getImage("Navigator?TopLevelNode?http://www.eclipse.org/uml2/4.0.0/UML?Interaction", UMLElementTypes.Interaction_2001); //$NON-NLS-1$
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?ActionExecutionSpecification", UMLElementTypes.ActionExecutionSpecification_3006); //$NON-NLS-1$
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?DurationConstraint", UMLElementTypes.DurationConstraint_3023); //$NON-NLS-1$
- case CombinedFragmentEditPart.VISUAL_ID:
- return getImage("Navigator?Node?http://www.eclipse.org/uml2/4.0.0/UML?CombinedFragment", UMLElementTypes.CombinedFragment_3004); //$NON-NLS-1$
- }
- return getImage("Navigator?UnknownElement", null); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- private Image getImage(String key, IElementType elementType) {
- ImageRegistry imageRegistry = UMLDiagramEditorPlugin.getInstance().getImageRegistry();
- Image image = imageRegistry.get(key);
- if(image == null && elementType != null && UMLElementTypes.isKnownElementType(elementType)) {
- image = UMLElementTypes.getImage(elementType);
- imageRegistry.put(key, image);
- }
-
- if(image == null) {
- image = imageRegistry.get("Navigator?ImageNotFound"); //$NON-NLS-1$
- imageRegistry.put(key, image);
- }
- return image;
- }
-
- /**
- * @generated
- */
- public String getText(Object element) {
- if(element instanceof UMLNavigatorGroup) {
- UMLNavigatorGroup group = (UMLNavigatorGroup)element;
- return group.getGroupName();
- }
-
- if(element instanceof UMLNavigatorItem) {
- UMLNavigatorItem navigatorItem = (UMLNavigatorItem)element;
- if(!isOwnView(navigatorItem.getView())) {
- return null;
- }
- return getText(navigatorItem.getView());
- }
-
- return super.getText(element);
- }
-
- /**
- * @generated
- */
- public String getText(View view) {
- if(view.getElement() != null && view.getElement().eIsProxy()) {
- return getUnresolvedDomainElementProxyText(view);
- }
- switch(UMLVisualIDRegistry.getVisualID(view)) {
- case Message5EditPart.VISUAL_ID:
- return getMessage_4007Text(view);
- case MessageEditPart.VISUAL_ID:
- return getMessage_4003Text(view);
- case ConstraintEditPart.VISUAL_ID:
- return getConstraint_3008Text(view);
- case TimeObservationEditPart.VISUAL_ID:
- return getTimeObservation_3020Text(view);
- case CombinedFragment2EditPart.VISUAL_ID:
- return getCombinedFragment_3018Text(view);
- case GeneralOrderingEditPart.VISUAL_ID:
- return getGeneralOrdering_4012Text(view);
- case StateInvariantEditPart.VISUAL_ID:
- return getStateInvariant_3017Text(view);
- case InteractionUseEditPart.VISUAL_ID:
- return getInteractionUse_3002Text(view);
- case CommentEditPart.VISUAL_ID:
- return getComment_3009Text(view);
- case Message3EditPart.VISUAL_ID:
- return getMessage_4005Text(view);
- case DurationConstraintEditPart.VISUAL_ID:
- return getDurationConstraint_3021Text(view);
- case TimeConstraintEditPart.VISUAL_ID:
- return getTimeConstraint_3019Text(view);
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- return getConsiderIgnoreFragment_3007Text(view);
- case ContinuationEditPart.VISUAL_ID:
- return getContinuation_3016Text(view);
- case LifelineEditPart.VISUAL_ID:
- return getLifeline_3001Text(view);
- case Message4EditPart.VISUAL_ID:
- return getMessage_4006Text(view);
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- return getBehaviorExecutionSpecification_3003Text(view);
- case InteractionOperandEditPart.VISUAL_ID:
- return getInteractionOperand_3005Text(view);
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getConstraintConstrainedElement_4011Text(view);
- case Message6EditPart.VISUAL_ID:
- return getMessage_4008Text(view);
- case Message7EditPart.VISUAL_ID:
- return getMessage_4009Text(view);
- case DurationObservationEditPart.VISUAL_ID:
- return getDurationObservation_3024Text(view);
- case PackageEditPart.VISUAL_ID:
- return getPackage_1000Text(view);
- case Message2EditPart.VISUAL_ID:
- return getMessage_4004Text(view);
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getCommentAnnotatedElement_4010Text(view);
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return getDestructionOccurrenceSpecification_3022Text(view);
- case InteractionEditPart.VISUAL_ID:
- return getInteraction_2001Text(view);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- return getActionExecutionSpecification_3006Text(view);
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return getDurationConstraint_3023Text(view);
- case CombinedFragmentEditPart.VISUAL_ID:
- return getCombinedFragment_3004Text(view);
- }
- return getUnknownElementText(view);
- }
-
- /**
- * @generated
- */
- private String getPackage_1000Text(View view) {
- Package domainModelElement = (Package)view.getElement();
- if(domainModelElement != null) {
- return String.valueOf(domainModelElement.getName());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 1000); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getInteraction_2001Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Interaction_2001, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(InteractionNameEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5001); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getLifeline_3001Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Lifeline_3001, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(LifelineNameEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5002); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getBehaviorExecutionSpecification_3003Text(View view) {
- BehaviorExecutionSpecification domainModelElement = (BehaviorExecutionSpecification)view.getElement();
- if(domainModelElement != null) {
- return String.valueOf(domainModelElement.getName());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 3003); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getStateInvariant_3017Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.StateInvariant_3017, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(StateInvariantNameEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5008); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getCombinedFragment_3018Text(View view) {
- CombinedFragment domainModelElement = (CombinedFragment)view.getElement();
- if(domainModelElement != null) {
- return String.valueOf(domainModelElement.getName());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 3018); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getTimeConstraint_3019Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.TimeConstraint_3019, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(TimeConstraintLabelEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5009); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getTimeObservation_3020Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.TimeObservation_3020, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(TimeObservationLabelEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5010); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getDurationConstraint_3021Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.DurationConstraint_3021, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(DurationConstraintLabelEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5011); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getActionExecutionSpecification_3006Text(View view) {
- ActionExecutionSpecification domainModelElement = (ActionExecutionSpecification)view.getElement();
- if(domainModelElement != null) {
- return String.valueOf(domainModelElement.getName());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 3006); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getInteractionUse_3002Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.InteractionUse_3002, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(InteractionUseNameEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5003); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getCombinedFragment_3004Text(View view) {
- CombinedFragment domainModelElement = (CombinedFragment)view.getElement();
- if(domainModelElement != null) {
- return String.valueOf(domainModelElement.getName());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 3004); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getInteractionOperand_3005Text(View view) {
- InteractionOperand domainModelElement = (InteractionOperand)view.getElement();
- if(domainModelElement != null) {
- return String.valueOf(domainModelElement.getName());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 3005); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getContinuation_3016Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Continuation_3016, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(ContinuationNameEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5007); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getConstraint_3008Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_3008, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5005); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getComment_3009Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Comment_3009, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5006); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getDurationConstraint_3023Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.DurationConstraint_3023, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(DurationConstraintInMessageLabelEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5018); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getDurationObservation_3024Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.DurationObservation_3024, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(DurationObservationLabelEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5016); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getConsiderIgnoreFragment_3007Text(View view) {
- ConsiderIgnoreFragment domainModelElement = (ConsiderIgnoreFragment)view.getElement();
- if(domainModelElement != null) {
- return String.valueOf(domainModelElement.getName());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 3007); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getMessage_4003Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Message_4003, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 6001); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getMessage_4004Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Message_4004, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(MessageName2EditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 6002); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getMessage_4005Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Message_4005, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(MessageName3EditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 6003); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getMessage_4006Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Message_4006, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(MessageName4EditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 6004); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getMessage_4007Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Message_4007, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(MessageName5EditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 6005); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getMessage_4008Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Message_4008, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(MessageName6EditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 6006); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getMessage_4009Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.Message_4009, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(MessageName7EditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 6007); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getCommentAnnotatedElement_4010Text(View view) {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- private String getDestructionOccurrenceSpecification_3022Text(View view) {
- DestructionOccurrenceSpecification domainModelElement = (DestructionOccurrenceSpecification)view.getElement();
- if(domainModelElement != null) {
- return String.valueOf(domainModelElement.getName());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 3022); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getGeneralOrdering_4012Text(View view) {
- IParser parser = UMLParserProvider.getParser(UMLElementTypes.GeneralOrdering_4012, view.getElement() != null ? view.getElement() : view, UMLVisualIDRegistry.getType(GeneralOrderingAppliedStereotypeEditPart.VISUAL_ID));
- if(parser != null) {
- return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 6015); //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String getConstraintConstrainedElement_4011Text(View view) {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- private String getUnknownElementText(View view) {
- return "<UnknownElement Visual_ID = " + view.getType() + ">"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * @generated
- */
- private String getUnresolvedDomainElementProxyText(View view) {
- return "<Unresolved domain element Visual_ID = " + view.getType() + ">"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * @generated
- */
- public void init(ICommonContentExtensionSite aConfig) {
- }
-
- /**
- * @generated
- */
- public void restoreState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public void saveState(IMemento aMemento) {
- }
-
- /**
- * @generated
- */
- public String getDescription(Object anElement) {
- return null;
- }
-
- /**
- * @generated
- */
- private boolean isOwnView(View view) {
- return PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLinkHelper.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLinkHelper.java
deleted file mode 100644
index 97404db78a5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLinkHelper.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.navigator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.navigator.ILinkHelper;
-import org.eclipse.ui.part.FileEditorInput;
-
-/**
- * @generated
- */
-public class UMLNavigatorLinkHelper implements ILinkHelper {
-
- /**
- * @generated
- */
- private static IEditorInput getEditorInput(Diagram diagram) {
- Resource diagramResource = diagram.eResource();
- for(EObject nextEObject : diagramResource.getContents()) {
- if(nextEObject == diagram) {
- return new FileEditorInput(WorkspaceSynchronizer.getFile(diagramResource));
- }
- if(nextEObject instanceof Diagram) {
- break;
- }
- }
- URI uri = EcoreUtil.getURI(diagram);
- String editorName = uri.lastSegment() + '#' + diagram.eResource().getContents().indexOf(diagram);
- IEditorInput editorInput = new URIEditorInput(uri, editorName);
- return editorInput;
- }
-
- /**
- * @generated
- */
- public IStructuredSelection findSelection(IEditorInput anInput) {
- IDiagramDocument document = UMLDiagramEditorPlugin.getInstance().getDocumentProvider().getDiagramDocument(anInput);
- if(document == null) {
- return StructuredSelection.EMPTY;
- }
- Diagram diagram = document.getDiagram();
- if(diagram == null || diagram.eResource() == null) {
- return StructuredSelection.EMPTY;
- }
- IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
- if(file != null) {
- UMLNavigatorItem item = new UMLNavigatorItem(diagram, file, false);
- return new StructuredSelection(item);
- }
- return StructuredSelection.EMPTY;
- }
-
- /**
- * @generated
- */
- public void activateEditor(IWorkbenchPage aPage, IStructuredSelection aSelection) {
- if(aSelection == null || aSelection.isEmpty()) {
- return;
- }
- if(false == aSelection.getFirstElement() instanceof UMLAbstractNavigatorItem) {
- return;
- }
-
- UMLAbstractNavigatorItem abstractNavigatorItem = (UMLAbstractNavigatorItem)aSelection.getFirstElement();
- View navigatorView = null;
- if(abstractNavigatorItem instanceof UMLNavigatorItem) {
- navigatorView = ((UMLNavigatorItem)abstractNavigatorItem).getView();
- } else if(abstractNavigatorItem instanceof UMLNavigatorGroup) {
- UMLNavigatorGroup navigatorGroup = (UMLNavigatorGroup)abstractNavigatorItem;
- if(navigatorGroup.getParent() instanceof UMLNavigatorItem) {
- navigatorView = ((UMLNavigatorItem)navigatorGroup.getParent()).getView();
- }
- }
- if(navigatorView == null) {
- return;
- }
- IEditorInput editorInput = getEditorInput(navigatorView.getDiagram());
- IEditorPart editor = aPage.findEditor(editorInput);
- if(editor == null) {
- return;
- }
- aPage.bringToTop(editor);
- if(editor instanceof DiagramEditor) {
- DiagramEditor diagramEditor = (DiagramEditor)editor;
- ResourceSet diagramEditorResourceSet = diagramEditor.getEditingDomain().getResourceSet();
- EObject selectedView = diagramEditorResourceSet.getEObject(EcoreUtil.getURI(navigatorView), true);
- if(selectedView == null) {
- return;
- }
- GraphicalViewer graphicalViewer = (GraphicalViewer)diagramEditor.getAdapter(GraphicalViewer.class);
- EditPart selectedEditPart = (EditPart)graphicalViewer.getEditPartRegistry().get(selectedView);
- if(selectedEditPart != null) {
- graphicalViewer.select(selectedEditPart);
- }
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorSorter.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorSorter.java
deleted file mode 100644
index b4508b040e8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorSorter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.navigator;
-
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-
-/**
- * @generated
- */
-public class UMLNavigatorSorter extends ViewerSorter {
-
- /**
- * @generated
- */
- private static final int GROUP_CATEGORY = 7006;
-
- /**
- * @generated
- */
- public int category(Object element) {
- if(element instanceof UMLNavigatorItem) {
- UMLNavigatorItem item = (UMLNavigatorItem)element;
- return UMLVisualIDRegistry.getVisualID(item.getView());
- }
- return GROUP_CATEGORY;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/parsers/AbstractParser.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/parsers/AbstractParser.java
deleted file mode 100644
index 92be26757b4..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/parsers/AbstractParser.java
+++ /dev/null
@@ -1,431 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.parsers;
-
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public abstract class AbstractParser implements IParser {
-
- /**
- * @generated
- */
- protected final EAttribute[] features;
-
- /**
- * @generated
- */
- protected final EAttribute[] editableFeatures;
-
- /**
- * @generated
- */
- private String viewPattern;
-
- /**
- * @generated
- */
- private String editorPattern;
-
- /**
- * @generated
- */
- private String editPattern;
-
- /**
- * @generated
- */
- public AbstractParser(EAttribute[] features) {
- if(features == null || Arrays.asList(features).contains(null)) {
- throw new IllegalArgumentException();
- }
- this.editableFeatures = this.features = features;
- }
-
- /**
- * @generated
- */
- public AbstractParser(EAttribute[] features, EAttribute[] editableFeatures) {
- if(features == null || Arrays.asList(features).contains(null)) {
- throw new IllegalArgumentException();
- }
- this.features = features;
- if(editableFeatures == null || Arrays.asList(editableFeatures).contains(null)) {
- throw new IllegalArgumentException();
- }
- this.editableFeatures = editableFeatures;
- }
-
- /**
- * @generated
- */
- public String getViewPattern() {
- return viewPattern;
- }
-
- /**
- * @generated
- */
- public void setViewPattern(String viewPattern) {
- this.viewPattern = viewPattern;
- }
-
- /**
- * @generated
- */
- public String getEditorPattern() {
- return editorPattern;
- }
-
- /**
- * @generated
- */
- public void setEditorPattern(String editorPattern) {
- this.editorPattern = editorPattern;
- }
-
- /**
- * @generated
- */
- public String getEditPattern() {
- return editPattern;
- }
-
- /**
- * @generated
- */
- public void setEditPattern(String editPattern) {
- this.editPattern = editPattern;
- }
-
- /**
- * @generated
- */
- public boolean isAffectingEvent(Object event, int flags) {
- if(event instanceof Notification) {
- return isAffectingFeature(((Notification)event).getFeature());
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean isAffectingFeature(Object feature) {
- for(int i = 0; i < features.length; i++) {
- if(features[i] == feature) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Object[] getValues(EObject element) {
- Object[] values = new Object[features.length];
- for(int i = 0; i < features.length; i++) {
- values[i] = getValue(element, features[i]);
- }
- return values;
- }
-
- /**
- * @generated
- */
- protected Object[] getEditableValues(EObject element) {
- Object[] values = new Object[editableFeatures.length];
- for(int i = 0; i < editableFeatures.length; i++) {
- values[i] = getValue(element, editableFeatures[i]);
- }
- return values;
- }
-
- /**
- * @generated
- */
- protected Object getValue(EObject element, EAttribute feature) {
- Object value = element.eGet(feature);
- Class iClass = feature.getEAttributeType().getInstanceClass();
- if(String.class.equals(iClass)) {
- if(value == null) {
- value = ""; //$NON-NLS-1$
- }
- }
- return value;
- }
-
- /**
- * @generated
- */
- protected ICommand getParseCommand(IAdaptable adapter, Object[] values, int flags) {
- if(values == null || validateNewValues(values).getCode() != IParserEditStatus.EDITABLE) {
- return UnexecutableCommand.INSTANCE;
- }
- EObject element = (EObject)adapter.getAdapter(EObject.class);
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(element);
- if(editingDomain == null) {
- return UnexecutableCommand.INSTANCE;
- }
- CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
- for(int i = 0; i < values.length; i++) {
- command.compose(getModificationCommand(element, editableFeatures[i], values[i]));
- }
- return command;
- }
-
- /**
- * @generated
- */
- protected ICommand getModificationCommand(EObject element, EAttribute feature, Object value) {
- value = getValidNewValue(feature, value);
- if(value instanceof InvalidValue) {
- return UnexecutableCommand.INSTANCE;
- }
- SetRequest request = new SetRequest(element, feature, value);
- return new SetValueCommand(request);
- }
-
- /**
- * @generated
- */
- protected IParserEditStatus validateNewValues(Object[] values) {
- if(values.length != editableFeatures.length) {
- return ParserEditStatus.UNEDITABLE_STATUS;
- }
- for(int i = 0; i < values.length; i++) {
- Object value = getValidNewValue(editableFeatures[i], values[i]);
- if(value instanceof InvalidValue) {
- return new ParserEditStatus(UMLDiagramEditorPlugin.ID, IParserEditStatus.UNEDITABLE, value.toString());
- }
- }
- return ParserEditStatus.EDITABLE_STATUS;
- }
-
- /**
- * @generated
- */
- protected Object getValidNewValue(EAttribute feature, Object value) {
- EClassifier type = feature.getEType();
- if(type instanceof EDataType) {
- Class iClass = type.getInstanceClass();
- if(Boolean.TYPE.equals(iClass)) {
- if(value instanceof Boolean) {
- // ok
- } else if(value instanceof String) {
- value = Boolean.valueOf((String)value);
- } else {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, iClass.getName()));
- }
- } else if(Character.TYPE.equals(iClass)) {
- if(value instanceof Character) {
- // ok
- } else if(value instanceof String) {
- String s = (String)value;
- if(s.length() == 0) {
- value = null;
- } else {
- value = new Character(s.charAt(0));
- }
- } else {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, iClass.getName()));
- }
- } else if(Byte.TYPE.equals(iClass)) {
- if(value instanceof Byte) {
- // ok
- } else if(value instanceof Number) {
- value = new Byte(((Number)value).byteValue());
- } else if(value instanceof String) {
- String s = (String)value;
- if(s.length() == 0) {
- value = null;
- } else {
- try {
- value = Byte.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_WrongStringConversion, iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, iClass.getName()));
- }
- } else if(Short.TYPE.equals(iClass)) {
- if(value instanceof Short) {
- // ok
- } else if(value instanceof Number) {
- value = new Short(((Number)value).shortValue());
- } else if(value instanceof String) {
- String s = (String)value;
- if(s.length() == 0) {
- value = null;
- } else {
- try {
- value = Short.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_WrongStringConversion, iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, iClass.getName()));
- }
- } else if(Integer.TYPE.equals(iClass)) {
- if(value instanceof Integer) {
- // ok
- } else if(value instanceof Number) {
- value = new Integer(((Number)value).intValue());
- } else if(value instanceof String) {
- String s = (String)value;
- if(s.length() == 0) {
- value = null;
- } else {
- try {
- value = Integer.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_WrongStringConversion, iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, iClass.getName()));
- }
- } else if(Long.TYPE.equals(iClass)) {
- if(value instanceof Long) {
- // ok
- } else if(value instanceof Number) {
- value = new Long(((Number)value).longValue());
- } else if(value instanceof String) {
- String s = (String)value;
- if(s.length() == 0) {
- value = null;
- } else {
- try {
- value = Long.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_WrongStringConversion, iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, iClass.getName()));
- }
- } else if(Float.TYPE.equals(iClass)) {
- if(value instanceof Float) {
- // ok
- } else if(value instanceof Number) {
- value = new Float(((Number)value).floatValue());
- } else if(value instanceof String) {
- String s = (String)value;
- if(s.length() == 0) {
- value = null;
- } else {
- try {
- value = Float.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_WrongStringConversion, iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, iClass.getName()));
- }
- } else if(Double.TYPE.equals(iClass)) {
- if(value instanceof Double) {
- // ok
- } else if(value instanceof Number) {
- value = new Double(((Number)value).doubleValue());
- } else if(value instanceof String) {
- String s = (String)value;
- if(s.length() == 0) {
- value = null;
- } else {
- try {
- value = Double.valueOf(s);
- } catch (NumberFormatException nfe) {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_WrongStringConversion, iClass.getName()));
- }
- }
- } else {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, iClass.getName()));
- }
- } else if(type instanceof EEnum) {
- if(value instanceof String) {
- EEnumLiteral literal = ((EEnum)type).getEEnumLiteralByLiteral((String)value);
- if(literal == null) {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnknownLiteral, value));
- } else {
- value = literal.getInstance();
- }
- } else {
- value = new InvalidValue(NLS.bind(Messages.AbstractParser_UnexpectedValueType, String.class.getName()));
- }
- }
- }
- return value;
- }
-
- /**
- * @generated
- */
- protected class InvalidValue {
-
- /**
- * @generated
- */
- private String description;
-
- /**
- * @generated
- */
- public InvalidValue(String description) {
- this.description = description;
- }
-
- /**
- * @generated
- */
- public String toString() {
- return description;
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/parsers/MessageFormatParser.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/parsers/MessageFormatParser.java
deleted file mode 100644
index 8fed8a06008..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/parsers/MessageFormatParser.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.parsers;
-
-import java.text.FieldPosition;
-import java.text.MessageFormat;
-import java.text.ParsePosition;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class MessageFormatParser extends AbstractParser {
-
- /**
- * @generated
- */
- private String defaultPattern;
-
- /**
- * @generated
- */
- private String defaultEditablePattern;
-
- /**
- * @generated
- */
- private MessageFormat viewProcessor;
-
- /**
- * @generated
- */
- private MessageFormat editorProcessor;
-
- /**
- * @generated
- */
- private MessageFormat editProcessor;
-
- /**
- * @generated
- */
- public MessageFormatParser(EAttribute[] features) {
- super(features);
- }
-
- /**
- * @generated
- */
- public MessageFormatParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- /**
- * @generated
- */
- protected String getDefaultPattern() {
- if(defaultPattern == null) {
- StringBuffer sb = new StringBuffer();
- for(int i = 0; i < features.length; i++) {
- if(i > 0) {
- sb.append(' ');
- }
- sb.append('{');
- sb.append(i);
- sb.append('}');
- }
- defaultPattern = sb.toString();
- }
- return defaultPattern;
- }
-
- /**
- * @generated
- */
- public void setViewPattern(String viewPattern) {
- super.setViewPattern(viewPattern);
- viewProcessor = null;
- }
-
- /**
- * @generated
- */
- public void setEditorPattern(String editorPattern) {
- super.setEditorPattern(editorPattern);
- editorProcessor = null;
- }
-
- /**
- * @generated
- */
- protected MessageFormat getViewProcessor() {
- if(viewProcessor == null) {
- viewProcessor = new MessageFormat(getViewPattern() == null ? getDefaultPattern() : getViewPattern());
- }
- return viewProcessor;
- }
-
- /**
- * @generated
- */
- protected MessageFormat getEditorProcessor() {
- if(editorProcessor == null) {
- editorProcessor = new MessageFormat(getEditorPattern() == null ? getDefaultEditablePattern() : getEditorPattern());
- }
- return editorProcessor;
- }
-
- /**
- * @generated
- */
- protected String getDefaultEditablePattern() {
- if(defaultEditablePattern == null) {
- StringBuffer sb = new StringBuffer();
- for(int i = 0; i < editableFeatures.length; i++) {
- if(i > 0) {
- sb.append(' ');
- }
- sb.append('{');
- sb.append(i);
- sb.append('}');
- }
- defaultEditablePattern = sb.toString();
- }
- return defaultEditablePattern;
- }
-
- /**
- * @generated
- */
- public void setEditPattern(String editPattern) {
- super.setEditPattern(editPattern);
- editProcessor = null;
- }
-
- /**
- * @generated
- */
- protected MessageFormat getEditProcessor() {
- if(editProcessor == null) {
- editProcessor = new MessageFormat(getEditPattern() == null ? getDefaultEditablePattern() : getEditPattern());
- }
- return editProcessor;
- }
-
- /**
- * @generated
- */
- public String getEditString(IAdaptable adapter, int flags) {
- EObject element = (EObject)adapter.getAdapter(EObject.class);
- return getEditorProcessor().format(getEditableValues(element), new StringBuffer(), new FieldPosition(0)).toString();
- }
-
- /**
- * @generated
- */
- public IParserEditStatus isValidEditString(IAdaptable adapter, String editString) {
- ParsePosition pos = new ParsePosition(0);
- Object[] values = getEditProcessor().parse(editString, pos);
- if(values == null) {
- return new ParserEditStatus(UMLDiagramEditorPlugin.ID, IParserEditStatus.UNEDITABLE, NLS.bind(Messages.MessageFormatParser_InvalidInputError, new Integer(pos.getErrorIndex())));
- }
- return validateNewValues(values);
- }
-
- /**
- * @generated
- */
- public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
- Object[] values = getEditProcessor().parse(newString, new ParsePosition(0));
- return getParseCommand(adapter, values, flags);
- }
-
- /**
- * @generated
- */
- public String getPrintString(IAdaptable adapter, int flags) {
- EObject element = (EObject)adapter.getAdapter(EObject.class);
- return getViewProcessor().format(getValues(element), new StringBuffer(), new FieldPosition(0)).toString();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/DeleteElementAction.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/DeleteElementAction.java
deleted file mode 100644
index 48ee7a51827..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/DeleteElementAction.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-//This file is not used.
-//The DeleteElementAction is removed from the plugin and replaced by DeleteFromModelAction in the plugin org.eclipse.diagram.common.
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/DiagramEditorContextMenuProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/DiagramEditorContextMenuProvider.java
deleted file mode 100644
index ae57b74112a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/DiagramEditorContextMenuProvider.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.ContributionItemService;
-import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
-import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @generated
- */
-public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider {
-
- /**
- * @generated
- */
- private IWorkbenchPart part;
-
- /**
- * @generated
- */
- public DiagramEditorContextMenuProvider(IWorkbenchPart part, EditPartViewer viewer) {
- super(part, viewer);
- this.part = part;
-
- }
-
- /**
- * @generated
- */
- public void buildContextMenu(final IMenuManager menu) {
- getViewer().flush();
- try {
- TransactionUtil.getEditingDomain((EObject)getViewer().getContents().getModel()).runExclusive(new Runnable() {
-
- public void run() {
- ContributionItemService.getInstance().contributeToPopupMenu(DiagramEditorContextMenuProvider.this, part);
- menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
-
- }
- });
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Error building context menu", e);
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/LoadResourceAction.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/LoadResourceAction.java
deleted file mode 100644
index 891713b4434..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/LoadResourceAction.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * @generated
- */
-public class LoadResourceAction extends AbstractHandler {
-
- /**
- * @generated
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IEditorPart diagramEditor = HandlerUtil.getActiveEditorChecked(event);
- Shell shell = diagramEditor.getEditorSite().getShell();
- assert diagramEditor instanceof DiagramEditor;
- TransactionalEditingDomain editingDomain = ((DiagramEditor)diagramEditor).getEditingDomain();
- org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog loadResourceDialog = new org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog(shell, editingDomain);
- loadResourceDialog.open();
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java
deleted file mode 100644
index 6f56cc28830..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/Messages.java
+++ /dev/null
@@ -1,1031 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @generated
- */
-public class Messages extends NLS {
-
- /**
- * @generated
- */
- static {
- NLS.initializeMessages("messages", Messages.class); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- private Messages() {
- }
-
- /**
- * @generated NOT
- */
- public static String MoveMessageCommand_Label;
-
- /**
- * @generated NOT
- */
- public static String SelectOrCreateDialog_CreateLabel;
-
- /**
- * @generated NOT
- */
- public static String SelectOrCreateDialog_NameLabel;
-
- /**
- * @generated NOT
- */
- public static String SelectOrCreateDialog_OwnerLabel;
-
- /**
- * @generated NOT
- */
- public static String SelectOrCreateDialog_SelectLabel;
-
- /**
- * @generated NOT
- */
- public static String SelectOrCreateDialog_NothingLabel;
-
- /**
- * @generated NOT
- */
- public static String SelectOrCreateDialog_TypeLabel;
-
- /**
- * @generated NOT
- */
- public static String CommandHelper_CreateMessage;
-
- /**
- * Error message for when an error occurs in FragmentOrderingKeeper evaluation.
- *
- * @generated NOT
- */
- public static String FragmentOrderingKeeper_error;
-
- /**
- * Error notification title when a link can not be dropped
- *
- * @generated NOT
- */
- public static String DropError_DefaultTitle;
-
- /**
- * Error notification message when a link can not be dropped
- *
- * @generated NOT
- */
- public static String DropError_DefaultTxt;
-
- /**
- * Error notification title when a message can not be dropped because it goes uphill
- *
- * @generated NOT
- */
- public static String DropError_UphillMessageTitle;
-
- /**
- * Error notification message when a message can not be dropped because it goes uphill
- *
- * @generated NOT
- */
- public static String DropError_UphillMessageTxt;
-
- /**
- * Warning notification title when the resize of an interaction operand may have an erratic behavior
- *
- * @generated NOT
- */
- public static String Warning_ResizeInteractionOperandTitle;
-
- /**
- * Warning notification message when the resize of an interaction operand may have an erratic behavior
- *
- * @generated NOT
- */
- public static String Warning_ResizeInteractionOperandTxt;
-
- /**
- * @generated
- */
- public static String UMLCreationWizardTitle;
-
- /**
- * @generated
- */
- public static String UMLCreationWizard_DiagramModelFilePageTitle;
-
- /**
- * @generated
- */
- public static String UMLCreationWizard_DiagramModelFilePageDescription;
-
- /**
- * @generated
- */
- public static String UMLCreationWizard_DomainModelFilePageTitle;
-
- /**
- * @generated
- */
- public static String UMLCreationWizard_DomainModelFilePageDescription;
-
- /**
- * @generated
- */
- public static String UMLCreationWizardOpenEditorError;
-
- /**
- * @generated
- */
- public static String UMLCreationWizardCreationError;
-
- /**
- * @generated
- */
- public static String UMLCreationWizardPageExtensionError;
-
- /**
- * @generated
- */
- public static String UMLDiagramEditorUtil_OpenModelResourceErrorDialogTitle;
-
- /**
- * @generated
- */
- public static String UMLDiagramEditorUtil_OpenModelResourceErrorDialogMessage;
-
- /**
- * @generated
- */
- public static String UMLDiagramEditorUtil_CreateDiagramProgressTask;
-
- /**
- * @generated
- */
- public static String UMLDiagramEditorUtil_CreateDiagramCommandLabel;
-
- /**
- * @generated
- */
- public static String UMLDocumentProvider_isModifiable;
-
- /**
- * @generated
- */
- public static String UMLDocumentProvider_handleElementContentChanged;
-
- /**
- * @generated
- */
- public static String UMLDocumentProvider_IncorrectInputError;
-
- /**
- * @generated
- */
- public static String UMLDocumentProvider_NoDiagramInResourceError;
-
- /**
- * @generated
- */
- public static String UMLDocumentProvider_DiagramLoadingError;
-
- /**
- * @generated
- */
- public static String UMLDocumentProvider_UnsynchronizedFileSaveError;
-
- /**
- * @generated
- */
- public static String UMLDocumentProvider_SaveDiagramTask;
-
- /**
- * @generated
- */
- public static String UMLDocumentProvider_SaveNextResourceTask;
-
- /**
- * @generated
- */
- public static String UMLDocumentProvider_SaveAsOperation;
-
- /**
- * @generated
- */
- public static String InitDiagramFile_ResourceErrorDialogTitle;
-
- /**
- * @generated
- */
- public static String InitDiagramFile_ResourceErrorDialogMessage;
-
- /**
- * @generated
- */
- public static String InitDiagramFile_WizardTitle;
-
- /**
- * @generated
- */
- public static String InitDiagramFile_OpenModelFileDialogTitle;
-
- /**
- * @generated
- */
- public static String UMLNewDiagramFileWizard_CreationPageName;
-
- /**
- * @generated
- */
- public static String UMLNewDiagramFileWizard_CreationPageTitle;
-
- /**
- * @generated
- */
- public static String UMLNewDiagramFileWizard_CreationPageDescription;
-
- /**
- * @generated
- */
- public static String UMLNewDiagramFileWizard_RootSelectionPageName;
-
- /**
- * @generated
- */
- public static String UMLNewDiagramFileWizard_RootSelectionPageTitle;
-
- /**
- * @generated
- */
- public static String UMLNewDiagramFileWizard_RootSelectionPageDescription;
-
- /**
- * @generated
- */
- public static String UMLNewDiagramFileWizard_RootSelectionPageSelectionTitle;
-
- /**
- * @generated
- */
- public static String UMLNewDiagramFileWizard_RootSelectionPageNoSelectionMessage;
-
- /**
- * @generated
- */
- public static String UMLNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage;
-
- /**
- * @generated
- */
- public static String UMLNewDiagramFileWizard_InitDiagramCommand;
-
- /**
- * @generated
- */
- public static String UMLNewDiagramFileWizard_IncorrectRootError;
-
- /**
- * @generated
- */
- public static String UMLDiagramEditor_SavingDeletedFile;
-
- /**
- * @generated
- */
- public static String UMLDiagramEditor_SaveAsErrorTitle;
-
- /**
- * @generated
- */
- public static String UMLDiagramEditor_SaveAsErrorMessage;
-
- /**
- * @generated
- */
- public static String UMLDiagramEditor_SaveErrorTitle;
-
- /**
- * @generated
- */
- public static String UMLDiagramEditor_SaveErrorMessage;
-
- /**
- * @generated
- */
- public static String UMLElementChooserDialog_SelectModelElementTitle;
-
- /**
- * @generated
- */
- public static String ModelElementSelectionPageMessage;
-
- /**
- * @generated
- */
- public static String ValidateActionMessage;
-
- /**
- * @generated
- */
- public static String createNodes1Group_title;
-
- /**
- * @generated
- */
- public static String createNodes1Group_desc;
-
- /**
- * @generated
- */
- public static String createEdges2Group_title;
-
- /**
- * @generated
- */
- public static String createEdges2Group_desc;
-
- /**
- * @generated
- */
- public static String createLifeline1CreationTool_title;
-
- /**
- * @generated
- */
- public static String createLifeline1CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createActionExecutionSpecification2CreationTool_title;
-
- /**
- * @generated
- */
- public static String createActionExecutionSpecification2CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createBehaviorExecutionSpecification3CreationTool_title;
-
- /**
- * @generated
- */
- public static String createBehaviorExecutionSpecification3CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createInteractionUse4CreationTool_title;
-
- /**
- * @generated
- */
- public static String createInteractionUse4CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createCombinedFragment5CreationTool_title;
-
- /**
- * @generated
- */
- public static String createCombinedFragment5CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createInteractionOperand6CreationTool_title;
-
- /**
- * @generated
- */
- public static String createInteractionOperand6CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createContinuation7CreationTool_title;
-
- /**
- * @generated
- */
- public static String createContinuation7CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createStateInvariant8CreationTool_title;
-
- /**
- * @generated
- */
- public static String createStateInvariant8CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createComment9CreationTool_title;
-
- /**
- * @generated
- */
- public static String createComment9CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createConstraint10CreationTool_title;
-
- /**
- * @generated
- */
- public static String createConstraint10CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createCoRegion11CreationTool_title;
-
- /**
- * @generated
- */
- public static String createCoRegion11CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createDurationObservation12CreationTool_title;
-
- /**
- * @generated
- */
- public static String createDurationObservation12CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createTimeConstraint13CreationTool_title;
-
- /**
- * @generated
- */
- public static String createTimeConstraint13CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createTimeObservation14CreationTool_title;
-
- /**
- * @generated
- */
- public static String createTimeObservation14CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createDurationConstraint15CreationTool_title;
-
- /**
- * @generated
- */
- public static String createDurationConstraint15CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createDestructionEvent16CreationTool_title;
-
- /**
- * @generated
- */
- public static String createDestructionEvent16CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createMessageSync1CreationTool_title;
-
- /**
- * @generated
- */
- public static String createMessageSync1CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createMessageAsync2CreationTool_title;
-
- /**
- * @generated
- */
- public static String createMessageAsync2CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createMessageReply3CreationTool_title;
-
- /**
- * @generated
- */
- public static String createMessageReply3CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createMessageCreate4CreationTool_title;
-
- /**
- * @generated
- */
- public static String createMessageCreate4CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createMessageDelete5CreationTool_title;
-
- /**
- * @generated
- */
- public static String createMessageDelete5CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createMessageLost6CreationTool_title;
-
- /**
- * @generated
- */
- public static String createMessageLost6CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createMessageFound7CreationTool_title;
-
- /**
- * @generated
- */
- public static String createMessageFound7CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createGeneralOrdering8CreationTool_title;
-
- /**
- * @generated
- */
- public static String createGeneralOrdering8CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createCommentlink9CreationTool_title;
-
- /**
- * @generated
- */
- public static String createCommentlink9CreationTool_desc;
-
- /**
- * @generated
- */
- public static String createConstraintlink10CreationTool_title;
-
- /**
- * @generated
- */
- public static String createConstraintlink10CreationTool_desc;
-
- /**
- * @generated
- */
- public static String InteractionInteractionCompartmentEditPart_title;
-
- /**
- * @generated
- */
- public static String CombinedFragmentCombinedFragmentCompartmentEditPart_title;
-
- /**
- * @generated
- */
- public static String CommandName_OpenDiagram;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Package_1000_links;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Interaction_2001_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Interaction_2001_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Lifeline_3001_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Lifeline_3001_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_ActionExecutionSpecification_3006_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_ActionExecutionSpecification_3006_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_BehaviorExecutionSpecification_3003_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_BehaviorExecutionSpecification_3003_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_StateInvariant_3017_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_StateInvariant_3017_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_CombinedFragment_3018_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_CombinedFragment_3018_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_TimeConstraint_3019_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_TimeConstraint_3019_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_DurationObservation_3024_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_DurationObservation_3024_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_TimeObservation_3020_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_TimeObservation_3020_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_DurationConstraint_3021_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_DurationConstraint_3021_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_InteractionUse_3002_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_InteractionUse_3002_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_CombinedFragment_3004_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_CombinedFragment_3004_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_InteractionOperand_3005_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_InteractionOperand_3005_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Continuation_3016_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Continuation_3016_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Constraint_3008_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Constraint_3008_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_DurationConstraint_3023_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_DurationConstraint_3023_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Comment_3009_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Comment_3009_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_ConsiderIgnoreFragment_3007_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_ConsiderIgnoreFragment_3007_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4003_target;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4003_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4003_source;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4003_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4004_target;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4004_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4004_source;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4004_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4005_target;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4005_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4005_source;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4005_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4006_target;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4006_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4006_source;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4006_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4007_target;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4007_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4007_source;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4007_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4008_target;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4008_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4008_source;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4008_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4009_target;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4009_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4009_source;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_Message_4009_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_CommentAnnotatedElement_4010_target;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_CommentAnnotatedElement_4010_source;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_DestructionOccurrenceSpecification_3022_incominglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_DestructionOccurrenceSpecification_3022_outgoinglinks;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_ConstraintConstrainedElement_4011_target;
-
- /**
- * @generated
- */
- public static String NavigatorGroupName_ConstraintConstrainedElement_4011_source;
-
- /**
- * @generated
- */
- public static String NavigatorActionProvider_OpenDiagramActionName;
-
- /**
- * @generated
- */
- public static String AbstractParser_UnexpectedValueType;
-
- /**
- * @generated
- */
- public static String AbstractParser_WrongStringConversion;
-
- /**
- * @generated
- */
- public static String AbstractParser_UnknownLiteral;
-
- /**
- * @generated
- */
- public static String MessageFormatParser_InvalidInputError;
-
- /**
- * @generated
- */
- public static String UMLModelingAssistantProviderTitle;
-
- /**
- * @generated
- */
- public static String UMLModelingAssistantProviderMessage;
-
- // TODO: put accessor fields manually
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/ModelElementSelectionPage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/ModelElementSelectionPage.java
deleted file mode 100644
index 61c2872aa0e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/ModelElementSelectionPage.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.edit.provider.IWrapperItemProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * Wizard page that allows to select element from model.
- *
- * @generated
- */
-public class ModelElementSelectionPage extends WizardPage {
-
- /**
- * @generated
- */
- protected EObject selectedModelElement;
-
- /**
- * @generated
- */
- private TreeViewer modelViewer;
-
- /**
- * @generated
- */
- public ModelElementSelectionPage(String pageName) {
- super(pageName);
- }
-
- /**
- * @generated
- */
- public EObject getModelElement() {
- return selectedModelElement;
- }
-
- /**
- * @generated
- */
- public void setModelElement(EObject modelElement) {
- selectedModelElement = modelElement;
- if(modelViewer != null) {
- if(selectedModelElement != null) {
- modelViewer.setInput(selectedModelElement.eResource());
- modelViewer.setSelection(new StructuredSelection(selectedModelElement));
- } else {
- modelViewer.setInput(null);
- }
- setPageComplete(validatePage());
- }
- }
-
- /**
- * @generated
- */
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
-
- Composite plate = new Composite(parent, SWT.NONE);
- plate.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- plate.setLayout(layout);
- setControl(plate);
-
- Label label = new Label(plate, SWT.NONE);
- label.setText(getSelectionTitle());
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- modelViewer = new TreeViewer(plate, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- GridData layoutData = new GridData(GridData.FILL_BOTH);
- layoutData.heightHint = 300;
- layoutData.widthHint = 300;
- modelViewer.getTree().setLayoutData(layoutData);
- modelViewer.setContentProvider(new AdapterFactoryContentProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory()));
- modelViewer.setLabelProvider(new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory()));
- if(selectedModelElement != null) {
- modelViewer.setInput(selectedModelElement.eResource());
- modelViewer.setSelection(new StructuredSelection(selectedModelElement));
- }
- modelViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- ModelElementSelectionPage.this.updateSelection((IStructuredSelection)event.getSelection());
- }
- });
-
- setPageComplete(validatePage());
- }
-
- /**
- * Override to provide custom model element description.
- *
- * @generated
- */
- protected String getSelectionTitle() {
- return Messages.ModelElementSelectionPageMessage;
- }
-
- /**
- * @generated
- */
- protected void updateSelection(IStructuredSelection selection) {
- selectedModelElement = null;
- if(selection.size() == 1) {
- Object selectedElement = selection.getFirstElement();
- if(selectedElement instanceof IWrapperItemProvider) {
- selectedElement = ((IWrapperItemProvider)selectedElement).getValue();
- }
- if(selectedElement instanceof FeatureMap.Entry) {
- selectedElement = ((FeatureMap.Entry)selectedElement).getValue();
- }
- if(selectedElement instanceof EObject) {
- selectedModelElement = (EObject)selectedElement;
- }
- }
- setPageComplete(validatePage());
- }
-
- /**
- * Override to provide specific validation of the selected model element.
- *
- * @generated
- */
- protected boolean validatePage() {
- return true;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizard.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizard.java
deleted file mode 100644
index a2e08ea119a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizard.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * @generated
- */
-public class UMLCreationWizard extends Wizard implements INewWizard {
-
- /**
- * @generated
- */
- private IWorkbench workbench;
-
- /**
- * @generated
- */
- protected IStructuredSelection selection;
-
- /**
- * @generated
- */
- protected UMLCreationWizardPage diagramModelFilePage;
-
- /**
- * @generated
- */
- protected UMLCreationWizardPage domainModelFilePage;
-
- /**
- * @generated
- */
- protected Resource diagram;
-
- /**
- * @generated
- */
- private boolean openNewlyCreatedDiagramEditor = true;
-
- /**
- * @generated
- */
- public IWorkbench getWorkbench() {
- return workbench;
- }
-
- /**
- * @generated
- */
- public IStructuredSelection getSelection() {
- return selection;
- }
-
- /**
- * @generated
- */
- public final Resource getDiagram() {
- return diagram;
- }
-
- /**
- * @generated
- */
- public final boolean isOpenNewlyCreatedDiagramEditor() {
- return openNewlyCreatedDiagramEditor;
- }
-
- /**
- * @generated
- */
- public void setOpenNewlyCreatedDiagramEditor(boolean openNewlyCreatedDiagramEditor) {
- this.openNewlyCreatedDiagramEditor = openNewlyCreatedDiagramEditor;
- }
-
- /**
- * @generated
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.workbench = workbench;
- this.selection = selection;
- setWindowTitle(Messages.UMLCreationWizardTitle);
- setDefaultPageImageDescriptor(UMLDiagramEditorPlugin.getBundledImageDescriptor("icons/wizban/NewUMLWizard.gif")); //$NON-NLS-1$
- setNeedsProgressMonitor(true);
- }
-
- /**
- * @generated
- */
- public void addPages() {
- diagramModelFilePage = new UMLCreationWizardPage("DiagramModelFile", getSelection(), "PapyrusUMLSequence_diagram"); //$NON-NLS-1$ //$NON-NLS-2$
- diagramModelFilePage.setTitle(Messages.UMLCreationWizard_DiagramModelFilePageTitle);
- diagramModelFilePage.setDescription(Messages.UMLCreationWizard_DiagramModelFilePageDescription);
- addPage(diagramModelFilePage);
-
- domainModelFilePage = new UMLCreationWizardPage("DomainModelFile", getSelection(), "PapyrusUMLSequence") { //$NON-NLS-1$ //$NON-NLS-2$
-
- public void setVisible(boolean visible) {
- if(visible) {
- String fileName = diagramModelFilePage.getFileName();
- fileName = fileName.substring(0, fileName.length() - ".PapyrusUMLSequence_diagram".length()); //$NON-NLS-1$
- setFileName(UMLDiagramEditorUtil.getUniqueFileName(getContainerFullPath(), fileName, "PapyrusUMLSequence")); //$NON-NLS-1$
- }
- super.setVisible(visible);
- }
- };
- domainModelFilePage.setTitle(Messages.UMLCreationWizard_DomainModelFilePageTitle);
- domainModelFilePage.setDescription(Messages.UMLCreationWizard_DomainModelFilePageDescription);
- addPage(domainModelFilePage);
- }
-
- /**
- * @generated
- */
- public boolean performFinish() {
- IRunnableWithProgress op = new WorkspaceModifyOperation(null) {
-
- protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException {
- diagram = UMLDiagramEditorUtil.createDiagram(diagramModelFilePage.getURI(), domainModelFilePage.getURI(), monitor);
- if(isOpenNewlyCreatedDiagramEditor() && diagram != null) {
- try {
- UMLDiagramEditorUtil.openDiagram(diagram);
- } catch (PartInitException e) {
- ErrorDialog.openError(getContainer().getShell(), Messages.UMLCreationWizardOpenEditorError, null, e.getStatus());
- }
- }
- }
- };
- try {
- getContainer().run(false, true, op);
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) {
- if(e.getTargetException() instanceof CoreException) {
- ErrorDialog.openError(getContainer().getShell(), Messages.UMLCreationWizardCreationError, null, ((CoreException)e.getTargetException()).getStatus());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$
- }
- return false;
- }
- return diagram != null;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizardPage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizardPage.java
deleted file mode 100644
index d7d12ac356f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLCreationWizardPage.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-
-/**
- * @generated
- */
-public class UMLCreationWizardPage extends WizardNewFileCreationPage {
-
- /**
- * @generated
- */
- private final String fileExtension;
-
- /**
- * @generated
- */
- public UMLCreationWizardPage(String pageName, IStructuredSelection selection, String fileExtension) {
- super(pageName, selection);
- this.fileExtension = fileExtension;
- }
-
- /**
- * Override to create files with this extension.
- *
- * @generated
- */
- protected String getExtension() {
- return fileExtension;
- }
-
- /**
- * @generated
- */
- public URI getURI() {
- return URI.createPlatformResourceURI(getFilePath().toString(), false);
- }
-
- /**
- * @generated
- */
- protected IPath getFilePath() {
- IPath path = getContainerFullPath();
- if(path == null) {
- path = new Path(""); //$NON-NLS-1$
- }
- String fileName = getFileName();
- if(fileName != null) {
- path = path.append(fileName);
- }
- return path;
- }
-
- /**
- * @generated
- */
- public void createControl(Composite parent) {
- super.createControl(parent);
- setFileName(UMLDiagramEditorUtil.getUniqueFileName(getContainerFullPath(), getFileName(), getExtension()));
- setPageComplete(validatePage());
- }
-
- /**
- * @generated
- */
- protected boolean validatePage() {
- if(!super.validatePage()) {
- return false;
- }
- String extension = getExtension();
- if(extension != null && !getFilePath().toString().endsWith("." + extension)) {
- setErrorMessage(NLS.bind(Messages.UMLCreationWizardPageExtensionError, extension));
- return false;
- }
- return true;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramActionBarContributor.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramActionBarContributor.java
deleted file mode 100644
index aa4fe69c5ac..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramActionBarContributor.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramActionBarContributor;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * @generated
- */
-public class UMLDiagramActionBarContributor extends DiagramActionBarContributor {
-
- /**
- * @generated
- */
- protected Class getEditorClass() {
- return UMLDiagramEditor.class;
- }
-
- /**
- * @generated
- */
- protected String getEditorId() {
- return UMLDiagramEditor.ID;
- }
-
- /**
- * @generated
- */
- public void init(IActionBars bars, IWorkbenchPage page) {
- super.init(bars, page);
- // print preview
- IMenuManager fileMenu = bars.getMenuManager().findMenuUsingPath(IWorkbenchActionConstants.M_FILE);
- assert fileMenu != null;
- fileMenu.remove("pageSetupAction"); //$NON-NLS-1$
- IMenuManager editMenu = bars.getMenuManager().findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
- assert editMenu != null;
- if(editMenu.find("validationGroup") == null) { //$NON-NLS-1$
- editMenu.add(new GroupMarker("validationGroup")); //$NON-NLS-1$
- }
- IAction validateAction = new ValidateAction(page);
- editMenu.appendToGroup("validationGroup", validateAction); //$NON-NLS-1$
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java
deleted file mode 100644
index 498e334aec8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditor.java
+++ /dev/null
@@ -1,567 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import java.util.EventObject;
-
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.KeyHandler;
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.commands.CommandStackListener;
-import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gef.ui.palette.PaletteViewer;
-import org.eclipse.gef.ui.palette.PaletteViewerProvider;
-import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
-import org.eclipse.gmf.runtime.common.core.service.ProviderChangeEvent;
-import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
-import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDragSourceListener;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteContextMenuProvider;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteViewer;
-import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService;
-import org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorItem;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.ide.IGotoMarker;
-import org.eclipse.ui.navigator.resources.ProjectExplorer;
-import org.eclipse.ui.part.IShowInTargetList;
-import org.eclipse.ui.part.ShowInContext;
-
-/**
- * @generated
- */
-public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderChangeListener, IGotoMarker {
-
- /**
- * @generated
- */
- public static final String ID = "org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final String CONTEXT_ID = "org.eclipse.papyrus.uml.diagram.sequence.ui.diagramContext"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private KeyHandler paletteKeyHandler = null;
-
- /**
- * @generated
- */
- private MouseListener paletteMouseListener = null;
-
- /**
- * @generated
- */
- private IUndoableOperation savedOperation = null;
-
- private boolean isDirty = false;
-
- /** The editing domain. */
- private TransactionalEditingDomain editingDomain;
-
- /** The document provider. */
- private IDocumentProvider documentProvider;
-
- /**
- * @generated
- */
- public UMLDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
- super(servicesRegistry, diagram);
-
- // adds a listener to the palette service, which reacts to palette customizations
- PapyrusPaletteService.getInstance().addProviderChangeListener(this);
-
- // Share the same editing provider
- editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
- documentProvider = new org.eclipse.papyrus.infra.gmfdiag.common.GmfMultiDiagramDocumentProvider(editingDomain);
-
- // overrides editing domain created by super constructor
- setDocumentProvider(documentProvider);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected String getContextID() {
- return CONTEXT_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
- PaletteRoot paletteRoot;
- if(existingPaletteRoot == null) {
- paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
- } else {
- PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
- paletteRoot = existingPaletteRoot;
- }
- applyCustomizationsToPalette(paletteRoot);
- return paletteRoot;
- }
-
- /**
- * @generated
- */
- @Override
- protected PreferencesHint getPreferencesHint() {
- return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * @generated
- */
- @Override
- public String getContributorId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getAdapter(Class type) {
- if(type == IShowInTargetList.class) {
- return new IShowInTargetList() {
-
- public String[] getShowInTargetIds() {
- return new String[]{ ProjectExplorer.VIEW_ID };
- }
- };
- }
- return super.getAdapter(type);
- }
-
- /**
- * @generated
- */
- @Override
- protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
- return documentProvider;
- }
-
- /**
- * @generated
- */
- @Override
- public TransactionalEditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- /**
- * @generated
- */
- @Override
- protected final void setDocumentProvider(IEditorInput input) {
- // Already set in the constructor
- }
-
- /**
- * @generated
- */
- public void gotoMarker(IMarker marker) {
- MarkerNavigationService.getInstance().gotoMarker(this, marker);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isSaveAsAllowed() {
- return true;
- }
-
- /**
- * @generated
- */
- @Override
- public void doSaveAs() {
- performSaveAs(new NullProgressMonitor());
- }
-
- /**
- * @generated
- */
- @Override
- protected void performSaveAs(IProgressMonitor progressMonitor) {
- // Nothing
- }
-
- /**
- * @generated
- */
- @Override
- public ShowInContext getShowInContext() {
- return new ShowInContext(getEditorInput(), getNavigatorSelection());
- }
-
- /**
- * @generated
- */
- private ISelection getNavigatorSelection() {
- IDiagramDocument document = getDiagramDocument();
- if(document == null) {
- return StructuredSelection.EMPTY;
- }
- Diagram diagram = document.getDiagram();
- if(diagram == null || diagram.eResource() == null) {
- return StructuredSelection.EMPTY;
- }
- IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
- if(file != null) {
- UMLNavigatorItem item = new UMLNavigatorItem(diagram, file, false);
- return new StructuredSelection(item);
- }
- return StructuredSelection.EMPTY;
- }
-
- /**
- * @generated
- */
- @Override
- protected void configureGraphicalViewer() {
- super.configureGraphicalViewer();
- DiagramEditorContextMenuProvider provider = new DiagramEditorContextMenuProvider(this, getDiagramGraphicalViewer());
- getDiagramGraphicalViewer().setContextMenu(provider);
- getSite().registerContextMenu(ActionIds.DIAGRAM_EDITOR_CONTEXT_MENU, provider, getDiagramGraphicalViewer());
- }
-
- /**
- * Overrides createEditingDomain.
- *
- * {@inheritDoc}
- *
- * @see DiagramDocumentEditor#createEditingDomain()
- */
- @Override
- protected TransactionalEditingDomain createEditingDomain() {
- // Already configured
- return editingDomain;
- }
-
- /**
- * Overrides configureDiagramEditDomain.
- *
- * {@inheritDoc}
- *
- * @see DiagramDocumentEditor#configureDiagramEditDomain()
- */
- @Override
- protected void configureDiagramEditDomain() {
- super.configureDiagramEditDomain();
- getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
-
- public void commandStackChanged(EventObject event) {
- isDirty = true;
- }
- });
- }
-
- /**
- * Overrides doSave.
- *
- * {@inheritDoc}
- *
- * @see DiagramDocumentEditor#doSave(IProgressMonitor)
- */
- @Override
- public void doSave(IProgressMonitor progressMonitor) {
- // The saving of the resource is done by the CoreMultiDiagramEditor
- // Just notify the command stack here
- isDirty = false;
- }
-
- /**
- * Overrides isDirty.
- *
- * {@inheritDoc}
- *
- * @see DiagramDocumentEditor#isDirty()
- */
- @Override
- public boolean isDirty() {
- return isDirty;
- }
-
- /**
- * @generated
- */
- public void providerChanged(ProviderChangeEvent event) {
- // update the palette if the palette service has changed
- if(PapyrusPaletteService.getInstance().equals(event.getSource())) {
- PapyrusPaletteService.getInstance().updatePalette(getPaletteViewer().getPaletteRoot(), this, getDefaultPaletteContent());
- }
- }
-
- /**
- * @generated
- */
- @Override
- public void dispose() {
- // remove palette service listener
- // remove preference listener
- PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
-
- super.dispose();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer getPaletteViewer() {
- return getEditDomain().getPaletteViewer();
- }
-
- /**
- * @generated
- */
- @Override
- protected PaletteViewer constructPaletteViewer() {
- return new PapyrusPaletteViewer();
- }
-
- /**
- * @generated
- */
- @Override
- protected PaletteViewerProvider createPaletteViewerProvider() {
- getEditDomain().setPaletteRoot(createPaletteRoot(null));
- return new PaletteViewerProvider(getEditDomain()) {
-
- /**
- * Override to provide the additional behavior for the tools. Will intialize with a
- * PaletteEditPartFactory that has a TrackDragger that understand how to handle the
- * mouseDoubleClick event for shape creation tools. Also will initialize the palette
- * with a defaultTool that is the SelectToolEx that undestands how to handle the enter
- * key which will result in the creation of the shape also.
- */
- protected void configurePaletteViewer(PaletteViewer viewer) {
- super.configurePaletteViewer(viewer);
-
- // customize menu...
- viewer.setContextMenu(new PapyrusPaletteContextMenuProvider(viewer));
-
- viewer.getKeyHandler().setParent(getPaletteKeyHandler());
- viewer.getControl().addMouseListener(getPaletteMouseListener());
-
- // Add a transfer drag target listener that is supported on
- // palette template entries whose template is a creation tool.
- // This will enable drag and drop of the palette shape creation
- // tools.
- viewer.addDragSourceListener(new PaletteToolTransferDragSourceListener(viewer));
- viewer.setCustomizer(createPaletteCustomizer());
- }
-
- public PaletteViewer createPaletteViewer(Composite parent) {
- PaletteViewer pViewer = constructPaletteViewer();
- pViewer.createControl(parent);
- configurePaletteViewer(pViewer);
- hookPaletteViewer(pViewer);
- return pViewer;
- }
-
- /**
- * @return Palette Key Handler for the palette
- */
- private KeyHandler getPaletteKeyHandler() {
-
- if(paletteKeyHandler == null) {
-
- paletteKeyHandler = new KeyHandler() {
-
- /**
- * Processes a <i>key released </i> event. This method is called by the Tool
- * whenever a key is released, and the Tool is in the proper state. Override
- * to support pressing the enter key to create a shape or connection
- * (between two selected shapes)
- *
- * @param event
- * the KeyEvent
- * @return <code>true</code> if KeyEvent was handled in some way
- */
- public boolean keyReleased(KeyEvent event) {
-
- if(event.keyCode == SWT.Selection) {
-
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.keyUp(event, getDiagramGraphicalViewer());
-
- // deactivate current selection
- getPaletteViewer().setActiveTool(null);
-
- return true;
- }
-
- }
- return super.keyReleased(event);
- }
-
- };
-
- }
- return paletteKeyHandler;
- }
-
- /**
- * @return Palette Mouse listener for the palette
- */
- private MouseListener getPaletteMouseListener() {
-
- if(paletteMouseListener == null) {
-
- paletteMouseListener = new MouseListener() {
-
- /**
- * Flag to indicate that the current active tool should be cleared after a
- * mouse double-click event.
- */
- private boolean clearActiveTool = false;
-
- /**
- * Override to support double-clicking a palette tool entry to create a
- * shape or connection (between two selected shapes).
- *
- * @see MouseListener#mouseDoubleClick(MouseEvent)
- */
- public void mouseDoubleClick(MouseEvent e) {
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.setViewer(getDiagramGraphicalViewer());
- tool.setEditDomain(getDiagramGraphicalViewer().getEditDomain());
- tool.mouseDoubleClick(e, getDiagramGraphicalViewer());
-
- // Current active tool should be deactivated,
- // but if it is down here it will get
- // reactivated deep in GEF palette code after
- // receiving mouse up events.
- clearActiveTool = true;
- }
- }
-
- public void mouseDown(MouseEvent e) {
- // do nothing
- }
-
- public void mouseUp(MouseEvent e) {
- // Deactivate current active tool here if a
- // double-click was handled.
- if(clearActiveTool) {
- getPaletteViewer().setActiveTool(null);
- clearActiveTool = false;
- }
-
- }
- };
-
- }
- return paletteMouseListener;
- }
-
- };
- }
-
- /**
- * @generated
- */
- @Override
- public GraphicalViewer getGraphicalViewer() {
- return super.getGraphicalViewer();
- }
-
- /**
- * @generated
- */
- @Override
- protected void initializeGraphicalViewer() {
- super.initializeGraphicalViewer();
-
- // Enable Drop
- getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
-
- @Override
- protected Object getJavaObject(TransferData data) {
- return LocalSelectionTransfer.getTransfer().nativeToJava(data);
- }
-
- @Override
- protected TransactionalEditingDomain getTransactionalEditingDomain() {
- return getEditingDomain();
- }
- });
-
- }
-
- /**
- * @generated
- */
- @Override
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if(getSite().getPage().getActiveEditor() instanceof IMultiDiagramEditor) {
- IMultiDiagramEditor editor = (IMultiDiagramEditor)getSite().getPage().getActiveEditor();
- // If not the active editor, ignore selection changed.
- if(this.equals(editor.getActiveEditor())) {
- updateActions(getSelectionActions());
- super.selectionChanged(part, selection);
- } else {
- super.selectionChanged(part, selection);
- }
- } else {
- super.selectionChanged(part, selection);
- }
- // from
- // org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.selectionChanged(IWorkbenchPart,
- // ISelection)
- if(part == this) {
- rebuildStatusLine();
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorPlugin.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorPlugin.java
deleted file mode 100644
index 10519cb83a9..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorPlugin.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.Activator;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.sequence.expressions.UMLOCLFactory;
-import org.eclipse.papyrus.uml.diagram.sequence.preferences.DiagramPreferenceInitializer;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.uml2.uml.edit.providers.UMLItemProviderAdapterFactory;
-import org.osgi.framework.BundleContext;
-
-/**
- * @generated
- */
-public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
-
- /** Logging helper */
- public static LogHelper log;
-
- /**
- * @generated
- */
- public static final String ID = "org.eclipse.papyrus.uml.diagram.sequence"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(ID);
-
- /**
- * @generated
- */
- private static UMLDiagramEditorPlugin instance;
-
- /**
- * @generated
- */
- private ComposedAdapterFactory adapterFactory;
-
- /**
- * @generated
- */
- private UMLDocumentProvider documentProvider;
-
- /**
- * @generated
- */
- private UMLBaseItemSemanticEditPolicy.LinkConstraints linkConstraints;
-
- /**
- * @generated
- */
- private ElementInitializers initializers;
-
- /**
- * @generated
- */
- private UMLOCLFactory oclFactory;
-
- /**
- * @generated
- */
- public UMLDiagramEditorPlugin() {
- }
-
- /**
- * It is no more generated to initialize the log.
- *
- * @generated NOT
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- instance = this;
- PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
- adapterFactory = createAdapterFactory();
- log = new LogHelper(instance);
- DiagramPreferenceInitializer diagramPreferenceInitializer = new DiagramPreferenceInitializer();
- diagramPreferenceInitializer.initializeDefaultPreferences();
- }
-
- /**
- * @generated
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- adapterFactory.dispose();
- adapterFactory = null;
- linkConstraints = null;
- initializers = null;
- oclFactory = null;
- instance = null;
- super.stop(context);
- }
-
- /**
- * @generated
- */
- public static UMLDiagramEditorPlugin getInstance() {
- return instance;
- }
-
- /**
- * @generated
- */
- @Override
- public IPreferenceStore getPreferenceStore() {
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- return store;
- }
-
- /**
- * @generated
- */
- protected ComposedAdapterFactory createAdapterFactory() {
- ArrayList<AdapterFactory> factories = new ArrayList<AdapterFactory>();
- fillItemProviderFactories(factories);
- return new ComposedAdapterFactory(factories);
- }
-
- /**
- * @generated
- */
- protected void fillItemProviderFactories(List<AdapterFactory> factories) {
- factories.add(new UMLItemProviderAdapterFactory());
- factories.add(new EcoreItemProviderAdapterFactory());
- factories.add(new ResourceItemProviderAdapterFactory());
- factories.add(new ReflectiveItemProviderAdapterFactory());
- }
-
- /**
- * @generated
- */
- public AdapterFactory getItemProvidersAdapterFactory() {
- return adapterFactory;
- }
-
- /**
- * @generated
- */
- public ImageDescriptor getItemImageDescriptor(Object item) {
- IItemLabelProvider labelProvider = (IItemLabelProvider)adapterFactory.adapt(item, IItemLabelProvider.class);
- if(labelProvider != null) {
- return ExtendedImageRegistry.getInstance().getImageDescriptor(labelProvider.getImage(item));
- }
- return null;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @generated
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getBundledImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(ID, path);
- }
-
- /**
- * Respects images residing in any plug-in. If path is relative, then this bundle is looked up
- * for the image, otherwise, for absolute path, first segment is taken as id of plug-in with
- * image
- *
- * @generated
- * @param path
- * the path to image, either absolute (with plug-in id as first segment), or relative
- * for bundled images
- * @return the image descriptor
- */
- public static ImageDescriptor findImageDescriptor(String path) {
- final IPath p = new Path(path);
- if(p.isAbsolute() && p.segmentCount() > 1) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p.removeFirstSegments(1).makeAbsolute().toString());
- } else {
- return getBundledImageDescriptor(p.makeAbsolute().toString());
- }
- }
-
- /**
- * Returns an image for the image file at the given plug-in relative path. Client do not need to
- * dispose this image. Images will be disposed automatically.
- *
- * @generated
- * @param path
- * the path
- * @return image instance
- */
- public Image getBundledImage(String path) {
- Image image = getImageRegistry().get(path);
- if(image == null) {
- getImageRegistry().put(path, getBundledImageDescriptor(path));
- image = getImageRegistry().get(path);
- }
- return image;
- }
-
- /**
- * Returns string from plug-in's resource bundle
- *
- * @generated
- */
- public static String getString(String key) {
- return Platform.getResourceString(getInstance().getBundle(), "%" + key); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- public UMLDocumentProvider getDocumentProvider() {
- if(documentProvider == null) {
- documentProvider = new UMLDocumentProvider();
- }
- return documentProvider;
- }
-
- /**
- * @generated
- */
- public UMLBaseItemSemanticEditPolicy.LinkConstraints getLinkConstraints() {
- return linkConstraints;
- }
-
- /**
- * @generated
- */
- public void setLinkConstraints(UMLBaseItemSemanticEditPolicy.LinkConstraints lc) {
- this.linkConstraints = lc;
- }
-
- /**
- * @generated
- */
- public ElementInitializers getElementInitializers() {
- return initializers;
- }
-
- /**
- * @generated
- */
- public void setElementInitializers(ElementInitializers i) {
- this.initializers = i;
- }
-
- /**
- * @generated
- */
- public UMLOCLFactory getUMLOCLFactory() {
- return oclFactory;
- }
-
- /**
- * @generated
- */
- public void setUMLOCLFactory(UMLOCLFactory f) {
- this.oclFactory = f;
- }
-
- /**
- * @generated
- */
- public void logError(String error) {
- logError(error, null);
- }
-
- /**
- * @generated
- */
- public void logError(String error, Throwable throwable) {
- if(error == null && throwable != null) {
- error = throwable.getMessage();
- }
- getLog().log(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, IStatus.OK, error, throwable));
- debug(error, throwable);
- }
-
- /**
- * @generated
- */
- public void logInfo(String message) {
- logInfo(message, null);
- }
-
- /**
- * @generated
- */
- public void logInfo(String message, Throwable throwable) {
- if(message == null && throwable != null) {
- message = throwable.getMessage();
- }
- getLog().log(new Status(IStatus.INFO, UMLDiagramEditorPlugin.ID, IStatus.OK, message, throwable));
- debug(message, throwable);
- }
-
- /**
- * @generated
- */
- private void debug(String message, Throwable throwable) {
- if(!isDebugging()) {
- return;
- }
- if(message != null) {
- System.err.println(message);
- }
- if(throwable != null) {
- throwable.printStackTrace();
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java
deleted file mode 100644
index de1c7576660..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramEditorUtil.java
+++ /dev/null
@@ -1,378 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class UMLDiagramEditorUtil {
-
- /**
- * @generated
- */
- public static Map<?, ?> getSaveOptions() {
- HashMap<String, Object> saveOptions = new HashMap<String, Object>();
- saveOptions.put(XMLResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$
- saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
- return saveOptions;
- }
-
- /**
- * @generated
- */
- public static boolean openDiagram(Resource diagram) throws PartInitException {
- String path = diagram.getURI().toPlatformString(true);
- IResource workspaceResource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(path));
- if(workspaceResource instanceof IFile) {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- return null != page.openEditor(new FileEditorInput((IFile)workspaceResource), UMLDiagramEditor.ID);
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static void setCharset(IFile file) {
- if(file == null) {
- return;
- }
- try {
- file.setCharset("UTF-8", new NullProgressMonitor()); //$NON-NLS-1$
- } catch (CoreException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to set charset for file " + file.getFullPath(), e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public static String getUniqueFileName(IPath containerFullPath, String fileName, String extension) {
- if(containerFullPath == null) {
- containerFullPath = new Path(""); //$NON-NLS-1$
- }
- if(fileName == null || fileName.trim().length() == 0) {
- fileName = "default"; //$NON-NLS-1$
- }
- IPath filePath = containerFullPath.append(fileName);
- if(extension != null && !extension.equals(filePath.getFileExtension())) {
- filePath = filePath.addFileExtension(extension);
- }
- extension = filePath.getFileExtension();
- fileName = filePath.removeFileExtension().lastSegment();
- int i = 1;
- while(ResourcesPlugin.getWorkspace().getRoot().exists(filePath)) {
- i++;
- filePath = containerFullPath.append(fileName + i);
- if(extension != null) {
- filePath = filePath.addFileExtension(extension);
- }
- }
- return filePath.lastSegment();
- }
-
- /**
- * Runs the wizard in a dialog.
- *
- * @generated
- */
- public static void runWizard(Shell shell, Wizard wizard, String settingsKey) {
- IDialogSettings pluginDialogSettings = UMLDiagramEditorPlugin.getInstance().getDialogSettings();
- IDialogSettings wizardDialogSettings = pluginDialogSettings.getSection(settingsKey);
- if(wizardDialogSettings == null) {
- wizardDialogSettings = pluginDialogSettings.addNewSection(settingsKey);
- }
- wizard.setDialogSettings(wizardDialogSettings);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500);
- dialog.open();
- }
-
- /**
- * This method should be called within a workspace modify operation since it creates resources.
- *
- * @generated
- */
- public static Resource createDiagram(URI diagramURI, URI modelURI, IProgressMonitor progressMonitor) {
- TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain();
- progressMonitor.beginTask(Messages.UMLDiagramEditorUtil_CreateDiagramProgressTask, 3);
- final Resource diagramResource = editingDomain.getResourceSet().createResource(diagramURI);
- final Resource modelResource = editingDomain.getResourceSet().createResource(modelURI);
- final String diagramName = diagramURI.lastSegment();
- AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain, Messages.UMLDiagramEditorUtil_CreateDiagramCommandLabel, Collections.EMPTY_LIST) {
-
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Package model = createInitialModel();
- attachModelToResource(model, modelResource);
-
- Diagram diagram = ViewService.createDiagram(model, PackageEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- if(diagram != null) {
- diagramResource.getContents().add(diagram);
- diagram.setName(diagramName);
- diagram.setElement(model);
- }
-
- try {
- modelResource.save(org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorUtil.getSaveOptions());
- diagramResource.save(org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorUtil.getSaveOptions());
- } catch (IOException e) {
-
- UMLDiagramEditorPlugin.getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$
- }
- return CommandResult.newOKCommandResult();
- }
- };
- try {
- OperationHistoryFactory.getOperationHistory().execute(command, new SubProgressMonitor(progressMonitor, 1), null);
- } catch (ExecutionException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
- }
- setCharset(WorkspaceSynchronizer.getFile(modelResource));
- setCharset(WorkspaceSynchronizer.getFile(diagramResource));
- return diagramResource;
- }
-
- /**
- * Create a new instance of domain element associated with canvas.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- private static Package createInitialModel() {
- return UMLFactory.eINSTANCE.createPackage();
- }
-
- /**
- * Store model element in the resource.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private static void attachModelToResource(Package model, Resource resource) {
- resource.getContents().add(model);
- }
-
- /**
- * @generated
- */
- public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
- diagramPart.getDiagramGraphicalViewer().deselectAll();
-
- EditPart firstPrimary = null;
- for(EditPart nextPart : editParts) {
- diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
- if(firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
- firstPrimary = nextPart;
- }
- }
-
- if(!editParts.isEmpty()) {
- diagramPart.getDiagramGraphicalViewer().reveal(firstPrimary != null ? firstPrimary : (EditPart)editParts.get(0));
- }
- }
-
- /**
- * @generated
- */
- private static int findElementsInDiagramByID(DiagramEditPart diagramPart, EObject element, List<EditPart> editPartCollector) {
- IDiagramGraphicalViewer viewer = (IDiagramGraphicalViewer)diagramPart.getViewer();
- final int intialNumOfEditParts = editPartCollector.size();
-
- if(element instanceof View) { // support notation element lookup
- EditPart editPart = (EditPart)viewer.getEditPartRegistry().get(element);
- if(editPart != null) {
- editPartCollector.add(editPart);
- return 1;
- }
- }
-
- String elementID = EMFCoreUtil.getProxyID(element);
- @SuppressWarnings("unchecked")
- List<EditPart> associatedParts = viewer.findEditPartsForElement(elementID, IGraphicalEditPart.class);
- // perform the possible hierarchy disjoint -> take the top-most parts only
- for(EditPart nextPart : associatedParts) {
- EditPart parentPart = nextPart.getParent();
- while(parentPart != null && !associatedParts.contains(parentPart)) {
- parentPart = parentPart.getParent();
- }
- if(parentPart == null) {
- editPartCollector.add(nextPart);
- }
- }
-
- if(intialNumOfEditParts == editPartCollector.size()) {
- if(!associatedParts.isEmpty()) {
- editPartCollector.add(associatedParts.get(0));
- } else {
- if(element.eContainer() != null) {
- return findElementsInDiagramByID(diagramPart, element.eContainer(), editPartCollector);
- }
- }
- }
- return editPartCollector.size() - intialNumOfEditParts;
- }
-
- /**
- * @generated
- */
- public static View findView(DiagramEditPart diagramEditPart, EObject targetElement, LazyElement2ViewMap lazyElement2ViewMap) {
- boolean hasStructuralURI = false;
- if(targetElement.eResource() instanceof XMLResource) {
- hasStructuralURI = ((XMLResource)targetElement.eResource()).getID(targetElement) == null;
- }
-
- View view = null;
- LinkedList<EditPart> editPartHolder = new LinkedList<EditPart>();
- if(hasStructuralURI && !lazyElement2ViewMap.getElement2ViewMap().isEmpty()) {
- view = lazyElement2ViewMap.getElement2ViewMap().get(targetElement);
- } else if(findElementsInDiagramByID(diagramEditPart, targetElement, editPartHolder) > 0) {
- EditPart editPart = editPartHolder.get(0);
- view = editPart.getModel() instanceof View ? (View)editPart.getModel() : null;
- }
-
- return (view == null) ? diagramEditPart.getDiagramView() : view;
- }
-
- /**
- * @generated
- */
- public static class LazyElement2ViewMap {
-
- /**
- * @generated
- */
- private Map<EObject, View> element2ViewMap;
-
- /**
- * @generated
- */
- private View scope;
-
- /**
- * @generated
- */
- private Set<? extends EObject> elementSet;
-
- /**
- * @generated
- */
- public LazyElement2ViewMap(View scope, Set<? extends EObject> elements) {
- this.scope = scope;
- this.elementSet = elements;
- }
-
- /**
- * @generated
- */
- public final Map<EObject, View> getElement2ViewMap() {
- if(element2ViewMap == null) {
- element2ViewMap = new HashMap<EObject, View>();
- // map possible notation elements to itself as these can't be found by view.getElement()
- for(EObject element : elementSet) {
- if(element instanceof View) {
- View view = (View)element;
- if(view.getDiagram() == scope.getDiagram()) {
- element2ViewMap.put(element, view); // take only those that part of our diagram
- }
- }
- }
-
- buildElement2ViewMap(scope, element2ViewMap, elementSet);
- }
- return element2ViewMap;
- }
-
- /**
- * @generated
- */
- private static boolean buildElement2ViewMap(View parentView, Map<EObject, View> element2ViewMap, Set<? extends EObject> elements) {
- if(elements.size() == element2ViewMap.size()) {
- return true;
- }
-
- if(parentView.isSetElement() && !element2ViewMap.containsKey(parentView.getElement()) && elements.contains(parentView.getElement())) {
- element2ViewMap.put(parentView.getElement(), parentView);
- if(elements.size() == element2ViewMap.size()) {
- return true;
- }
- }
- boolean complete = false;
- for(Iterator<?> it = parentView.getChildren().iterator(); it.hasNext() && !complete;) {
- complete = buildElement2ViewMap((View)it.next(), element2ViewMap, elements);
- }
- for(Iterator<?> it = parentView.getSourceEdges().iterator(); it.hasNext() && !complete;) {
- complete = buildElement2ViewMap((View)it.next(), element2ViewMap, elements);
- }
- for(Iterator<?> it = parentView.getTargetEdges().iterator(); it.hasNext() && !complete;) {
- complete = buildElement2ViewMap((View)it.next(), element2ViewMap, elements);
- }
- return complete;
- }
- } // LazyElement2ViewMap
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdateCommand.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdateCommand.java
deleted file mode 100644
index 498836c2518..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdateCommand.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @generated
- */
-public class UMLDiagramUpdateCommand implements IHandler {
-
- /**
- * @generated
- */
- public void addHandlerListener(IHandlerListener handlerListener) {
- }
-
- /**
- * @generated
- */
- public void dispose() {
- }
-
- /**
- * @generated
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
- if(selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection)selection;
- if(structuredSelection.size() != 1) {
- return null;
- }
- if(structuredSelection.getFirstElement() instanceof EditPart && ((EditPart)structuredSelection.getFirstElement()).getModel() instanceof View) {
- EObject modelElement = ((View)((EditPart)structuredSelection.getFirstElement()).getModel()).getElement();
- List editPolicies = CanonicalEditPolicy.getRegisteredEditPolicies(modelElement);
- for(Iterator it = editPolicies.iterator(); it.hasNext();) {
- CanonicalEditPolicy nextEditPolicy = (CanonicalEditPolicy)it.next();
- nextEditPolicy.refresh();
- }
-
- }
- }
- return null;
- }
-
- /**
- * @generated
- */
- public boolean isEnabled() {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean isHandled() {
- return true;
- }
-
- /**
- * @generated
- */
- public void removeHandlerListener(IHandlerListener handlerListener) {
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java
deleted file mode 100644
index 1f181a88a23..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDiagramUpdater.java
+++ /dev/null
@@ -1,2518 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.TimeConstraintHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.TimeObservationHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart;
-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.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.ActionExecutionSpecification;
-import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.ConsiderIgnoreFragment;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Continuation;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.GeneralOrdering;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-import org.eclipse.uml2.uml.InteractionUse;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.PackageableElement;
-import org.eclipse.uml2.uml.StateInvariant;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.TimeObservation;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class UMLDiagramUpdater {
-
- /**
- * @generated
- */
- public static List<UMLNodeDescriptor> getSemanticChildren(View view) {
- switch(UMLVisualIDRegistry.getVisualID(view)) {
- case PackageEditPart.VISUAL_ID:
- return getPackage_1000SemanticChildren(view);
- case InteractionEditPart.VISUAL_ID:
- return getInteraction_2001SemanticChildren(view);
- case InteractionOperandEditPart.VISUAL_ID:
- return getInteractionOperand_3005SemanticChildren(view);
- case LifelineEditPart.VISUAL_ID:
- return getLifeline_3001SemanticChildren(view);
- case InteractionInteractionCompartmentEditPart.VISUAL_ID:
- return getInteractionInteractionCompartment_7001SemanticChildren(view);
- case CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID:
- return getCombinedFragmentCombinedFragmentCompartment_7004SemanticChildren(view);
- }
- return Collections.emptyList();
- }
-
- /**
- * @generated NOT remove fake children for messages (DurationConstraintInMessageEditPart/DurationObservationEditPart)
- */
- public static List getInteraction_2001SemanticChildren(View view) {
- if(!view.isSetElement()) {
- return Collections.EMPTY_LIST;
- }
- Interaction modelElement = (Interaction)view.getElement();
- List result = new LinkedList();
- // remove fake children for messages (DurationConstraintInMessageEditPart/DurationObservationEditPart)
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLNodeDescriptor> getInteractionOperand_3005SemanticChildren(View view) {
- if(!view.isSetElement()) {
- return Collections.EMPTY_LIST;
- }
- InteractionOperand modelElement = (InteractionOperand)view.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for(Iterator<?> it = modelElement.getFragments().iterator(); it.hasNext();) {
- InteractionFragment childElement = (InteractionFragment)it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if(visualID == InteractionUseEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if(visualID == ConsiderIgnoreFragmentEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if(visualID == CombinedFragmentEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for(Iterator<?> it = modelElement.getFragments().iterator(); it.hasNext();) {
- InteractionFragment childElement = (InteractionFragment)it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if(visualID == ContinuationEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated NOT (update at each lifeline modification) Added code for manage ExecutionSpecification, handle TimeConstraintEditPart and
- * DurationConstraintEditPart children, handle TimeObservationEditPart children
- */
- public static List getLifeline_3001SemanticChildren(View view) {
- if(!view.isSetElement()) {
- return Collections.EMPTY_LIST;
- }
- Lifeline modelElement = (Lifeline)view.getElement();
- List result = new LinkedList();
-
- // Added code for manage ExecutionSpecification
- if(modelElement instanceof Lifeline) {
- if((modelElement).getCoveredBys().size() > 0) {
- Interaction interaction = modelElement.getInteraction();
-
- for(Iterator values = interaction.getFragments().iterator(); values.hasNext();) {
- EObject nextValue = (EObject)values.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, nextValue);
- if(BehaviorExecutionSpecificationEditPart.VISUAL_ID == visualID) {
- BehaviorExecutionSpecification be = (BehaviorExecutionSpecification)nextValue;
- if(be.getCovereds().size() > 0 && be.getCovereds().get(0) == modelElement) {
- // result.add(nextValue);
- result.add(new UMLNodeDescriptor(be, visualID));
- }
- } else if(ActionExecutionSpecificationEditPart.VISUAL_ID == visualID) {
- ActionExecutionSpecification ae = (ActionExecutionSpecification)nextValue;
- if(ae.getCovereds().size() > 0 && ae.getCovereds().get(0) == modelElement) {
- result.add(new UMLNodeDescriptor(ae, visualID));
- }
- } else if(StateInvariantEditPart.VISUAL_ID == visualID) {
- StateInvariant ae = (StateInvariant)nextValue;
- if(ae.getCovereds().size() > 0 && ae.getCovereds().get(0) == modelElement) {
- result.add(new UMLNodeDescriptor(ae, visualID));
- }
- } else if(CombinedFragment2EditPart.VISUAL_ID == visualID) {
- CombinedFragment ae = (CombinedFragment)nextValue;
- if(ae.getCovereds().size() > 0 && ae.getCovereds().get(0) == modelElement) {
- result.add(new UMLNodeDescriptor(ae, visualID));
- }
- }
- }
- }
- }
- /*
- * Autogenerated code not valid for (Iterator it = modelElement.getFragments().iterator();
- * it.hasNext();) { InteractionFragment childElement = (InteractionFragment) it.next(); int
- * visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement); if (visualID ==
- * BehaviorExecutionSpecificationEditPart.VISUAL_ID) { result.add(new
- * UMLNodeDescriptor(childElement, visualID)); continue; } }
- */
-
- // handle TimeConstraintEditPart and DurationConstraintEditPart children
- if(modelElement instanceof Lifeline) {
- for(InteractionFragment covering : modelElement.getCoveredBys()) {
- for(TimeConstraint childElement : TimeConstraintHelper.getTimeConstraintsOn(covering)) {
- // block from generated code
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if(visualID == TimeConstraintEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for(DurationConstraint childElement : DurationConstraintHelper.getDurationConstraintsOn(covering)) {
- // block from generated code
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if(visualID == DurationConstraintEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- }
- }
-
- // handle TimeObservationEditPart children
- if(modelElement instanceof Lifeline) {
- for(InteractionFragment covering : modelElement.getCoveredBys()) {
- for(TimeObservation childElement : TimeObservationHelper.getTimeObservations(covering)) {
- // block from generated code
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if(visualID == TimeObservationEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLNodeDescriptor> getInteractionInteractionCompartment_7001SemanticChildren(View view) {
- if(false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View)view.eContainer();
- if(!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Interaction modelElement = (Interaction)containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for(Iterator<?> it = modelElement.getFragments().iterator(); it.hasNext();) {
- InteractionFragment childElement = (InteractionFragment)it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if(visualID == ConsiderIgnoreFragmentEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if(visualID == CombinedFragmentEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if(visualID == InteractionUseEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for(Iterator<?> it = modelElement.getLifelines().iterator(); it.hasNext();) {
- Lifeline childElement = (Lifeline)it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if(visualID == LifelineEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for(Iterator<?> it = modelElement.getOwnedRules().iterator(); it.hasNext();) {
- Constraint childElement = (Constraint)it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if(visualID == ConstraintEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
- Comment childElement = (Comment)it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if(visualID == CommentEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLNodeDescriptor> getCombinedFragmentCombinedFragmentCompartment_7004SemanticChildren(View view) {
- if(false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View)view.eContainer();
- if(!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- CombinedFragment modelElement = (CombinedFragment)containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for(Iterator<?> it = modelElement.getOperands().iterator(); it.hasNext();) {
- InteractionOperand childElement = (InteractionOperand)it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if(visualID == InteractionOperandEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLNodeDescriptor> getPackage_1000SemanticChildren(View view) {
- if(!view.isSetElement()) {
- return Collections.EMPTY_LIST;
- }
- Package modelElement = (Package)view.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for(Iterator<?> it = modelElement.getPackagedElements().iterator(); it.hasNext();) {
- PackageableElement childElement = (PackageableElement)it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if(visualID == InteractionEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getContainedLinks(View view) {
- switch(UMLVisualIDRegistry.getVisualID(view)) {
- case PackageEditPart.VISUAL_ID:
- return getPackage_1000ContainedLinks(view);
- case InteractionEditPart.VISUAL_ID:
- return getInteraction_2001ContainedLinks(view);
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- return getConsiderIgnoreFragment_3007ContainedLinks(view);
- case CombinedFragmentEditPart.VISUAL_ID:
- return getCombinedFragment_3004ContainedLinks(view);
- case InteractionOperandEditPart.VISUAL_ID:
- return getInteractionOperand_3005ContainedLinks(view);
- case InteractionUseEditPart.VISUAL_ID:
- return getInteractionUse_3002ContainedLinks(view);
- case ContinuationEditPart.VISUAL_ID:
- return getContinuation_3016ContainedLinks(view);
- case LifelineEditPart.VISUAL_ID:
- return getLifeline_3001ContainedLinks(view);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- return getActionExecutionSpecification_3006ContainedLinks(view);
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- return getBehaviorExecutionSpecification_3003ContainedLinks(view);
- case StateInvariantEditPart.VISUAL_ID:
- return getStateInvariant_3017ContainedLinks(view);
- case CombinedFragment2EditPart.VISUAL_ID:
- return getCombinedFragment_3018ContainedLinks(view);
- case TimeConstraintEditPart.VISUAL_ID:
- return getTimeConstraint_3019ContainedLinks(view);
- case TimeObservationEditPart.VISUAL_ID:
- return getTimeObservation_3020ContainedLinks(view);
- case DurationConstraintEditPart.VISUAL_ID:
- return getDurationConstraint_3021ContainedLinks(view);
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return getDestructionOccurrenceSpecification_3022ContainedLinks(view);
- case ConstraintEditPart.VISUAL_ID:
- return getConstraint_3008ContainedLinks(view);
- case CommentEditPart.VISUAL_ID:
- return getComment_3009ContainedLinks(view);
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return getDurationConstraint_3023ContainedLinks(view);
- case DurationObservationEditPart.VISUAL_ID:
- return getDurationObservation_3024ContainedLinks(view);
- case MessageEditPart.VISUAL_ID:
- return getMessage_4003ContainedLinks(view);
- case Message2EditPart.VISUAL_ID:
- return getMessage_4004ContainedLinks(view);
- case Message3EditPart.VISUAL_ID:
- return getMessage_4005ContainedLinks(view);
- case Message4EditPart.VISUAL_ID:
- return getMessage_4006ContainedLinks(view);
- case Message5EditPart.VISUAL_ID:
- return getMessage_4007ContainedLinks(view);
- case Message6EditPart.VISUAL_ID:
- return getMessage_4008ContainedLinks(view);
- case Message7EditPart.VISUAL_ID:
- return getMessage_4009ContainedLinks(view);
- case GeneralOrderingEditPart.VISUAL_ID:
- return getGeneralOrdering_4012ContainedLinks(view);
- }
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getIncomingLinks(View view) {
- switch(UMLVisualIDRegistry.getVisualID(view)) {
- case InteractionEditPart.VISUAL_ID:
- return getInteraction_2001IncomingLinks(view);
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- return getConsiderIgnoreFragment_3007IncomingLinks(view);
- case CombinedFragmentEditPart.VISUAL_ID:
- return getCombinedFragment_3004IncomingLinks(view);
- case InteractionOperandEditPart.VISUAL_ID:
- return getInteractionOperand_3005IncomingLinks(view);
- case InteractionUseEditPart.VISUAL_ID:
- return getInteractionUse_3002IncomingLinks(view);
- case ContinuationEditPart.VISUAL_ID:
- return getContinuation_3016IncomingLinks(view);
- case LifelineEditPart.VISUAL_ID:
- return getLifeline_3001IncomingLinks(view);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- return getActionExecutionSpecification_3006IncomingLinks(view);
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- return getBehaviorExecutionSpecification_3003IncomingLinks(view);
- case StateInvariantEditPart.VISUAL_ID:
- return getStateInvariant_3017IncomingLinks(view);
- case CombinedFragment2EditPart.VISUAL_ID:
- return getCombinedFragment_3018IncomingLinks(view);
- case TimeConstraintEditPart.VISUAL_ID:
- return getTimeConstraint_3019IncomingLinks(view);
- case TimeObservationEditPart.VISUAL_ID:
- return getTimeObservation_3020IncomingLinks(view);
- case DurationConstraintEditPart.VISUAL_ID:
- return getDurationConstraint_3021IncomingLinks(view);
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return getDestructionOccurrenceSpecification_3022IncomingLinks(view);
- case ConstraintEditPart.VISUAL_ID:
- return getConstraint_3008IncomingLinks(view);
- case CommentEditPart.VISUAL_ID:
- return getComment_3009IncomingLinks(view);
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return getDurationConstraint_3023IncomingLinks(view);
- case DurationObservationEditPart.VISUAL_ID:
- return getDurationObservation_3024IncomingLinks(view);
- case MessageEditPart.VISUAL_ID:
- return getMessage_4003IncomingLinks(view);
- case Message2EditPart.VISUAL_ID:
- return getMessage_4004IncomingLinks(view);
- case Message3EditPart.VISUAL_ID:
- return getMessage_4005IncomingLinks(view);
- case Message4EditPart.VISUAL_ID:
- return getMessage_4006IncomingLinks(view);
- case Message5EditPart.VISUAL_ID:
- return getMessage_4007IncomingLinks(view);
- case Message6EditPart.VISUAL_ID:
- return getMessage_4008IncomingLinks(view);
- case Message7EditPart.VISUAL_ID:
- return getMessage_4009IncomingLinks(view);
- case GeneralOrderingEditPart.VISUAL_ID:
- return getGeneralOrdering_4012IncomingLinks(view);
- }
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getOutgoingLinks(View view) {
- switch(UMLVisualIDRegistry.getVisualID(view)) {
- case InteractionEditPart.VISUAL_ID:
- return getInteraction_2001OutgoingLinks(view);
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- return getConsiderIgnoreFragment_3007OutgoingLinks(view);
- case CombinedFragmentEditPart.VISUAL_ID:
- return getCombinedFragment_3004OutgoingLinks(view);
- case InteractionOperandEditPart.VISUAL_ID:
- return getInteractionOperand_3005OutgoingLinks(view);
- case InteractionUseEditPart.VISUAL_ID:
- return getInteractionUse_3002OutgoingLinks(view);
- case ContinuationEditPart.VISUAL_ID:
- return getContinuation_3016OutgoingLinks(view);
- case LifelineEditPart.VISUAL_ID:
- return getLifeline_3001OutgoingLinks(view);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- return getActionExecutionSpecification_3006OutgoingLinks(view);
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- return getBehaviorExecutionSpecification_3003OutgoingLinks(view);
- case StateInvariantEditPart.VISUAL_ID:
- return getStateInvariant_3017OutgoingLinks(view);
- case CombinedFragment2EditPart.VISUAL_ID:
- return getCombinedFragment_3018OutgoingLinks(view);
- case TimeConstraintEditPart.VISUAL_ID:
- return getTimeConstraint_3019OutgoingLinks(view);
- case TimeObservationEditPart.VISUAL_ID:
- return getTimeObservation_3020OutgoingLinks(view);
- case DurationConstraintEditPart.VISUAL_ID:
- return getDurationConstraint_3021OutgoingLinks(view);
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return getDestructionOccurrenceSpecification_3022OutgoingLinks(view);
- case ConstraintEditPart.VISUAL_ID:
- return getConstraint_3008OutgoingLinks(view);
- case CommentEditPart.VISUAL_ID:
- return getComment_3009OutgoingLinks(view);
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return getDurationConstraint_3023OutgoingLinks(view);
- case DurationObservationEditPart.VISUAL_ID:
- return getDurationObservation_3024OutgoingLinks(view);
- case MessageEditPart.VISUAL_ID:
- return getMessage_4003OutgoingLinks(view);
- case Message2EditPart.VISUAL_ID:
- return getMessage_4004OutgoingLinks(view);
- case Message3EditPart.VISUAL_ID:
- return getMessage_4005OutgoingLinks(view);
- case Message4EditPart.VISUAL_ID:
- return getMessage_4006OutgoingLinks(view);
- case Message5EditPart.VISUAL_ID:
- return getMessage_4007OutgoingLinks(view);
- case Message6EditPart.VISUAL_ID:
- return getMessage_4008OutgoingLinks(view);
- case Message7EditPart.VISUAL_ID:
- return getMessage_4009OutgoingLinks(view);
- case GeneralOrderingEditPart.VISUAL_ID:
- return getGeneralOrdering_4012OutgoingLinks(view);
- }
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getPackage_1000ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getInteraction_2001ContainedLinks(View view) {
- Interaction modelElement = (Interaction)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Message_4009(modelElement));
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getLifeline_3001ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getBehaviorExecutionSpecification_3003ContainedLinks(View view) {
- BehaviorExecutionSpecification modelElement = (BehaviorExecutionSpecification)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getStateInvariant_3017ContainedLinks(View view) {
- StateInvariant modelElement = (StateInvariant)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getCombinedFragment_3018ContainedLinks(View view) {
- CombinedFragment modelElement = (CombinedFragment)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getTimeConstraint_3019ContainedLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getTimeObservation_3020ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDurationConstraint_3021ContainedLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDestructionOccurrenceSpecification_3022ContainedLinks(View view) {
- DestructionOccurrenceSpecification modelElement = (DestructionOccurrenceSpecification)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getActionExecutionSpecification_3006ContainedLinks(View view) {
- ActionExecutionSpecification modelElement = (ActionExecutionSpecification)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getInteractionUse_3002ContainedLinks(View view) {
- InteractionUse modelElement = (InteractionUse)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getCombinedFragment_3004ContainedLinks(View view) {
- CombinedFragment modelElement = (CombinedFragment)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getInteractionOperand_3005ContainedLinks(View view) {
- InteractionOperand modelElement = (InteractionOperand)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getContinuation_3016ContainedLinks(View view) {
- Continuation modelElement = (Continuation)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getConstraint_3008ContainedLinks(View view) {
- Constraint modelElement = (Constraint)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getComment_3009ContainedLinks(View view) {
- Comment modelElement = (Comment)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDurationConstraint_3023ContainedLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDurationObservation_3024ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getConsiderIgnoreFragment_3007ContainedLinks(View view) {
- ConsiderIgnoreFragment modelElement = (ConsiderIgnoreFragment)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4003ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4004ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4005ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4006ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4007ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4008ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4009ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getGeneralOrdering_4012ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getInteraction_2001IncomingLinks(View view) {
- Interaction modelElement = (Interaction)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getLifeline_3001IncomingLinks(View view) {
- Lifeline modelElement = (Lifeline)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getBehaviorExecutionSpecification_3003IncomingLinks(View view) {
- BehaviorExecutionSpecification modelElement = (BehaviorExecutionSpecification)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getStateInvariant_3017IncomingLinks(View view) {
- StateInvariant modelElement = (StateInvariant)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getCombinedFragment_3018IncomingLinks(View view) {
- CombinedFragment modelElement = (CombinedFragment)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getTimeConstraint_3019IncomingLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getTimeObservation_3020IncomingLinks(View view) {
- TimeObservation modelElement = (TimeObservation)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDurationConstraint_3021IncomingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDestructionOccurrenceSpecification_3022IncomingLinks(View view) {
- DestructionOccurrenceSpecification modelElement = (DestructionOccurrenceSpecification)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_GeneralOrdering_4012(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getActionExecutionSpecification_3006IncomingLinks(View view) {
- ActionExecutionSpecification modelElement = (ActionExecutionSpecification)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getInteractionUse_3002IncomingLinks(View view) {
- InteractionUse modelElement = (InteractionUse)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getCombinedFragment_3004IncomingLinks(View view) {
- CombinedFragment modelElement = (CombinedFragment)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getInteractionOperand_3005IncomingLinks(View view) {
- InteractionOperand modelElement = (InteractionOperand)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getContinuation_3016IncomingLinks(View view) {
- Continuation modelElement = (Continuation)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getConstraint_3008IncomingLinks(View view) {
- Constraint modelElement = (Constraint)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getComment_3009IncomingLinks(View view) {
- Comment modelElement = (Comment)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDurationConstraint_3023IncomingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDurationObservation_3024IncomingLinks(View view) {
- DurationObservation modelElement = (DurationObservation)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getConsiderIgnoreFragment_3007IncomingLinks(View view) {
- ConsiderIgnoreFragment modelElement = (ConsiderIgnoreFragment)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4003IncomingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4004IncomingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4005IncomingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4006IncomingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4007IncomingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4008IncomingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4009IncomingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getGeneralOrdering_4012IncomingLinks(View view) {
- GeneralOrdering modelElement = (GeneralOrdering)view.getElement();
- Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Message_4003(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4004(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4005(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4006(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4007(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4008(modelElement, crossReferences));
- result.addAll(getIncomingTypeModelFacetLinks_Message_4009(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement, crossReferences));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement, crossReferences));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getInteraction_2001OutgoingLinks(View view) {
- Interaction modelElement = (Interaction)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getLifeline_3001OutgoingLinks(View view) {
- Lifeline modelElement = (Lifeline)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getBehaviorExecutionSpecification_3003OutgoingLinks(View view) {
- BehaviorExecutionSpecification modelElement = (BehaviorExecutionSpecification)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getStateInvariant_3017OutgoingLinks(View view) {
- StateInvariant modelElement = (StateInvariant)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getCombinedFragment_3018OutgoingLinks(View view) {
- CombinedFragment modelElement = (CombinedFragment)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getTimeConstraint_3019OutgoingLinks(View view) {
- TimeConstraint modelElement = (TimeConstraint)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getTimeObservation_3020OutgoingLinks(View view) {
- TimeObservation modelElement = (TimeObservation)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDurationConstraint_3021OutgoingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDestructionOccurrenceSpecification_3022OutgoingLinks(View view) {
- DestructionOccurrenceSpecification modelElement = (DestructionOccurrenceSpecification)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_GeneralOrdering_4012(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getActionExecutionSpecification_3006OutgoingLinks(View view) {
- ActionExecutionSpecification modelElement = (ActionExecutionSpecification)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getInteractionUse_3002OutgoingLinks(View view) {
- InteractionUse modelElement = (InteractionUse)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getCombinedFragment_3004OutgoingLinks(View view) {
- CombinedFragment modelElement = (CombinedFragment)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getInteractionOperand_3005OutgoingLinks(View view) {
- InteractionOperand modelElement = (InteractionOperand)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getContinuation_3016OutgoingLinks(View view) {
- Continuation modelElement = (Continuation)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getConstraint_3008OutgoingLinks(View view) {
- Constraint modelElement = (Constraint)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getComment_3009OutgoingLinks(View view) {
- Comment modelElement = (Comment)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDurationConstraint_3023OutgoingLinks(View view) {
- DurationConstraint modelElement = (DurationConstraint)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getDurationObservation_3024OutgoingLinks(View view) {
- DurationObservation modelElement = (DurationObservation)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getConsiderIgnoreFragment_3007OutgoingLinks(View view) {
- ConsiderIgnoreFragment modelElement = (ConsiderIgnoreFragment)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4003OutgoingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4004OutgoingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4005OutgoingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4006OutgoingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4007OutgoingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4008OutgoingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getMessage_4009OutgoingLinks(View view) {
- Message modelElement = (Message)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public static List<UMLLinkDescriptor> getGeneralOrdering_4012OutgoingLinks(View view) {
- GeneralOrdering modelElement = (GeneralOrdering)view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4003(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4004(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4005(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4006(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4007(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4008(modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Message_4009(modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Message_4003(Interaction container) {
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(MessageEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4003, MessageEditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Message_4004(Interaction container) {
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message2EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4004, Message2EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Message_4005(Interaction container) {
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message3EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4005, Message3EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Message_4006(Interaction container) {
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message4EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4006, Message4EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Message_4007(Interaction container) {
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message5EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4007, Message5EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Message_4008(Interaction container) {
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message6EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4008, Message6EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Message_4009(Interaction container) {
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message7EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4009, Message7EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_GeneralOrdering_4012(InteractionFragment container) {
- Collection result = new LinkedList();
- for(Iterator links = container.getGeneralOrderings().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof GeneralOrdering) {
- continue;
- }
- GeneralOrdering link = (GeneralOrdering)linkObject;
- if(GeneralOrderingEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- OccurrenceSpecification dst = link.getAfter();
- OccurrenceSpecification src = link.getBefore();
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.GeneralOrdering_4012, GeneralOrderingEditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Message_4003(Element target, Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferences.get(target);
- for(EStructuralFeature.Setting setting : settings) {
- if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getElement_OwnedElement() || false == setting.getEObject() instanceof Message) {
- continue;
- }
- Message link = (Message)setting.getEObject();
- if(MessageEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Message_4003, MessageEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Message_4004(Element target, Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferences.get(target);
- for(EStructuralFeature.Setting setting : settings) {
- if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getElement_OwnedElement() || false == setting.getEObject() instanceof Message) {
- continue;
- }
- Message link = (Message)setting.getEObject();
- if(Message2EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Message_4004, Message2EditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Message_4005(Element target, Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferences.get(target);
- for(EStructuralFeature.Setting setting : settings) {
- if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getElement_OwnedElement() || false == setting.getEObject() instanceof Message) {
- continue;
- }
- Message link = (Message)setting.getEObject();
- if(Message3EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Message_4005, Message3EditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Message_4006(Element target, Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferences.get(target);
- for(EStructuralFeature.Setting setting : settings) {
- if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getElement_OwnedElement() || false == setting.getEObject() instanceof Message) {
- continue;
- }
- Message link = (Message)setting.getEObject();
- if(Message4EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Message_4006, Message4EditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Message_4007(Element target, Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferences.get(target);
- for(EStructuralFeature.Setting setting : settings) {
- if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getElement_OwnedElement() || false == setting.getEObject() instanceof Message) {
- continue;
- }
- Message link = (Message)setting.getEObject();
- if(Message5EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Message_4007, Message5EditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Message_4008(Element target, Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferences.get(target);
- for(EStructuralFeature.Setting setting : settings) {
- if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getElement_OwnedElement() || false == setting.getEObject() instanceof Message) {
- continue;
- }
- Message link = (Message)setting.getEObject();
- if(Message6EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Message_4008, Message6EditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Message_4009(Element target, Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferences.get(target);
- for(EStructuralFeature.Setting setting : settings) {
- if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getElement_OwnedElement() || false == setting.getEObject() instanceof Message) {
- continue;
- }
- Message link = (Message)setting.getEObject();
- if(Message7EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- Element src = link.getOwner();
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Message_4009, Message7EditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(Element target, Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferences.get(target);
- for(EStructuralFeature.Setting setting : settings) {
- if(setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getComment_AnnotatedElement()) {
- result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.CommentAnnotatedElement_4010, CommentAnnotatedElementEditPart.VISUAL_ID));
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(Element target, Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferences.get(target);
- for(EStructuralFeature.Setting setting : settings) {
- if(setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getConstraint_ConstrainedElement()) {
- result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.ConstraintConstrainedElement_4011, ConstraintConstrainedElementEditPart.VISUAL_ID));
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_GeneralOrdering_4012(OccurrenceSpecification target, Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferences.get(target);
- for(EStructuralFeature.Setting setting : settings) {
- if(setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getGeneralOrdering_After() || false == setting.getEObject() instanceof GeneralOrdering) {
- continue;
- }
- GeneralOrdering link = (GeneralOrdering)setting.getEObject();
- if(GeneralOrderingEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- OccurrenceSpecification src = link.getBefore();
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.GeneralOrdering_4012, GeneralOrderingEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Message_4003(Element source) {
- Interaction container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null && container == null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- container = (Interaction)element;
- }
- }
- if(container == null) {
- return Collections.emptyList();
- }
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(MessageEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- if(src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4003, MessageEditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Message_4004(Element source) {
- Interaction container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null && container == null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- container = (Interaction)element;
- }
- }
- if(container == null) {
- return Collections.emptyList();
- }
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message2EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- if(src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4004, Message2EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Message_4005(Element source) {
- Interaction container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null && container == null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- container = (Interaction)element;
- }
- }
- if(container == null) {
- return Collections.emptyList();
- }
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message3EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- if(src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4005, Message3EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Message_4006(Element source) {
- Interaction container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null && container == null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- container = (Interaction)element;
- }
- }
- if(container == null) {
- return Collections.emptyList();
- }
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message4EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- if(src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4006, Message4EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Message_4007(Element source) {
- Interaction container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null && container == null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- container = (Interaction)element;
- }
- }
- if(container == null) {
- return Collections.emptyList();
- }
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message5EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- if(src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4007, Message5EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Message_4008(Element source) {
- Interaction container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null && container == null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- container = (Interaction)element;
- }
- }
- if(container == null) {
- return Collections.emptyList();
- }
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message6EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- if(src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4008, Message6EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Message_4009(Element source) {
- Interaction container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null && container == null; element = element.eContainer()) {
- if(element instanceof Interaction) {
- container = (Interaction)element;
- }
- }
- if(container == null) {
- return Collections.emptyList();
- }
- Collection result = new LinkedList();
- for(Iterator links = container.getMessages().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof Message) {
- continue;
- }
- Message link = (Message)linkObject;
- if(Message7EditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- List targets = link.getOwnedElements();
- Object theTarget = targets.size() == 1 ? targets.get(0) : null;
- if(false == theTarget instanceof Element) {
- continue;
- }
- Element dst = (Element)theTarget;
- Element src = link.getOwner();
- if(src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Message_4009, Message7EditPart.VISUAL_ID));
-
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4010(Comment source) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for(Iterator<?> destinations = source.getAnnotatedElements().iterator(); destinations.hasNext();) {
- Element destination = (Element)destinations.next();
- result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.CommentAnnotatedElement_4010, CommentAnnotatedElementEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4011(Constraint source) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for(Iterator<?> destinations = source.getConstrainedElements().iterator(); destinations.hasNext();) {
- Element destination = (Element)destinations.next();
- result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.ConstraintConstrainedElement_4011, ConstraintConstrainedElementEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private static Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_GeneralOrdering_4012(OccurrenceSpecification source) {
- InteractionFragment container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null && container == null; element = element.eContainer()) {
- if(element instanceof InteractionFragment) {
- container = (InteractionFragment)element;
- }
- }
- if(container == null) {
- return Collections.emptyList();
- }
- Collection result = new LinkedList();
- for(Iterator links = container.getGeneralOrderings().iterator(); links.hasNext();) {
- EObject linkObject = (EObject)links.next();
- if(false == linkObject instanceof GeneralOrdering) {
- continue;
- }
- GeneralOrdering link = (GeneralOrdering)linkObject;
- if(GeneralOrderingEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
-
- OccurrenceSpecification dst = link.getAfter();
- OccurrenceSpecification src = link.getBefore();
- if(src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.GeneralOrdering_4012, GeneralOrderingEditPart.VISUAL_ID));
-
- }
- return result;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDocumentProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDocumentProvider.java
deleted file mode 100644
index 4615f6f46fc..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLDocumentProvider.java
+++ /dev/null
@@ -1,988 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.NotificationFilter;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.DiagramEditingDomainFactory;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocumentProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.EditorStatusCodes;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.util.DiagramIOUtil;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-
-/**
- * @generated
- */
-public class UMLDocumentProvider extends AbstractDocumentProvider implements IDiagramDocumentProvider {
-
- /**
- * @generated
- */
- protected ElementInfo createElementInfo(Object element) throws CoreException {
- if(false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, NLS.bind(Messages.UMLDocumentProvider_IncorrectInputError, new Object[]{ element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- IEditorInput editorInput = (IEditorInput)element;
- IDiagramDocument document = (IDiagramDocument)createDocument(editorInput);
-
- ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
- info.setModificationStamp(computeModificationStamp(info));
- info.fStatus = null;
- return info;
- }
-
- /**
- * @generated
- */
- protected IDocument createDocument(Object element) throws CoreException {
- if(false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, NLS.bind(Messages.UMLDocumentProvider_IncorrectInputError, new Object[]{ element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- IDocument document = createEmptyDocument();
- setDocumentContent(document, (IEditorInput)element);
- setupDocument(element, document);
- return document;
- }
-
- /**
- * Sets up the given document as it would be provided for the given element. The content of the
- * document is not changed. This default implementation is empty. Subclasses may reimplement.
- *
- * @param element
- * the blue-print element
- * @param document
- * the document to set up
- * @generated
- */
- protected void setupDocument(Object element, IDocument document) {
- // for subclasses
- }
-
- /**
- * @generated
- */
- private long computeModificationStamp(ResourceSetInfo info) {
- int result = 0;
- for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if(file != null) {
- if(file.getLocation() != null) {
- result += file.getLocation().toFile().lastModified();
- } else {
- result += file.getModificationStamp();
- }
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected IDocument createEmptyDocument() {
- DiagramDocument document = new DiagramDocument();
- document.setEditingDomain(createEditingDomain());
- return document;
- }
-
- /**
- * @generated
- */
- private TransactionalEditingDomain createEditingDomain() {
- TransactionalEditingDomain editingDomain = DiagramEditingDomainFactory.getInstance().createEditingDomain();
- editingDomain.setID("org.eclipse.papyrus.uml.diagram.sequence.EditingDomain"); //$NON-NLS-1$
- final NotificationFilter diagramResourceModifiedFilter = NotificationFilter.createNotifierFilter(editingDomain.getResourceSet()).and(NotificationFilter.createEventTypeFilter(Notification.ADD)).and(NotificationFilter.createFeatureFilter(ResourceSet.class, ResourceSet.RESOURCE_SET__RESOURCES));
- editingDomain.getResourceSet().eAdapters().add(new Adapter() {
-
- private Notifier myTarger;
-
- public Notifier getTarget() {
- return myTarger;
- }
-
- public boolean isAdapterForType(Object type) {
- return false;
- }
-
- public void notifyChanged(Notification notification) {
- if(diagramResourceModifiedFilter.matches(notification)) {
- Object value = notification.getNewValue();
- if(value instanceof Resource) {
- ((Resource)value).setTrackingModification(true);
- }
- }
- }
-
- public void setTarget(Notifier newTarget) {
- myTarger = newTarget;
- }
-
- });
-
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected void setDocumentContent(IDocument document, IEditorInput element) throws CoreException {
- IDiagramDocument diagramDocument = (IDiagramDocument)document;
- TransactionalEditingDomain domain = diagramDocument.getEditingDomain();
- if(element instanceof FileEditorInput) {
- IStorage storage = ((FileEditorInput)element).getStorage();
- Diagram diagram = DiagramIOUtil.load(domain, storage, true, getProgressMonitor());
- document.setContent(diagram);
- } else if(element instanceof URIEditorInput) {
- URI uri = ((URIEditorInput)element).getURI();
- Resource resource = null;
- try {
- resource = domain.getResourceSet().getResource(uri.trimFragment(), false);
- if(resource == null) {
- resource = domain.getResourceSet().createResource(uri.trimFragment());
- }
- if(!resource.isLoaded()) {
- try {
- Map options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
- // @see 171060
- // options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
- resource.load(options);
- } catch (IOException e) {
- resource.unload();
- throw e;
- }
- }
- if(uri.fragment() != null) {
- EObject rootElement = resource.getEObject(uri.fragment());
- if(rootElement instanceof Diagram) {
- document.setContent((Diagram)rootElement);
- return;
- }
- } else {
- for(Iterator it = resource.getContents().iterator(); it.hasNext();) {
- Object rootElement = it.next();
- if(rootElement instanceof Diagram) {
- document.setContent((Diagram)rootElement);
- return;
- }
- }
- }
- throw new RuntimeException(Messages.UMLDocumentProvider_NoDiagramInResourceError);
- } catch (Exception e) {
- CoreException thrownExcp = null;
- if(e instanceof CoreException) {
- thrownExcp = (CoreException)e;
- } else {
- String msg = e.getLocalizedMessage();
- thrownExcp = new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, msg != null ? msg : Messages.UMLDocumentProvider_DiagramLoadingError, e));
- }
- throw thrownExcp;
- }
- } else {
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, NLS.bind(Messages.UMLDocumentProvider_IncorrectInputError, new Object[]{ element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- }
-
- /**
- * @generated
- */
- public long getModificationStamp(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- return computeModificationStamp(info);
- }
- return super.getModificationStamp(element);
- }
-
- /**
- * @generated
- */
- public boolean isDeleted(Object element) {
- IDiagramDocument document = getDiagramDocument(element);
- if(document != null) {
- Resource diagramResource = document.getDiagram().eResource();
- if(diagramResource != null) {
- IFile file = WorkspaceSynchronizer.getFile(diagramResource);
- return file == null || file.getLocation() == null || !file.getLocation().toFile().exists();
- }
- }
- return super.isDeleted(element);
- }
-
- /**
- * @generated
- */
- public ResourceSetInfo getResourceSetInfo(Object editorInput) {
- return (ResourceSetInfo)super.getElementInfo(editorInput);
- }
-
- /**
- * @generated
- */
- protected void disposeElementInfo(Object element, ElementInfo info) {
- if(info instanceof ResourceSetInfo) {
- ResourceSetInfo resourceSetInfo = (ResourceSetInfo)info;
- resourceSetInfo.dispose();
- }
- super.disposeElementInfo(element, info);
- }
-
- /**
- * @generated
- */
- protected void doValidateState(Object element, Object computationContext) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- LinkedList<IFile> files2Validate = new LinkedList<IFile>();
- for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if(file != null && file.isReadOnly()) {
- files2Validate.add(file);
- }
- }
- ResourcesPlugin.getWorkspace().validateEdit((IFile[])files2Validate.toArray(new IFile[files2Validate.size()]), computationContext);
- }
-
- super.doValidateState(element, computationContext);
- }
-
- /**
- * @generated
- */
- public boolean isReadOnly(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- if(info.isUpdateCache()) {
- try {
- updateCache(element);
- } catch (CoreException ex) {
- UMLDiagramEditorPlugin.getInstance().logError(Messages.UMLDocumentProvider_isModifiable, ex);
- // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.StorageDocumentProvider_isModifiable
- }
- }
- return info.isReadOnly();
- }
- return super.isReadOnly(element);
- }
-
- /**
- * @generated
- */
- public boolean isModifiable(Object element) {
- if(!isStateValidated(element)) {
- if(element instanceof FileEditorInput || element instanceof URIEditorInput) {
- return true;
- }
- }
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- if(info.isUpdateCache()) {
- try {
- updateCache(element);
- } catch (CoreException ex) {
- UMLDiagramEditorPlugin.getInstance().logError(Messages.UMLDocumentProvider_isModifiable, ex);
- // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.StorageDocumentProvider_isModifiable
- }
- }
- return info.isModifiable();
- }
- return super.isModifiable(element);
- }
-
- /**
- * @generated
- */
- protected void updateCache(Object element) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if(file != null && file.isReadOnly()) {
- info.setReadOnly(true);
- info.setModifiable(false);
- return;
- }
- }
- info.setReadOnly(false);
- info.setModifiable(true);
- return;
- }
- }
-
- /**
- * @generated
- */
- protected void doUpdateStateCache(Object element) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- info.setUpdateCache(true);
- }
- super.doUpdateStateCache(element);
- }
-
- /**
- * @generated
- */
- public boolean isSynchronized(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- return info.isSynchronized();
- }
- return super.isSynchronized(element);
- }
-
- /**
- * @generated
- */
- protected ISchedulingRule getResetRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
- for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if(file != null) {
- rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(file));
- }
- }
- return new MultiRule((ISchedulingRule[])rules.toArray(new ISchedulingRule[rules.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected ISchedulingRule getSaveRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
- for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if(file != null) {
- rules.add(computeSchedulingRule(file));
- }
- }
- return new MultiRule((ISchedulingRule[])rules.toArray(new ISchedulingRule[rules.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected ISchedulingRule getSynchronizeRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
- for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if(file != null) {
- rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().refreshRule(file));
- }
- }
- return new MultiRule((ISchedulingRule[])rules.toArray(new ISchedulingRule[rules.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected ISchedulingRule getValidateStateRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- LinkedList<ISchedulingRule> files = new LinkedList<ISchedulingRule>();
- for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if(file != null) {
- files.add(file);
- }
- }
- return ResourcesPlugin.getWorkspace().getRuleFactory().validateEditRule((IFile[])files.toArray(new IFile[files.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) {
- if(toCreateOrModify.exists())
- return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(toCreateOrModify);
-
- IResource parent = toCreateOrModify;
- do {
- /*
- * XXX This is a workaround for
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=67601
- * IResourceRuleFactory.createRule should iterate the hierarchy
- * itself.
- */
- toCreateOrModify = parent;
- parent = toCreateOrModify.getParent();
- } while(parent != null && !parent.exists());
-
- return ResourcesPlugin.getWorkspace().getRuleFactory().createRule(toCreateOrModify);
- }
-
- /**
- * @generated
- */
- protected void doSynchronize(Object element, IProgressMonitor monitor) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- handleElementChanged(info, nextResource, monitor);
- }
- return;
- }
- super.doSynchronize(element, monitor);
- }
-
- /**
- * @generated
- */
- protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if(info != null) {
- if(!overwrite && !info.isSynchronized()) {
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, IResourceStatus.OUT_OF_SYNC_LOCAL, Messages.UMLDocumentProvider_UnsynchronizedFileSaveError, null));
- }
- info.stopResourceListening();
- fireElementStateChanging(element);
- try {
- monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); //"Saving diagram"
- for(Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- monitor.setTaskName(NLS.bind(Messages.UMLDocumentProvider_SaveNextResourceTask, nextResource.getURI()));
- if(nextResource.isLoaded() && !info.getEditingDomain().isReadOnly(nextResource)) {
- try {
- nextResource.save(UMLDiagramEditorUtil.getSaveOptions());
- } catch (IOException e) {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, EditorStatusCodes.RESOURCE_FAILURE, e.getLocalizedMessage(), null));
- }
- }
- monitor.worked(1);
- }
- monitor.done();
- info.setModificationStamp(computeModificationStamp(info));
- } catch (RuntimeException x) {
- fireElementStateChangeFailed(element);
- throw x;
- } finally {
- info.startResourceListening();
- }
- } else {
- URI newResoruceURI;
- List<IFile> affectedFiles = null;
- if(element instanceof FileEditorInput) {
- IFile newFile = ((FileEditorInput)element).getFile();
- affectedFiles = Collections.singletonList(newFile);
- newResoruceURI = URI.createPlatformResourceURI(newFile.getFullPath().toString(), true);
- } else if(element instanceof URIEditorInput) {
- newResoruceURI = ((URIEditorInput)element).getURI();
- } else {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, NLS.bind(Messages.UMLDocumentProvider_IncorrectInputError, new Object[]{ element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- if(false == document instanceof IDiagramDocument) {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, "Incorrect document used: " + document + " instead of org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument", null)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- IDiagramDocument diagramDocument = (IDiagramDocument)document;
- final Resource newResource = diagramDocument.getEditingDomain().getResourceSet().createResource(newResoruceURI);
- final Diagram diagramCopy = (Diagram)EcoreUtil.copy(diagramDocument.getDiagram());
- try {
- new AbstractTransactionalCommand(diagramDocument.getEditingDomain(), NLS.bind(Messages.UMLDocumentProvider_SaveAsOperation, diagramCopy.getName()), affectedFiles) {
-
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- newResource.getContents().add(diagramCopy);
- return CommandResult.newOKCommandResult();
- }
- }.execute(monitor, null);
- newResource.save(UMLDiagramEditorUtil.getSaveOptions());
- } catch (ExecutionException e) {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, e.getLocalizedMessage(), null));
- } catch (IOException e) {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, e.getLocalizedMessage(), null));
- }
- newResource.unload();
- }
- }
-
- /**
- * @generated
- */
- protected void handleElementChanged(ResourceSetInfo info, Resource changedResource, IProgressMonitor monitor) {
- IFile file = WorkspaceSynchronizer.getFile(changedResource);
- if(file != null) {
- try {
- file.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- } catch (CoreException ex) {
- UMLDiagramEditorPlugin.getInstance().logError(Messages.UMLDocumentProvider_handleElementContentChanged, ex);
- // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.FileDocumentProvider_handleElementContentChanged
- }
- }
- changedResource.unload();
-
- fireElementContentAboutToBeReplaced(info.getEditorInput());
- removeUnchangedElementListeners(info.getEditorInput(), info);
- info.fStatus = null;
- try {
- setDocumentContent(info.fDocument, info.getEditorInput());
- } catch (CoreException e) {
- info.fStatus = e.getStatus();
- }
- if(!info.fCanBeSaved) {
- info.setModificationStamp(computeModificationStamp(info));
- }
- addUnchangedElementListeners(info.getEditorInput(), info);
- fireElementContentReplaced(info.getEditorInput());
- }
-
- /**
- * @generated
- */
- protected void handleElementMoved(IEditorInput input, URI uri) {
- if(input instanceof FileEditorInput) {
- IFile newFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(URI.decode(uri.path())).removeFirstSegments(1));
- fireElementMoved(input, newFile == null ? null : new FileEditorInput(newFile));
- return;
- }
- // TODO: append suffix to the URI! (use diagram as a parameter)
- fireElementMoved(input, new URIEditorInput(uri));
- }
-
- /**
- * @generated
- */
- public IEditorInput createInputWithEditingDomain(IEditorInput editorInput, TransactionalEditingDomain domain) {
- return editorInput;
- }
-
- /**
- * @generated
- */
- public IDiagramDocument getDiagramDocument(Object element) {
- IDocument doc = getDocument(element);
- if(doc instanceof IDiagramDocument) {
- return (IDiagramDocument)doc;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected IRunnableContext getOperationRunner(IProgressMonitor monitor) {
- return null;
- }
-
- /**
- * @generated
- */
- protected class ResourceSetInfo extends ElementInfo {
-
- /**
- * @generated
- */
- private long myModificationStamp = IResource.NULL_STAMP;
-
- /**
- * @generated
- */
- private WorkspaceSynchronizer mySynchronizer;
-
- /**
- * @generated
- */
- private LinkedList<Resource> myUnSynchronizedResources = new LinkedList<Resource>();
-
- /**
- * @generated
- */
- private IDiagramDocument myDocument;
-
- /**
- * @generated
- */
- private IEditorInput myEditorInput;
-
- /**
- * @generated
- */
- private boolean myUpdateCache = true;
-
- /**
- * @generated
- */
- private boolean myModifiable = false;
-
- /**
- * @generated
- */
- private boolean myReadOnly = true;
-
- /**
- * @generated
- */
- private ResourceSetModificationListener myResourceSetListener;
-
- /**
- * @generated
- */
- public ResourceSetInfo(IDiagramDocument document, IEditorInput editorInput) {
- super(document);
- myDocument = document;
- myEditorInput = editorInput;
- startResourceListening();
- myResourceSetListener = new ResourceSetModificationListener(this);
- getResourceSet().eAdapters().add(myResourceSetListener);
- }
-
- /**
- * @generated
- */
- public long getModificationStamp() {
- return myModificationStamp;
- }
-
- /**
- * @generated
- */
- public void setModificationStamp(long modificationStamp) {
- myModificationStamp = modificationStamp;
- }
-
- /**
- * @generated
- */
- public TransactionalEditingDomain getEditingDomain() {
- return myDocument.getEditingDomain();
- }
-
- /**
- * @generated
- */
- public ResourceSet getResourceSet() {
- return getEditingDomain().getResourceSet();
- }
-
- /**
- * @generated
- */
- public Iterator<Resource> getLoadedResourcesIterator() {
- return new ArrayList<Resource>(getResourceSet().getResources()).iterator();
- }
-
- /**
- * @generated
- */
- public IEditorInput getEditorInput() {
- return myEditorInput;
- }
-
- /**
- * @generated
- */
- public void dispose() {
- stopResourceListening();
- getResourceSet().eAdapters().remove(myResourceSetListener);
- for(Iterator<Resource> it = getLoadedResourcesIterator(); it.hasNext();) {
- Resource resource = it.next();
- resource.unload();
- }
- getEditingDomain().dispose();
- }
-
- /**
- * @generated
- */
- public boolean isSynchronized() {
- return myUnSynchronizedResources.size() == 0;
- }
-
- /**
- * @generated
- */
- public void setUnSynchronized(Resource resource) {
- myUnSynchronizedResources.add(resource);
- }
-
- /**
- * @generated
- */
- public void setSynchronized(Resource resource) {
- myUnSynchronizedResources.remove(resource);
- }
-
- /**
- * @generated
- */
- public final void stopResourceListening() {
- mySynchronizer.dispose();
- mySynchronizer = null;
- }
-
- /**
- * @generated
- */
- public final void startResourceListening() {
- mySynchronizer = new WorkspaceSynchronizer(getEditingDomain(), new SynchronizerDelegate());
- }
-
- /**
- * @generated
- */
- public boolean isUpdateCache() {
- return myUpdateCache;
- }
-
- /**
- * @generated
- */
- public void setUpdateCache(boolean update) {
- myUpdateCache = update;
- }
-
- /**
- * @generated
- */
- public boolean isModifiable() {
- return myModifiable;
- }
-
- /**
- * @generated
- */
- public void setModifiable(boolean modifiable) {
- myModifiable = modifiable;
- }
-
- /**
- * @generated
- */
- public boolean isReadOnly() {
- return myReadOnly;
- }
-
- /**
- * @generated
- */
- public void setReadOnly(boolean readOnly) {
- myReadOnly = readOnly;
- }
-
- /**
- * @generated
- */
- private class SynchronizerDelegate implements WorkspaceSynchronizer.Delegate {
-
- /**
- * @generated
- */
- public void dispose() {
- }
-
- /**
- * @generated
- */
- public boolean handleResourceChanged(final Resource resource) {
- synchronized(ResourceSetInfo.this) {
- if(ResourceSetInfo.this.fCanBeSaved) {
- ResourceSetInfo.this.setUnSynchronized(resource);
- return true;
- }
- }
- Display.getDefault().asyncExec(new Runnable() {
-
- public void run() {
- handleElementChanged(ResourceSetInfo.this, resource, null);
- }
- });
- return true;
- }
-
- /**
- * @generated
- */
- public boolean handleResourceDeleted(Resource resource) {
- synchronized(ResourceSetInfo.this) {
- if(ResourceSetInfo.this.fCanBeSaved) {
- ResourceSetInfo.this.setUnSynchronized(resource);
- return true;
- }
- }
- Display.getDefault().asyncExec(new Runnable() {
-
- public void run() {
- fireElementDeleted(ResourceSetInfo.this.getEditorInput());
- }
- });
- return true;
- }
-
- /**
- * @generated
- */
- public boolean handleResourceMoved(Resource resource, final URI newURI) {
- synchronized(ResourceSetInfo.this) {
- if(ResourceSetInfo.this.fCanBeSaved) {
- ResourceSetInfo.this.setUnSynchronized(resource);
- return true;
- }
- }
- if(myDocument.getDiagram().eResource() == resource) {
- Display.getDefault().asyncExec(new Runnable() {
-
- public void run() {
- handleElementMoved(ResourceSetInfo.this.getEditorInput(), newURI);
- }
- });
- } else {
- handleResourceDeleted(resource);
- }
- return true;
- }
-
- }
-
- }
-
- /**
- * @generated
- */
- private class ResourceSetModificationListener extends EContentAdapter {
-
- /**
- * @generated
- */
- private NotificationFilter myModifiedFilter;
-
- /**
- * @generated
- */
- private ResourceSetInfo myInfo;
-
- /**
- * @generated
- */
- public ResourceSetModificationListener(ResourceSetInfo info) {
- myInfo = info;
- myModifiedFilter = NotificationFilter.createEventTypeFilter(Notification.SET).or(NotificationFilter.createEventTypeFilter(Notification.UNSET)).and(NotificationFilter.createFeatureFilter(Resource.class, Resource.RESOURCE__IS_MODIFIED));
- }
-
- /**
- * @generated
- */
- public void notifyChanged(Notification notification) {
- if(notification.getNotifier() instanceof ResourceSet) {
- super.notifyChanged(notification);
- }
- if(!notification.isTouch() && myModifiedFilter.matches(notification)) {
- if(notification.getNotifier() instanceof Resource) {
- Resource resource = (Resource)notification.getNotifier();
- if(resource.isLoaded()) {
- boolean modified = false;
- for(Iterator/* <org.eclipse.emf.ecore.resource.Resource> */it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified;) {
- Resource nextResource = (Resource)it.next();
- if(nextResource.isLoaded()) {
- modified = nextResource.isModified();
- }
- }
- boolean dirtyStateChanged = false;
- synchronized(myInfo) {
- if(modified != myInfo.fCanBeSaved) {
- myInfo.fCanBeSaved = modified;
- dirtyStateChanged = true;
- }
- if(!resource.isModified()) {
- myInfo.setSynchronized(resource);
- }
- }
- if(dirtyStateChanged) {
- fireElementDirtyStateChanged(myInfo.getEditorInput(), modified);
-
- if(!modified) {
- myInfo.setModificationStamp(computeModificationStamp(myInfo));
- }
- }
- }
- }
- }
- }
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLInitDiagramFileAction.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLInitDiagramFileAction.java
deleted file mode 100644
index be4ce7a1c2a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLInitDiagramFileAction.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @generated
- */
-public class UMLInitDiagramFileAction implements IObjectActionDelegate {
-
- /**
- * @generated
- */
- private IWorkbenchPart targetPart;
-
- /**
- * @generated
- */
- private URI domainModelURI;
-
- /**
- * @generated
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- this.targetPart = targetPart;
- }
-
- /**
- * @generated
- */
- public void selectionChanged(IAction action, ISelection selection) {
- domainModelURI = null;
- action.setEnabled(false);
- if(selection instanceof IStructuredSelection == false || selection.isEmpty()) {
- return;
- }
- IFile file = (IFile)((IStructuredSelection)selection).getFirstElement();
- domainModelURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
- action.setEnabled(true);
- }
-
- /**
- * @generated
- */
- private Shell getShell() {
- return targetPart.getSite().getShell();
- }
-
- /**
- * @generated
- */
- public void run(IAction action) {
- TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain();
- ResourceSet resourceSet = editingDomain.getResourceSet();
- EObject diagramRoot = null;
- try {
- Resource resource = resourceSet.getResource(domainModelURI, true);
- diagramRoot = (EObject)resource.getContents().get(0);
- } catch (WrappedException ex) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$
- }
- if(diagramRoot == null) {
- MessageDialog.openError(getShell(), Messages.InitDiagramFile_ResourceErrorDialogTitle, Messages.InitDiagramFile_ResourceErrorDialogMessage);
- return;
- }
- Wizard wizard = new UMLNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain);
- wizard.setWindowTitle(NLS.bind(Messages.InitDiagramFile_WizardTitle, PackageEditPart.MODEL_ID));
- UMLDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLLinkDescriptor.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLLinkDescriptor.java
deleted file mode 100644
index f51caad72ba..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLLinkDescriptor.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-
-/**
- * @generated
- */
-public class UMLLinkDescriptor extends UMLNodeDescriptor {
-
- /**
- * @generated
- */
- private EObject mySource;
-
- /**
- * @generated
- */
- private EObject myDestination;
-
- /**
- * @generated
- */
- private IAdaptable mySemanticAdapter;
-
- /**
- * @generated
- */
- private UMLLinkDescriptor(EObject source, EObject destination, EObject linkElement, int linkVID) {
- super(linkElement, linkVID);
- mySource = source;
- myDestination = destination;
- }
-
- /**
- * @generated
- */
- public UMLLinkDescriptor(EObject source, EObject destination, IElementType elementType, int linkVID) {
- this(source, destination, (EObject)null, linkVID);
- final IElementType elementTypeCopy = elementType;
- mySemanticAdapter = new IAdaptable() {
-
- public Object getAdapter(Class adapter) {
- if(IElementType.class.equals(adapter)) {
- return elementTypeCopy;
- }
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- public UMLLinkDescriptor(EObject source, EObject destination, EObject linkElement, IElementType elementType, int linkVID) {
- this(source, destination, linkElement, linkVID);
- final IElementType elementTypeCopy = elementType;
- mySemanticAdapter = new EObjectAdapter(linkElement) {
-
- public Object getAdapter(Class adapter) {
- if(IElementType.class.equals(adapter)) {
- return elementTypeCopy;
- }
- return super.getAdapter(adapter);
- }
- };
- }
-
- /**
- * @generated
- */
- public EObject getSource() {
- return mySource;
- }
-
- /**
- * @generated
- */
- public EObject getDestination() {
- return myDestination;
- }
-
- /**
- * @generated
- */
- public IAdaptable getSemanticAdapter() {
- return mySemanticAdapter;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLMatchingStrategy.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLMatchingStrategy.java
deleted file mode 100644
index e74663bc888..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLMatchingStrategy.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorMatchingStrategy;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.PartInitException;
-
-/**
- * @generated
- */
-public class UMLMatchingStrategy implements IEditorMatchingStrategy {
-
- /**
- * @generated
- */
- public boolean matches(IEditorReference editorRef, IEditorInput input) {
- IEditorInput editorInput;
- try {
- editorInput = editorRef.getEditorInput();
- } catch (PartInitException e) {
- return false;
- }
-
- if(editorInput.equals(input)) {
- return true;
- }
- if(editorInput instanceof URIEditorInput && input instanceof URIEditorInput) {
- return ((URIEditorInput)editorInput).getURI().equals(((URIEditorInput)input).getURI());
- }
- return false;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNewDiagramFileWizard.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNewDiagramFileWizard.java
deleted file mode 100644
index 1c79dc40f7b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNewDiagramFileWizard.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import java.io.IOException;
-import java.util.LinkedList;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-
-/**
- * @generated
- */
-public class UMLNewDiagramFileWizard extends Wizard {
-
- /**
- * @generated
- */
- private WizardNewFileCreationPage myFileCreationPage;
-
- /**
- * @generated
- */
- private ModelElementSelectionPage diagramRootElementSelectionPage;
-
- /**
- * @generated
- */
- private TransactionalEditingDomain myEditingDomain;
-
- /**
- * @generated
- */
- public UMLNewDiagramFileWizard(URI domainModelURI, EObject diagramRoot, TransactionalEditingDomain editingDomain) {
- assert domainModelURI != null : "Domain model uri must be specified"; //$NON-NLS-1$
- assert diagramRoot != null : "Doagram root element must be specified"; //$NON-NLS-1$
- assert editingDomain != null : "Editing domain must be specified"; //$NON-NLS-1$
-
- myFileCreationPage = new WizardNewFileCreationPage(Messages.UMLNewDiagramFileWizard_CreationPageName, StructuredSelection.EMPTY);
- myFileCreationPage.setTitle(Messages.UMLNewDiagramFileWizard_CreationPageTitle);
- myFileCreationPage.setDescription(NLS.bind(Messages.UMLNewDiagramFileWizard_CreationPageDescription, PackageEditPart.MODEL_ID));
- IPath filePath;
- String fileName = URI.decode(domainModelURI.trimFileExtension().lastSegment());
- if(domainModelURI.isPlatformResource()) {
- filePath = new Path(domainModelURI.trimSegments(1).toPlatformString(true));
- } else if(domainModelURI.isFile()) {
- filePath = new Path(domainModelURI.trimSegments(1).toFileString());
- } else {
- // TODO : use some default path
- throw new IllegalArgumentException("Unsupported URI: " + domainModelURI); //$NON-NLS-1$
- }
- myFileCreationPage.setContainerFullPath(filePath);
- myFileCreationPage.setFileName(UMLDiagramEditorUtil.getUniqueFileName(filePath, fileName, "PapyrusUMLSequence_diagram")); //$NON-NLS-1$
-
- diagramRootElementSelectionPage = new DiagramRootElementSelectionPage(Messages.UMLNewDiagramFileWizard_RootSelectionPageName);
- diagramRootElementSelectionPage.setTitle(Messages.UMLNewDiagramFileWizard_RootSelectionPageTitle);
- diagramRootElementSelectionPage.setDescription(Messages.UMLNewDiagramFileWizard_RootSelectionPageDescription);
- diagramRootElementSelectionPage.setModelElement(diagramRoot);
-
- myEditingDomain = editingDomain;
- }
-
- /**
- * @generated
- */
- public void addPages() {
- addPage(myFileCreationPage);
- addPage(diagramRootElementSelectionPage);
- }
-
- /**
- * @generated
- */
- public boolean performFinish() {
- LinkedList<IFile> affectedFiles = new LinkedList<IFile>();
- IFile diagramFile = myFileCreationPage.createNewFile();
- UMLDiagramEditorUtil.setCharset(diagramFile);
- affectedFiles.add(diagramFile);
- URI diagramModelURI = URI.createPlatformResourceURI(diagramFile.getFullPath().toString(), true);
- ResourceSet resourceSet = myEditingDomain.getResourceSet();
- final Resource diagramResource = resourceSet.createResource(diagramModelURI);
- AbstractTransactionalCommand command = new AbstractTransactionalCommand(myEditingDomain, Messages.UMLNewDiagramFileWizard_InitDiagramCommand, affectedFiles) {
-
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- int diagramVID = UMLVisualIDRegistry.getDiagramVisualID(diagramRootElementSelectionPage.getModelElement());
- if(diagramVID != PackageEditPart.VISUAL_ID) {
- return CommandResult.newErrorCommandResult(Messages.UMLNewDiagramFileWizard_IncorrectRootError);
- }
- Diagram diagram = ViewService.createDiagram(diagramRootElementSelectionPage.getModelElement(), PackageEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- diagramResource.getContents().add(diagram);
- return CommandResult.newOKCommandResult();
- }
- };
- try {
- OperationHistoryFactory.getOperationHistory().execute(command, new NullProgressMonitor(), null);
- diagramResource.save(UMLDiagramEditorUtil.getSaveOptions());
- UMLDiagramEditorUtil.openDiagram(diagramResource);
- } catch (ExecutionException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
- } catch (IOException ex) {
- UMLDiagramEditorPlugin.getInstance().logError("Save operation failed for: " + diagramModelURI, ex); //$NON-NLS-1$
- } catch (PartInitException ex) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to open editor", ex); //$NON-NLS-1$
- }
- return true;
- }
-
- /**
- * @generated
- */
- private static class DiagramRootElementSelectionPage extends ModelElementSelectionPage {
-
- /**
- * @generated
- */
- protected DiagramRootElementSelectionPage(String pageName) {
- super(pageName);
- }
-
- /**
- * @generated
- */
- protected String getSelectionTitle() {
- return Messages.UMLNewDiagramFileWizard_RootSelectionPageSelectionTitle;
- }
-
- /**
- * @generated
- */
- protected boolean validatePage() {
- if(selectedModelElement == null) {
- setErrorMessage(Messages.UMLNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
- return false;
- }
- boolean result = ViewService.getInstance().provides(new CreateDiagramViewOperation(new EObjectAdapter(selectedModelElement), PackageEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
- setErrorMessage(result ? null : Messages.UMLNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
- return result;
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNodeDescriptor.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNodeDescriptor.java
deleted file mode 100644
index fd0e58a80d7..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLNodeDescriptor.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * @generated
- */
-public class UMLNodeDescriptor {
-
- /**
- * @generated
- */
- private final EObject myModelElement;
-
- /**
- * @generated
- */
- private final int myVisualID;
-
- /**
- * @generated
- */
- public UMLNodeDescriptor(EObject modelElement, int visualID) {
- myModelElement = modelElement;
- myVisualID = visualID;
- }
-
- /**
- * @generated
- */
- public EObject getModelElement() {
- return myModelElement;
- }
-
- /**
- * @generated
- */
- public int getVisualID() {
- return myVisualID;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLPaletteFactory.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLPaletteFactory.java
deleted file mode 100644
index 63031cd558c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLPaletteFactory.java
+++ /dev/null
@@ -1,697 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.SharedCursors;
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.SimpleFactory;
-import org.eclipse.gef.requests.TargetRequest;
-import org.eclipse.gef.tools.ConnectionCreationTool;
-import org.eclipse.gmf.runtime.diagram.ui.internal.l10n.DiagramUIPluginImages;
-import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ObservationLinkPolicy.ObservationLink;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.sequence.service.DurationCreationTool;
-import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceUtil;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @generated
- */
-public class UMLPaletteFactory extends PaletteFactory.Adapter {
-
- /**
- * @generated
- */
- private final static String CREATELIFELINE1CREATIONTOOL = "createLifeline1CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEACTIONEXECUTIONSPECIFICATION2CREATIONTOOL = "createActionExecutionSpecification2CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEBEHAVIOREXECUTIONSPECIFICATION3CREATIONTOOL = "createBehaviorExecutionSpecification3CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEINTERACTIONUSE4CREATIONTOOL = "createInteractionUse4CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATECOMBINEDFRAGMENT5CREATIONTOOL = "createCombinedFragment5CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEINTERACTIONOPERAND6CREATIONTOOL = "createInteractionOperand6CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATECONTINUATION7CREATIONTOOL = "createContinuation7CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATESTATEINVARIANT8CREATIONTOOL = "createStateInvariant8CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATECOMMENT9CREATIONTOOL = "createComment9CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATECONSTRAINT10CREATIONTOOL = "createConstraint10CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATECOREGION11CREATIONTOOL = "createCoRegion11CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEDURATIONOBSERVATION12CREATIONTOOL = "createDurationObservation12CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATETIMECONSTRAINT13CREATIONTOOL = "createTimeConstraint13CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATETIMEOBSERVATION14CREATIONTOOL = "createTimeObservation14CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEDURATIONCONSTRAINT15CREATIONTOOL = "createDurationConstraint15CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEDESTRUCTIONEVENT16CREATIONTOOL = "createDestructionEvent16CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEMESSAGESYNC1CREATIONTOOL = "createMessageSync1CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEMESSAGEASYNC2CREATIONTOOL = "createMessageAsync2CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEMESSAGEREPLY3CREATIONTOOL = "createMessageReply3CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEMESSAGECREATE4CREATIONTOOL = "createMessageCreate4CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEMESSAGEDELETE5CREATIONTOOL = "createMessageDelete5CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEMESSAGELOST6CREATIONTOOL = "createMessageLost6CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEMESSAGEFOUND7CREATIONTOOL = "createMessageFound7CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEGENERALORDERING8CREATIONTOOL = "createGeneralOrdering8CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATECOMMENTLINK9CREATIONTOOL = "createCommentlink9CreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATECONSTRAINTLINK10CREATIONTOOL = "createConstraintlink10CreationTool"; //$NON-NLS-1$
-
- private final static String CREATEOBSERVATIONLINKCREATIONTOOL = "createObservationLinkCreationTool"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public UMLPaletteFactory() {
-
- }
-
- /**
- * @generated NOT
- */
- public Tool createTool(String toolId) {
- if(toolId.equals(CREATELIFELINE1CREATIONTOOL)) {
- return createLifeline1CreationTool();
- }
- if(toolId.equals(CREATEACTIONEXECUTIONSPECIFICATION2CREATIONTOOL)) {
- return createActionExecutionSpecification2CreationTool();
- }
- if(toolId.equals(CREATEBEHAVIOREXECUTIONSPECIFICATION3CREATIONTOOL)) {
- return createBehaviorExecutionSpecification3CreationTool();
- }
- if(toolId.equals(CREATEINTERACTIONUSE4CREATIONTOOL)) {
- return createInteractionUse4CreationTool();
- }
- if(toolId.equals(CREATECOMBINEDFRAGMENT5CREATIONTOOL)) {
- return createCombinedFragment5CreationTool();
- }
- // add
- if(toolId.equals("createConsiderIgnoreFragment5CreationTool")) {
- return createConsiderIgnoreFragmentCreationTool();
- }
- if(toolId.equals(CREATEINTERACTIONOPERAND6CREATIONTOOL)) {
- return createInteractionOperand6CreationTool();
- }
- if(toolId.equals(CREATECONTINUATION7CREATIONTOOL)) {
- return createContinuation7CreationTool();
- }
- if(toolId.equals(CREATESTATEINVARIANT8CREATIONTOOL)) {
- return createStateInvariant8CreationTool();
- }
- if(toolId.equals(CREATECOMMENT9CREATIONTOOL)) {
- return createComment9CreationTool();
- }
- if(toolId.equals(CREATECONSTRAINT10CREATIONTOOL)) {
- return createConstraint10CreationTool();
- }
- if(toolId.equals(CREATECOREGION11CREATIONTOOL)) {
- return createCoRegion11CreationTool();
- }
- if(toolId.equals(CREATEDURATIONOBSERVATION12CREATIONTOOL)) {
- return createDurationObservation12CreationTool();
- }
- if(toolId.equals(CREATETIMECONSTRAINT13CREATIONTOOL)) {
- return createTimeConstraint13CreationTool();
- }
- if(toolId.equals(CREATETIMEOBSERVATION14CREATIONTOOL)) {
- return createTimeObservation14CreationTool();
- }
- if(toolId.equals(CREATEDURATIONCONSTRAINT15CREATIONTOOL)) {
- return createDurationConstraint15CreationTool();
- }
- if(toolId.equals(CREATEDESTRUCTIONEVENT16CREATIONTOOL)) {
- return createDestructionEvent16CreationTool();
- }
- if(toolId.equals(CREATEMESSAGESYNC1CREATIONTOOL)) {
- return createMessageSync1CreationTool();
- }
- if(toolId.equals(CREATEMESSAGEASYNC2CREATIONTOOL)) {
- return createMessageAsync2CreationTool();
- }
- if(toolId.equals(CREATEMESSAGEREPLY3CREATIONTOOL)) {
- return createMessageReply3CreationTool();
- }
- if(toolId.equals(CREATEMESSAGECREATE4CREATIONTOOL)) {
- return createMessageCreate4CreationTool();
- }
- if(toolId.equals(CREATEMESSAGEDELETE5CREATIONTOOL)) {
- return createMessageDelete5CreationTool();
- }
- if(toolId.equals(CREATEMESSAGELOST6CREATIONTOOL)) {
- return createMessageLost6CreationTool();
- }
- if(toolId.equals(CREATEMESSAGEFOUND7CREATIONTOOL)) {
- return createMessageFound7CreationTool();
- }
- if(toolId.equals(CREATEGENERALORDERING8CREATIONTOOL)) {
- return createGeneralOrdering8CreationTool();
- }
- if(toolId.equals(CREATECOMMENTLINK9CREATIONTOOL)) {
- return createCommentlink9CreationTool();
- }
- if(toolId.equals(CREATECONSTRAINTLINK10CREATIONTOOL)) {
- return createConstraintlink10CreationTool();
- }
- if(toolId.equals(CREATEOBSERVATIONLINKCREATIONTOOL)) {
- return createObservationLinkCreationTool();
- }
-
-
- // default return: null
- return null;
- }
-
- public Object getTemplate(String templateId) {
-
- // default return: null
- return null;
- }
-
- /**
- * @generated
- */
- private Tool createLifeline1CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Lifeline_3001);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createActionExecutionSpecification2CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createBehaviorExecutionSpecification3CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createInteractionUse4CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.InteractionUse_3002);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createCombinedFragment5CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(2);
- //types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- private Tool createConsiderIgnoreFragmentCreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createInteractionOperand6CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.InteractionOperand_3005);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createContinuation7CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Continuation_3016);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createStateInvariant8CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.StateInvariant_3017);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated NOT
- */
- private Tool createComment9CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Comment_3009);
-
- 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;
- }
- };
- return tool;
- }
-
- /**
- * @generated NOT
- */
- private Tool createConstraint10CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Constraint_3008);
-
- 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;
- }
- };
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createCoRegion11CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.CombinedFragment_3018);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated NOT use DurationCreationTool
- */
- private Tool createDurationObservation12CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.DurationObservation_3024);
-
- // use DurationCreationTool
- //Tool tool = new DurationCreationTool(types);
- AspectUnspecifiedTypeCreationTool tool = new AspectUnspecifiedTypeCreationTool(types);
- tool.setDefaultCursor(SharedCursors.HAND);
- tool.setDisabledCursor(SharedCursors.NO);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createTimeConstraint13CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.TimeConstraint_3019);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated NOT
- */
- private Tool createTimeObservation14CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.TimeObservation_3020);
-
- 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;
- }
- };
- tool.setDefaultCursor(SharedCursors.HAND);
- tool.setDisabledCursor(SharedCursors.NO);
- return tool;
- }
-
- /**
- * @generated NOT use DurationCreationTool
- */
- private Tool createDurationConstraint15CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DurationConstraint_3023);
-
- // use DurationCreationTool
- Tool tool = new DurationCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createDestructionEvent16CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
-
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated NOT
- */
- private Tool createMessageSync1CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Message_4003);
-
- Tool tool = new AspectUnspecifiedTypeConnectionToolEx(types);
- return tool;
- }
-
- /**
- * @generated NOT
- */
- private Tool createMessageAsync2CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Message_4004);
-
- Tool tool = new AspectUnspecifiedTypeConnectionToolEx(types);
- return tool;
- }
-
- /**
- * @generated NOT
- */
- private Tool createMessageReply3CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Message_4005);
-
- Tool tool = new AspectUnspecifiedTypeConnectionToolEx(types);
- return tool;
- }
-
- /**
- * @generated NOT
- */
- private Tool createMessageCreate4CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Message_4006);
-
- Tool tool = new AspectUnspecifiedTypeConnectionToolEx(types);
- return tool;
- }
-
- /**
- * @generated NOT
- */
- private Tool createMessageDelete5CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Message_4007);
-
- Tool tool = new AspectUnspecifiedTypeConnectionToolEx(types);
- return tool;
- }
-
- /**
- * @generated NOT
- */
- private Tool createMessageLost6CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Message_4008);
-
- Tool tool = new AspectUnspecifiedTypeConnectionToolEx(types);
- return tool;
- }
-
- /**
- * @generated NOT
- */
- private Tool createMessageFound7CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Message_4009);
-
- Tool tool = new AspectUnspecifiedTypeConnectionToolEx(types);
- return tool;
- }
-
- /**
- * @generated NOT
- */
- private Tool createGeneralOrdering8CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.GeneralOrdering_4012);
-
- Tool tool = new AspectUnspecifiedTypeConnectionToolEx(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createCommentlink9CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.CommentAnnotatedElement_4010);
-
- Tool tool = new AspectUnspecifiedTypeConnectionToolEx(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createConstraintlink10CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4011);
-
- Tool tool = new AspectUnspecifiedTypeConnectionToolEx(types);
- return tool;
- }
-
- // see also CustomConnectionHandleEditPolicy.getHandleFigures()
- private Tool createObservationLinkCreationTool() {
- ConnectionCreationTool tool = new ConnectionCreationTool(new SimpleFactory(ObservationLink.class)){
- protected String getCommandName() {
- if (isInState(STATE_CONNECTION_STARTED
- | STATE_ACCESSIBLE_DRAG_IN_PROGRESS))
- return SequenceUtil.OBSERVATION_LINK_REQUEST_END;
- else
- return SequenceUtil.OBSERVATION_LINK_REQUEST_START;
- }
-
- @Override
- protected boolean handleButtonUp(int button) {
- setUnloadWhenFinished(true);
- return super.handleButtonUp(button);
- }
-
- protected boolean updateTargetUnderMouse() {
- if (!isTargetLocked()) {
- EditPart editPart = getCurrentViewer()
- .findObjectAtExcluding(getLocation(), getExclusionSet(),
- getTargetingConditional());
- if (editPart != null)
- editPart = editPart.getTargetEditPart(getTargetRequest());
- // fix observation link moving over ExecutionSpecificationEditPart
- if (getTargetRequest() instanceof TargetRequest)
- ((TargetRequest) getTargetRequest()).setTargetEditPart(editPart);
- boolean changed = getTargetEditPart() != editPart;
- setTargetEditPart(editPart);
- return changed;
- } else
- return false;
- }
-
-
- };
-
- tool.setDefaultCursor(new Cursor(Display.getDefault(),
- DiagramUIPluginImages.DESC_CONNECTION_CURSOR_SOURCE.getImageData(),
- DiagramUIPluginImages.DESC_CONNECTION_CURSOR_MASK.getImageData(), 0, 0));
- tool.setDisabledCursor(new Cursor(Display
- .getDefault(), DiagramUIPluginImages.DESC_NO_CONNECTION_CURSOR_SOURCE
- .getImageData(), DiagramUIPluginImages.DESC_NO_CONNECTION_CURSOR_MASK
- .getImageData(), 0, 0));
-
- return tool;
- }
-
-
- public static class AspectUnspecifiedTypeConnectionToolEx extends AspectUnspecifiedTypeConnectionTool{
- private EditPart source;
-
- public AspectUnspecifiedTypeConnectionToolEx(List<IElementType> elementTypes) {
- super(elementTypes);
- }
-
- @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);
- }
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLUriEditorInputTester.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLUriEditorInputTester.java
deleted file mode 100644
index fd4ab1f5603..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLUriEditorInputTester.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.emf.common.ui.URIEditorInput;
-
-/**
- * @generated
- */
-public class UMLUriEditorInputTester extends PropertyTester {
-
- /**
- * @generated
- */
- public boolean test(Object receiver, String method, Object[] args, Object expectedValue) {
- if(false == receiver instanceof URIEditorInput) {
- return false;
- }
- URIEditorInput editorInput = (URIEditorInput)receiver;
- return "PapyrusUMLSequence_diagram".equals(editorInput.getURI().fileExtension()); //$NON-NLS-1$
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java
deleted file mode 100644
index cf55ea641a4..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java
+++ /dev/null
@@ -1,962 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.DurationObservationHelper;
-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.parts.ActionExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Constraint2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseName2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.expressions.UMLOCLFactory;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Message;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.OccurrenceSpecification;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * This registry is used to determine which type of visual object should be created for the
- * corresponding Diagram, Node, ChildNode or Link represented by a domain model object.
- *
- * @generated
- */
-public class UMLVisualIDRegistry {
-
- /**
- * @generated
- */
- private static final String DEBUG_KEY = "org.eclipse.papyrus.uml.diagram.sequence/debug/visualID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static int getVisualID(View view) {
- if(view instanceof Diagram) {
- if(PackageEditPart.MODEL_ID.equals(view.getType())) {
- return PackageEditPart.VISUAL_ID;
- } else {
- return -1;
- }
- }
- return org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry.getVisualID(view.getType());
- }
-
- /**
- * @generated
- */
- public static String getModelID(View view) {
- View diagram = view.getDiagram();
- while(view != diagram) {
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if(annotation != null) {
- return (String)annotation.getDetails().get("modelID"); //$NON-NLS-1$
- }
- view = (View)view.eContainer();
- }
- return diagram != null ? diagram.getType() : null;
- }
-
- /**
- * @generated
- */
- public static int getVisualID(String type) {
- try {
- return Integer.parseInt(type);
- } catch (NumberFormatException e) {
- if(Boolean.TRUE.toString().equalsIgnoreCase(Platform.getDebugOption(DEBUG_KEY))) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to parse view type as a visualID number: " + type);
- }
- }
- return -1;
- }
-
- /**
- * @generated
- */
- public static String getType(int visualID) {
- return Integer.toString(visualID);
- }
-
- /**
- * @generated
- */
- public static int getDiagramVisualID(EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass()) && isDiagram((Package)domainElement)) {
- return PackageEditPart.VISUAL_ID;
- }
-
- return -1;
- }
-
- /**
- * Generated not for add lifelines on lifeline
- *
- * @generated NOT (update at each gmf change) lifeline, handle duration constraint/observation on message
- */
- public static int getNodeVisualID(View containerView, EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- String containerModelID = org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry.getModelID(containerView);
- if(!PackageEditPart.MODEL_ID.equals(containerModelID)) {
- return -1;
- }
- int containerVisualID;
- if(PackageEditPart.MODEL_ID.equals(containerModelID)) {
- containerVisualID = org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry.getVisualID(containerView);
- } else {
- if(containerView instanceof Diagram) {
- containerVisualID = PackageEditPart.VISUAL_ID;
- } else {
- return -1;
- }
- }
- switch(containerVisualID) {
- case PackageEditPart.VISUAL_ID:
- if(UMLPackage.eINSTANCE.getInteraction().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return InteractionEditPart.VISUAL_ID;
- }
- break;
- case InteractionEditPart.VISUAL_ID:
- if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return DurationConstraintInMessageEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getDurationObservation().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return DurationObservationEditPart.VISUAL_ID;
- }
- break;
- case InteractionOperandEditPart.VISUAL_ID:
- if(UMLPackage.eINSTANCE.getInteractionUse().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return InteractionUseEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getConsiderIgnoreFragment().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return ConsiderIgnoreFragmentEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getCombinedFragment().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return CombinedFragmentEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getContinuation().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return ContinuationEditPart.VISUAL_ID;
- }
- break;
- case LifelineEditPart.VISUAL_ID:
- if(UMLPackage.eINSTANCE.getActionExecutionSpecification().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return ActionExecutionSpecificationEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getBehaviorExecutionSpecification().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return BehaviorExecutionSpecificationEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getStateInvariant().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return StateInvariantEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getCombinedFragment().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return CombinedFragment2EditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return TimeConstraintEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getTimeObservation().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return TimeObservationEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())
-
- ) {
- // handle duration constraint/observation on message
- List<Element> occurrences = ((DurationConstraint)domainElement).getConstrainedElements();
- if(occurrences.size() >= 2 && occurrences.get(0) instanceof OccurrenceSpecification && occurrences.get(1) instanceof OccurrenceSpecification) {
- if(DurationConstraintHelper.endsOfSameMessage((OccurrenceSpecification)occurrences.get(0), (OccurrenceSpecification)occurrences.get(1))) {
- return DurationConstraintInMessageEditPart.VISUAL_ID;
- }
- }
- return DurationConstraintEditPart.VISUAL_ID;
- }
- // handle duration constraint/observation on message
- if(UMLPackage.eINSTANCE.getDurationObservation().isSuperTypeOf(domainElement.eClass())
-
- ) {
- List<NamedElement> occurrences = ((DurationObservation)domainElement).getEvents();
- if(occurrences.size() >= 2 && occurrences.get(0) instanceof OccurrenceSpecification && occurrences.get(1) instanceof OccurrenceSpecification) {
- if(DurationObservationHelper.endsOfSameMessage((OccurrenceSpecification)occurrences.get(0), (OccurrenceSpecification)occurrences.get(1))) {
- return DurationObservationEditPart.VISUAL_ID;
- }
- }
- }
- if(UMLPackage.eINSTANCE.getDestructionOccurrenceSpecification().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return DestructionOccurrenceSpecificationEditPart.VISUAL_ID;
- }
- // lifeline : add lifelines on lifeline
- if(UMLPackage.eINSTANCE.getLifeline().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return LifelineEditPart.VISUAL_ID;
- }
- break;
- case InteractionInteractionCompartmentEditPart.VISUAL_ID:
- if(UMLPackage.eINSTANCE.getConsiderIgnoreFragment().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return ConsiderIgnoreFragmentEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getCombinedFragment().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return CombinedFragmentEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getLifeline().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return LifelineEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getInteractionOperand().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return InteractionOperandEditPart.VISUAL_ID;
- }
-
- if(UMLPackage.eINSTANCE.getInteractionUse().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return InteractionUseEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return ConstraintEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return CommentEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeObservation().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return TimeObservationEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationObservation().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return DurationObservationEditPart.VISUAL_ID;
- }
- break;
- case CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID:
- if(UMLPackage.eINSTANCE.getInteractionOperand().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return InteractionOperandEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getContinuation().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return ContinuationEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getCombinedFragment().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return CombinedFragmentEditPart.VISUAL_ID;
- }
- break;
- // handle duration constraint/observation on message
- case MessageEditPart.VISUAL_ID:
- case Message2EditPart.VISUAL_ID:
- case Message3EditPart.VISUAL_ID:
- case Message4EditPart.VISUAL_ID:
- case Message5EditPart.VISUAL_ID:
- case Message6EditPart.VISUAL_ID:
- case Message7EditPart.VISUAL_ID:
- if(UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass())) {
- return DurationConstraintInMessageEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getDurationObservation().isSuperTypeOf(domainElement.eClass())) {
- return DurationObservationEditPart.VISUAL_ID;
- }
- break;
- }
- return -1;
- }
-
- /**
- * @generated NOT
- */
- public static boolean canCreateNode(View containerView, int nodeVisualID) {
- String containerModelID = org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry.getModelID(containerView);
- if(!PackageEditPart.MODEL_ID.equals(containerModelID)) {
- return false;
- }
- int containerVisualID;
- if(PackageEditPart.MODEL_ID.equals(containerModelID)) {
- containerVisualID = org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry.getVisualID(containerView);
- } else {
- if(containerView instanceof Diagram) {
- containerVisualID = PackageEditPart.VISUAL_ID;
- } else {
- return false;
- }
- }
- switch(containerVisualID) {
- case PackageEditPart.VISUAL_ID:
- if(InteractionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InteractionEditPart.VISUAL_ID:
- if(InteractionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(InteractionInteractionCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(DurationConstraintInMessageEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(DurationObservationEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case CombinedFragmentEditPart.VISUAL_ID:
- if(CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InteractionOperandEditPart.VISUAL_ID:
- if(InteractionUseEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(ConsiderIgnoreFragmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(CombinedFragmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(ContinuationEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InteractionUseEditPart.VISUAL_ID:
- if(InteractionUseNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(InteractionUseName2EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ContinuationEditPart.VISUAL_ID:
- if(ContinuationNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case LifelineEditPart.VISUAL_ID:
- if(LifelineEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(LifelineNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(ActionExecutionSpecificationEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(BehaviorExecutionSpecificationEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(StateInvariantEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(CombinedFragment2EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(TimeConstraintEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(TimeObservationEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(DurationConstraintEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(DestructionOccurrenceSpecificationEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case StateInvariantEditPart.VISUAL_ID:
- if(StateInvariantNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case TimeConstraintEditPart.VISUAL_ID:
- if(TimeConstraintLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(TimeConstraintAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case TimeObservationEditPart.VISUAL_ID:
- if(TimeObservationLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(TimeObservationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DurationConstraintEditPart.VISUAL_ID:
- if(DurationConstraintLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(DurationConstraintAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ConstraintEditPart.VISUAL_ID:
- if(ConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(Constraint2EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case CommentEditPart.VISUAL_ID:
- if(CommentBodyEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- if(DurationConstraintInMessageLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DurationObservationEditPart.VISUAL_ID:
- if(DurationObservationLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(DurationObservationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InteractionInteractionCompartmentEditPart.VISUAL_ID:
- if(ConsiderIgnoreFragmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(CombinedFragmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(LifelineEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(InteractionUseEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(ConstraintEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(CommentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(TimeObservationEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(DurationObservationEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID:
- if(InteractionOperandEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case MessageEditPart.VISUAL_ID:
- if(MessageNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(MessageSyncAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case Message2EditPart.VISUAL_ID:
- if(MessageName2EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(MessageAsyncAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case Message3EditPart.VISUAL_ID:
- if(MessageName3EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(MessageReplyAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case Message4EditPart.VISUAL_ID:
- if(MessageName4EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(MessageCreateAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case Message5EditPart.VISUAL_ID:
- if(MessageName5EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(MessageDeleteAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case Message6EditPart.VISUAL_ID:
- if(MessageName6EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(MessageLostAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case Message7EditPart.VISUAL_ID:
- if(MessageName7EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if(MessageFoundAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case GeneralOrderingEditPart.VISUAL_ID:
- if(GeneralOrderingAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static int getLinkWithClassVisualID(EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getMessage().isSuperTypeOf(domainElement.eClass())
-
- && isMessage_4003((Message)domainElement)
-
- ) {
- return MessageEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getMessage().isSuperTypeOf(domainElement.eClass())
-
- && isMessage_4004((Message)domainElement)
-
- ) {
- return Message2EditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getMessage().isSuperTypeOf(domainElement.eClass())
-
- && isMessage_4005((Message)domainElement)
-
- ) {
- return Message3EditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getMessage().isSuperTypeOf(domainElement.eClass())
-
- && isMessage_4006((Message)domainElement)
-
- ) {
- return Message4EditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getMessage().isSuperTypeOf(domainElement.eClass())
-
- && isMessage_4007((Message)domainElement)
-
- ) {
- return Message5EditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getMessage().isSuperTypeOf(domainElement.eClass())
-
- && isMessage_4008((Message)domainElement)
-
- ) {
- return Message6EditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getMessage().isSuperTypeOf(domainElement.eClass())
-
- && isMessage_4009((Message)domainElement)
-
- ) {
- return Message7EditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getGeneralOrdering().isSuperTypeOf(domainElement.eClass())
-
- ) {
- return GeneralOrderingEditPart.VISUAL_ID;
- }
- return -1;
- }
-
- /**
- * User can change implementation of this method to handle some specific situations not covered
- * by default logic.
- *
- * @generated
- */
- private static boolean isDiagram(Package element) {
- return true;
- }
-
- /**
- * @generated
- */
- private static boolean isMessage_4003(Message domainElement) {
- Object result = UMLOCLFactory.getExpression(1, UMLPackage.eINSTANCE.getMessage(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean)result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isMessage_4004(Message domainElement) {
- Object result = UMLOCLFactory.getExpression(4, UMLPackage.eINSTANCE.getMessage(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean)result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isMessage_4005(Message domainElement) {
- Object result = UMLOCLFactory.getExpression(7, UMLPackage.eINSTANCE.getMessage(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean)result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isMessage_4006(Message domainElement) {
- Object result = UMLOCLFactory.getExpression(10, UMLPackage.eINSTANCE.getMessage(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean)result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isMessage_4007(Message domainElement) {
- Object result = UMLOCLFactory.getExpression(13, UMLPackage.eINSTANCE.getMessage(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean)result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isMessage_4008(Message domainElement) {
- Object result = UMLOCLFactory.getExpression(16, UMLPackage.eINSTANCE.getMessage(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean)result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isMessage_4009(Message domainElement) {
- Object result = UMLOCLFactory.getExpression(19, UMLPackage.eINSTANCE.getMessage(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean)result).booleanValue();
- }
-
- // test
-
- /**
- * @generated
- */
- private static ViewInfo diagramViewInfo = null;
-
- /**
- * @generated
- */
- public static ViewInfo getDiagramViewInfo() {
- if(diagramViewInfo == null) {
- diagramViewInfo = getPackage_1000ViewInfo();
- }
- return diagramViewInfo;
- }
-
- /**
- * @generated
- */
- protected static ViewInfo getPackage_1000ViewInfo() {
- ViewInfo root = new BaseViewInfo(1000, ViewInfo.Head, "", null, null);
- ViewInfo viewInfo = null;
- ViewInfo labelInfo = null;
-
- viewInfo = new BaseViewInfo(2001, ViewInfo.Node, "Interaction");
- root.addNode(1000, viewInfo);
-
- viewInfo = new BaseViewInfo(4003, ViewInfo.Edge, "");
- root.addNode(1000, viewInfo);
-
- labelInfo = new BaseViewInfo(6001, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- labelInfo = new BaseViewInfo(6008, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- viewInfo = new BaseViewInfo(4004, ViewInfo.Edge, "");
- root.addNode(1000, viewInfo);
-
- labelInfo = new BaseViewInfo(6002, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- labelInfo = new BaseViewInfo(6009, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- viewInfo = new BaseViewInfo(4005, ViewInfo.Edge, "");
- root.addNode(1000, viewInfo);
-
- labelInfo = new BaseViewInfo(6003, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- labelInfo = new BaseViewInfo(6010, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- viewInfo = new BaseViewInfo(4006, ViewInfo.Edge, "");
- root.addNode(1000, viewInfo);
-
- labelInfo = new BaseViewInfo(6004, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- labelInfo = new BaseViewInfo(6011, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- viewInfo = new BaseViewInfo(4007, ViewInfo.Edge, "");
- root.addNode(1000, viewInfo);
-
- labelInfo = new BaseViewInfo(6005, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- labelInfo = new BaseViewInfo(6012, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- viewInfo = new BaseViewInfo(4008, ViewInfo.Edge, "");
- root.addNode(1000, viewInfo);
-
- labelInfo = new BaseViewInfo(6006, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- labelInfo = new BaseViewInfo(6013, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- viewInfo = new BaseViewInfo(4009, ViewInfo.Edge, "");
- root.addNode(1000, viewInfo);
-
- labelInfo = new BaseViewInfo(6007, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- labelInfo = new BaseViewInfo(6014, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- viewInfo = new BaseViewInfo(4010, ViewInfo.Edge, "");
- root.addNode(1000, viewInfo);
-
- viewInfo = new BaseViewInfo(4011, ViewInfo.Edge, "");
- root.addNode(1000, viewInfo);
-
- viewInfo = new BaseViewInfo(4012, ViewInfo.Edge, "");
- root.addNode(1000, viewInfo);
-
- labelInfo = new BaseViewInfo(6015, ViewInfo.Label, "", null, viewInfo);
- viewInfo.getChildren().add(labelInfo);
-
- viewInfo = new BaseViewInfo(3007, ViewInfo.Node, "ConsiderIgnoreFragment");
-
- root.addNode(7001, viewInfo);
-
- root.addNode(3005, viewInfo);
-
- viewInfo = new BaseViewInfo(3004, ViewInfo.Node, "CombinedFragment");
-
- root.addNode(3005, viewInfo);
-
- root.addNode(7001, viewInfo);
-
- viewInfo = new BaseViewInfo(3005, ViewInfo.Node, "InteractionOperand");
-
- root.addNode(7004, viewInfo);
-
- viewInfo = new BaseViewInfo(3002, ViewInfo.Node, "InteractionUse");
-
- root.addNode(3005, viewInfo);
-
- root.addNode(7001, viewInfo);
-
- viewInfo = new BaseViewInfo(3016, ViewInfo.Node, "Continuation");
-
- root.addNode(3005, viewInfo);
-
- viewInfo = new BaseViewInfo(3001, ViewInfo.Node, "Lifeline");
-
- root.addNode(7001, viewInfo);
-
- viewInfo = new BaseViewInfo(3006, ViewInfo.Node, "ActionExecutionSpecification");
-
- root.addNode(3001, viewInfo);
-
- viewInfo = new BaseViewInfo(3003, ViewInfo.Node, "BehaviorExecutionSpecification");
-
- root.addNode(3001, viewInfo);
-
- viewInfo = new BaseViewInfo(3017, ViewInfo.Node, "StateInvariant");
-
- root.addNode(3001, viewInfo);
-
- viewInfo = new BaseViewInfo(3018, ViewInfo.Node, "CombinedFragment");
-
- root.addNode(3001, viewInfo);
-
- viewInfo = new BaseViewInfo(3019, ViewInfo.Node, "TimeConstraint");
-
- root.addNode(3001, viewInfo);
-
- viewInfo = new BaseViewInfo(3020, ViewInfo.Node, "TimeObservation");
-
- root.addNode(3001, viewInfo);
-
- viewInfo = new BaseViewInfo(3021, ViewInfo.Node, "DurationConstraint");
-
- root.addNode(3001, viewInfo);
-
- viewInfo = new BaseViewInfo(3022, ViewInfo.Node, "DestructionOccurrenceSpecification");
-
- root.addNode(3001, viewInfo);
-
- viewInfo = new BaseViewInfo(3008, ViewInfo.Node, "Constraint");
-
- root.addNode(7001, viewInfo);
-
- viewInfo = new BaseViewInfo(3009, ViewInfo.Node, "Comment");
-
- root.addNode(7001, viewInfo);
-
- viewInfo = new BaseViewInfo(3023, ViewInfo.Node, "DurationConstraint");
-
- root.addNode(2001, viewInfo);
-
- viewInfo = new BaseViewInfo(3024, ViewInfo.Node, "DurationObservation");
-
- root.addNode(2001, viewInfo);
-
- return root;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/ValidateAction.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/ValidateAction.java
deleted file mode 100644
index 62fdbccc682..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/part/ValidateAction.java
+++ /dev/null
@@ -1,254 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.part;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.Diagnostician;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.emf.validation.model.EvaluationMode;
-import org.eclipse.emf.validation.model.IConstraintStatus;
-import org.eclipse.emf.validation.service.IBatchValidator;
-import org.eclipse.emf.validation.service.ModelValidationService;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gmf.runtime.diagram.ui.OffscreenEditPartFactory;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLMarkerNavigationProvider;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLValidationProvider;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
-
-/**
- * @generated
- */
-public class ValidateAction extends Action {
-
- /**
- * @generated
- */
- private IWorkbenchPage page;
-
- /**
- * @generated
- */
- public ValidateAction(IWorkbenchPage page) {
- setText(Messages.ValidateActionMessage);
- this.page = page;
- }
-
- /**
- * @generated
- */
- public void run() {
- IWorkbenchPart workbenchPart = page.getActivePart();
- if(workbenchPart instanceof IDiagramWorkbenchPart) {
- final IDiagramWorkbenchPart part = (IDiagramWorkbenchPart)workbenchPart;
- try {
- new WorkspaceModifyDelegatingOperation(new IRunnableWithProgress() {
-
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- runValidation(part.getDiagramEditPart(), part.getDiagram());
- }
- }).run(new NullProgressMonitor());
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * @generated
- */
- public static void runValidation(View view) {
- try {
- if(UMLDiagramEditorUtil.openDiagram(view.eResource())) {
- IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if(editorPart instanceof IDiagramWorkbenchPart) {
- runValidation(((IDiagramWorkbenchPart)editorPart).getDiagramEditPart(), view);
- } else {
- runNonUIValidation(view);
- }
- }
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public static void runNonUIValidation(View view) {
- DiagramEditPart diagramEditPart = OffscreenEditPartFactory.getInstance().createDiagramEditPart(view.getDiagram());
- runValidation(diagramEditPart, view);
- }
-
- /**
- * @generated
- */
- public static void runValidation(DiagramEditPart diagramEditPart, View view) {
- final DiagramEditPart fpart = diagramEditPart;
- final View fview = view;
- TransactionalEditingDomain txDomain = TransactionUtil.getEditingDomain(view);
- UMLValidationProvider.runWithConstraints(txDomain, new Runnable() {
-
- public void run() {
- validate(fpart, fview);
- }
- });
- }
-
- /**
- * @generated
- */
- private static Diagnostic runEMFValidator(View target) {
- if(target.isSetElement() && target.getElement() != null) {
- return new Diagnostician() {
-
- public String getObjectLabel(EObject eObject) {
- return EMFCoreUtil.getQualifiedName(eObject, true);
- }
- }.validate(target.getElement());
- }
- return Diagnostic.OK_INSTANCE;
- }
-
- /**
- * @generated
- */
- private static void validate(DiagramEditPart diagramEditPart, View view) {
- IFile target = view.eResource() != null ? WorkspaceSynchronizer.getFile(view.eResource()) : null;
- if(target != null) {
- UMLMarkerNavigationProvider.deleteMarkers(target);
- }
- Diagnostic diagnostic = runEMFValidator(view);
- createMarkers(target, diagnostic, diagramEditPart);
- IBatchValidator validator = (IBatchValidator)ModelValidationService.getInstance().newValidator(EvaluationMode.BATCH);
- validator.setIncludeLiveConstraints(true);
- if(view.isSetElement() && view.getElement() != null) {
- IStatus status = validator.validate(view.getElement());
- createMarkers(target, status, diagramEditPart);
- }
- validator.setTraversalStrategy(UMLValidationProvider.getNotationTraversalStrategy(validator));
- IStatus status = validator.validate(view);
- createMarkers(target, status, diagramEditPart);
- }
-
- /**
- * @generated
- */
- private static void createMarkers(IFile target, IStatus validationStatus, DiagramEditPart diagramEditPart) {
- if(validationStatus.isOK()) {
- return;
- }
- final IStatus rootStatus = validationStatus;
- List allStatuses = new ArrayList();
- UMLDiagramEditorUtil.LazyElement2ViewMap element2ViewMap = new UMLDiagramEditorUtil.LazyElement2ViewMap(diagramEditPart.getDiagramView(), collectTargetElements(rootStatus, new HashSet<EObject>(), allStatuses));
- for(Iterator it = allStatuses.iterator(); it.hasNext();) {
- IConstraintStatus nextStatus = (IConstraintStatus)it.next();
- View view = UMLDiagramEditorUtil.findView(diagramEditPart, nextStatus.getTarget(), element2ViewMap);
- addMarker(diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view), EMFCoreUtil.getQualifiedName(nextStatus.getTarget(), true), nextStatus.getMessage(), nextStatus.getSeverity());
- }
- }
-
- /**
- * @generated
- */
- private static void createMarkers(IFile target, Diagnostic emfValidationStatus, DiagramEditPart diagramEditPart) {
- if(emfValidationStatus.getSeverity() == Diagnostic.OK) {
- return;
- }
- final Diagnostic rootStatus = emfValidationStatus;
- List allDiagnostics = new ArrayList();
- UMLDiagramEditorUtil.LazyElement2ViewMap element2ViewMap = new UMLDiagramEditorUtil.LazyElement2ViewMap(diagramEditPart.getDiagramView(), collectTargetElements(rootStatus, new HashSet<EObject>(), allDiagnostics));
- for(Iterator it = emfValidationStatus.getChildren().iterator(); it.hasNext();) {
- Diagnostic nextDiagnostic = (Diagnostic)it.next();
- List data = nextDiagnostic.getData();
- if(data != null && !data.isEmpty() && data.get(0) instanceof EObject) {
- EObject element = (EObject)data.get(0);
- View view = UMLDiagramEditorUtil.findView(diagramEditPart, element, element2ViewMap);
- addMarker(diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view), EMFCoreUtil.getQualifiedName(element, true), nextDiagnostic.getMessage(), diagnosticToStatusSeverity(nextDiagnostic.getSeverity()));
- }
- }
- }
-
- /**
- * @generated
- */
- private static void addMarker(EditPartViewer viewer, IFile target, String elementId, String location, String message, int statusSeverity) {
- if(target == null) {
- return;
- }
- UMLMarkerNavigationProvider.addMarker(target, elementId, location, message, statusSeverity);
- }
-
- /**
- * @generated
- */
- private static int diagnosticToStatusSeverity(int diagnosticSeverity) {
- if(diagnosticSeverity == Diagnostic.OK) {
- return IStatus.OK;
- } else if(diagnosticSeverity == Diagnostic.INFO) {
- return IStatus.INFO;
- } else if(diagnosticSeverity == Diagnostic.WARNING) {
- return IStatus.WARNING;
- } else if(diagnosticSeverity == Diagnostic.ERROR || diagnosticSeverity == Diagnostic.CANCEL) {
- return IStatus.ERROR;
- }
- return IStatus.INFO;
- }
-
- /**
- * @generated
- */
- private static Set<EObject> collectTargetElements(IStatus status, Set<EObject> targetElementCollector, List allConstraintStatuses) {
- if(status instanceof IConstraintStatus) {
- targetElementCollector.add(((IConstraintStatus)status).getTarget());
- allConstraintStatuses.add(status);
- }
- if(status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for(int i = 0; i < children.length; i++) {
- collectTargetElements(children[i], targetElementCollector, allConstraintStatuses);
- }
- }
- return targetElementCollector;
- }
-
- /**
- * @generated
- */
- private static Set<EObject> collectTargetElements(Diagnostic diagnostic, Set<EObject> targetElementCollector, List allDiagnostics) {
- List data = diagnostic.getData();
- EObject target = null;
- if(data != null && !data.isEmpty() && data.get(0) instanceof EObject) {
- target = (EObject)data.get(0);
- targetElementCollector.add(target);
- allDiagnostics.add(diagnostic);
- }
- if(diagnostic.getChildren() != null && !diagnostic.getChildren().isEmpty()) {
- for(Iterator it = diagnostic.getChildren().iterator(); it.hasNext();) {
- collectTargetElements((Diagnostic)it.next(), targetElementCollector, allDiagnostics);
- }
- }
- return targetElementCollector;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ActionExecutionSpecificationPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ActionExecutionSpecificationPreferencePage.java
deleted file mode 100644
index c07ef8b3f38..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ActionExecutionSpecificationPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class ActionExecutionSpecificationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public ActionExecutionSpecificationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_ActionExecutionSpecification");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_ActionExecutionSpecification";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 16);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 60);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/BehaviorExecutionSpecificationPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/BehaviorExecutionSpecificationPreferencePage.java
deleted file mode 100644
index 06bed7c0557..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/BehaviorExecutionSpecificationPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class BehaviorExecutionSpecificationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public BehaviorExecutionSpecificationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_BehaviorExecutionSpecification");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_BehaviorExecutionSpecification";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 16);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 60);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CombinedFragmentPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CombinedFragmentPreferencePage.java
deleted file mode 100644
index 2a8263636c4..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CombinedFragmentPreferencePage.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- * Vincent Lorenzo - vincent.lorenzo@cea.fr - CEA - LIST
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import java.util.TreeMap;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class CombinedFragmentPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated NOT
- */
- public static final String compartments[] = { Messages.CombinedFragmentCombinedFragmentCompartmentEditPart_title };
-
- /**
- * @generated
- */
- public CombinedFragmentPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_CombinedFragment");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated NOT
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_CombinedFragment";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- for(String name : compartments) {
- String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(key, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, true);
- }
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
- }
-
- protected TreeMap<String, Boolean> getCompartmentTitleVisibilityPreferences() {
- TreeMap<String, Boolean> map = new TreeMap<String, Boolean>();
- for(String name : compartments) {
- map.put(name,Boolean.FALSE);
- }
- return map;
- }
-
- /**
- * @generated NOT
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CommentPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CommentPreferencePage.java
deleted file mode 100644
index 7473f5eee49..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/CommentPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class CommentPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public CommentPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Comment");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_Comment";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConsiderIgnoreFragmentPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConsiderIgnoreFragmentPreferencePage.java
deleted file mode 100644
index 204d6ce2968..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConsiderIgnoreFragmentPreferencePage.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- * Vincent Lorenzo - vincent.lorenzo@cea.fr - CEA - LIST
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import java.util.TreeMap;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class ConsiderIgnoreFragmentPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated NOT
- */
- public static final String compartments[] = { Messages.CombinedFragmentCombinedFragmentCompartmentEditPart_title };
-
- /**
- * @generated
- */
- public ConsiderIgnoreFragmentPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_ConsiderIgnoreFragment");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated NOT
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_ConsiderIgnoreFragment";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- for(String name : compartments) {
- String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(key, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, true);
- }
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
- protected TreeMap<String, Boolean> getCompartmentTitleVisibilityPreferences() {
- TreeMap<String, Boolean> map = new TreeMap<String, Boolean>();
- for(String name : compartments) {
- map.put(name,Boolean.FALSE);
- }
- return map;
- }
-
- /**
- * @generated NOT
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConstraintPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConstraintPreferencePage.java
deleted file mode 100644
index b69e50ca764..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ConstraintPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class ConstraintPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public ConstraintPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Constraint");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_Constraint";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ContinuationPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ContinuationPreferencePage.java
deleted file mode 100644
index 70ae01e6746..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/ContinuationPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class ContinuationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public ContinuationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Continuation");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_Continuation";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionEventPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionEventPreferencePage.java
deleted file mode 100644
index 08cb5d73f88..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionEventPreferencePage.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DestructionEventPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public DestructionEventPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_DestructionEvent");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_DestructionEvent";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionOccurrenceSpecificationPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionOccurrenceSpecificationPreferencePage.java
deleted file mode 100644
index d2a923cadee..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DestructionOccurrenceSpecificationPreferencePage.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DestructionOccurrenceSpecificationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public DestructionOccurrenceSpecificationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_DestructionOccurrenceSpecification");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_DestructionOccurrenceSpecification";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 20);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 20);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramAppearancePreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramAppearancePreferencePage.java
deleted file mode 100644
index 8823b546c25..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramAppearancePreferencePage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.gmf.runtime.diagram.ui.preferences.AppearancePreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DiagramAppearancePreferencePage extends AppearancePreferencePage {
-
- /**
- * @generated
- */
- public DiagramAppearancePreferencePage() {
- setPreferenceStore(UMLDiagramEditorPlugin.getInstance().getPreferenceStore());
-
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramConnectionsPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramConnectionsPreferencePage.java
deleted file mode 100644
index edb12fdb1d1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramConnectionsPreferencePage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.gmf.runtime.diagram.ui.preferences.ConnectionsPreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DiagramConnectionsPreferencePage extends ConnectionsPreferencePage {
-
- /**
- * @generated
- */
- public DiagramConnectionsPreferencePage() {
- setPreferenceStore(UMLDiagramEditorPlugin.getInstance().getPreferenceStore());
-
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramGeneralPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramGeneralPreferencePage.java
deleted file mode 100644
index e4309efb794..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramGeneralPreferencePage.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.DiagramPreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DiagramGeneralPreferencePage extends DiagramPreferencePage {
-
- /**
- * @generated
- */
- public DiagramGeneralPreferencePage() {
- setPreferenceStore(UMLDiagramEditorPlugin.getInstance().getPreferenceStore());
- setPreferenceKey(PackageEditPart.MODEL_ID);
-
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPreferenceInitializer.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPreferenceInitializer.java
deleted file mode 100644
index 440ce6a923b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPreferenceInitializer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /**
- * Add the diagram preference page to the initialization
- *
- * @generated NOT (update at each gmf change) diagram preference page
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = getPreferenceStore();
-
- TimeObservationPreferencePage.initDefaults(store);
-
- CommentPreferencePage.initDefaults(store);
-
- StateInvariantPreferencePage.initDefaults(store);
-
- CombinedFragmentPreferencePage.initDefaults(store);
-
- ConstraintPreferencePage.initDefaults(store);
-
- ActionExecutionSpecificationPreferencePage.initDefaults(store);
-
- InteractionOperandPreferencePage.initDefaults(store);
-
- DestructionEventPreferencePage.initDefaults(store);
-
- InteractionPreferencePage.initDefaults(store);
-
- DurationConstraintPreferencePage.initDefaults(store);
-
- InteractionUsePreferencePage.initDefaults(store);
-
- ContinuationPreferencePage.initDefaults(store);
-
- ConsiderIgnoreFragmentPreferencePage.initDefaults(store);
-
- DurationObservationPreferencePage.initDefaults(store);
-
- TimeConstraintPreferencePage.initDefaults(store);
-
- LifelinePreferencePage.initDefaults(store);
-
- BehaviorExecutionSpecificationPreferencePage.initDefaults(store);
-
- MessagePreferencePage.initDefaults(store);
-
- GeneralOrderingPreferencePage.initDefaults(store);
-
- // diagram preference page
- DiagramGeneralPreferencePage.initDefaults(store);
-
- DestructionOccurrenceSpecificationPreferencePage.initDefaults(store);
-
- }
-
- /**
- * @generated
- */
- protected IPreferenceStore getPreferenceStore() {
- return UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPrintingPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPrintingPreferencePage.java
deleted file mode 100644
index c1cdac5af75..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramPrintingPreferencePage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.gmf.runtime.diagram.ui.preferences.PrintingPreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DiagramPrintingPreferencePage extends PrintingPreferencePage {
-
- /**
- * @generated
- */
- public DiagramPrintingPreferencePage() {
- setPreferenceStore(UMLDiagramEditorPlugin.getInstance().getPreferenceStore());
-
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramRulersAndGridPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramRulersAndGridPreferencePage.java
deleted file mode 100644
index d72d136f704..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DiagramRulersAndGridPreferencePage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DiagramRulersAndGridPreferencePage extends RulerGridPreferencePage {
-
- /**
- * @generated
- */
- public DiagramRulersAndGridPreferencePage() {
- setPreferenceStore(UMLDiagramEditorPlugin.getInstance().getPreferenceStore());
-
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintInMessagePreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintInMessagePreferencePage.java
deleted file mode 100644
index 9872c421d07..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintInMessagePreferencePage.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:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DurationConstraintInMessagePreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.getInstance().ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String elementName = "DurationConstraintInMessage";
- PreferenceConverter.setDefault(store, PreferenceConstantHelper.getElementConstant(elementName, PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- PreferenceConverter.setDefault(store, PreferenceConstantHelper.getElementConstant(elementName, PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- store.setDefault(PreferenceConstantHelper.getElementConstant(elementName, PreferenceConstantHelper.GRADIENT_POLICY), false);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(new org.eclipse.swt.graphics.RGB(255, 255, 255), new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- store.setDefault(PreferenceConstantHelper.getElementConstant(elementName, PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintPreferencePage.java
deleted file mode 100644
index d314e3c868c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationConstraintPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DurationConstraintPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public DurationConstraintPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_DurationConstraint");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_DurationConstraint";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationObservationPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationObservationPreferencePage.java
deleted file mode 100644
index bfa6050a23e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/DurationObservationPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class DurationObservationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public DurationObservationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_DurationObservation");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_DurationObservation";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/GeneralOrderingPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/GeneralOrderingPreferencePage.java
deleted file mode 100644
index bfccdb68faa..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/GeneralOrderingPreferencePage.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class GeneralOrderingPreferencePage extends AbstractPapyrusLinkPreferencePage {
-
- /**
- * @generated
- */
- public GeneralOrderingPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_GeneralOrdering");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionOperandPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionOperandPreferencePage.java
deleted file mode 100644
index 2d6da38769c..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionOperandPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class InteractionOperandPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public InteractionOperandPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_InteractionOperand");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_InteractionOperand";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionPreferencePage.java
deleted file mode 100644
index b14bc322e82..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionPreferencePage.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class InteractionPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public static final String compartments[] = { "InteractionCompartment" };
-
- /**
- * @generated
- */
- public InteractionPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Interaction");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_Interaction";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 857);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 757);
-
- Map<String, Boolean> map = getStaticCompartmentVisibilityPreferences();
- for(String name : map.keySet()) {
- String preferenceName = PreferenceConstantHelper.getLabelElementConstant(key, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, map.get(name));
- }
-
- map = getStaticCompartmentTitleVisibilityPreferences();
- for(String name : map.keySet()) {
- String preferenceName = PreferenceConstantHelper.getLabelElementConstant(key, name, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY);
- store.setDefault(preferenceName, map.get(name));
- }
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
- /**
- * @generated
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-
- /**
- * @generated
- */
- private static TreeMap<String, Boolean> getStaticCompartmentVisibilityPreferences() {
- TreeMap<String, Boolean> map = new TreeMap<String, Boolean>();
- map.put("InteractionCompartment", Boolean.TRUE);
- return map;
- }
-
- /**
- * @generated
- */
- private static TreeMap<String, Boolean> getStaticCompartmentTitleVisibilityPreferences() {
- TreeMap<String, Boolean> map = new TreeMap<String, Boolean>();
- return map;
- }
-
- /**
- * @generated
- */
- protected TreeMap<String, Boolean> getCompartmentTitleVisibilityPreferences() {
- return getStaticCompartmentTitleVisibilityPreferences();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionUsePreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionUsePreferencePage.java
deleted file mode 100644
index 3734aea4ae8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/InteractionUsePreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class InteractionUsePreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public InteractionUsePreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_InteractionUse");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_InteractionUse";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/LifelinePreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/LifelinePreferencePage.java
deleted file mode 100644
index 5ee85195f6d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/LifelinePreferencePage.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-
-/**
- * @generated
- */
-public class LifelinePreferencePage extends AbstractPapyrusNodePreferencePage {
-
- public static final String LABEL_DISPLAY_PREFERENCE = PackageEditPart.MODEL_ID + "_Lifeline.label.display";
-
-
- public static final int SHOW_REPRESENT_NAME = 1 << 1;
-
- public static final int SHOW_REPRESENT_TYPE = 1 << 2;
-
- public static final int SHOW_UNDEFINED_TYPE = 1 << 3;
-
- public static final int SHOW_LIFELINE_NAME = 1 << 4;
-
- public static final int DEFAULT_LABEL_DISPLAY = SHOW_REPRESENT_NAME | SHOW_REPRESENT_TYPE;
- /**
- * @generated
- */
- public LifelinePreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Lifeline");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_Lifeline";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 100);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 250);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- // default for label display
- store.setDefault(LABEL_DISPLAY_PREFERENCE, DEFAULT_LABEL_DISPLAY);
- }
-
- /** buttons to select the display kind for the label of the */
- protected Button showRepName, showRepType, showUndefined, showName;
-
- /** current operation display style */
- private int displayValue = getPreferenceStore().getInt(LABEL_DISPLAY_PREFERENCE);
-
- /**
- * Creates a button with the {@link SWT#CHECK} style.
- *
- * @param parent
- * the parent of the button
- * @param label
- * the label of the button
- * @param mask
- * the value controlled by the button
- * @return the button created
- */
- protected Button createCheckButton(Composite parent, String label, int mask) {
- Button button = new Button(parent, SWT.CHECK);
- button.setText(label);
- button.addSelectionListener(new AppearenceSelectionListener(mask));
- return button;
- }
-
- /**
- * Listeners for the check buttons that select the display of the label
- */
- private class AppearenceSelectionListener implements SelectionListener {
-
- /** the constant which refers the element to display or not */
- final private int style;
-
- /**
- * Default Constructor.
- *
- * @param style
- */
- public AppearenceSelectionListener(int style) {
- this.style = style;
- }
-
- /**
- * {@inheritDoc}
- */
- public void widgetDefaultSelected(SelectionEvent e) {
-
- }
-
- /**
- * {@inheritDoc}
- */
- public void widgetSelected(SelectionEvent e) {
- // add or remove the flag to the display Operation value (invert the current value)
- displayValue = displayValue ^ style;
-
- // refresh buttons at the end
- refreshButtons();
- }
- }
-
- /**
- * Creates the group and check boxes to choose the kind of display
- *
- * @param parent
- * the parent composite that holds the group
- */
- protected void createLabelPreferencesButtons(Composite parent) {
- // create group that host the buttons
- Group group = new Group(parent, SWT.SHADOW_NONE);
- group.setText("Label Display");
- group.setLayout(new GridLayout(1, true));
-
- showRepName = createCheckButton(group, "Show represent name", SHOW_REPRESENT_NAME);
- showRepType = createCheckButton(group, "Show represent type", SHOW_REPRESENT_TYPE);
- showUndefined = createCheckButton(group, "Always show undefined type", SHOW_UNDEFINED_TYPE);
- showName = createCheckButton(group, "Always show lifeline name", SHOW_LIFELINE_NAME);
- }
-
- protected void createPageContents(Composite parent) {
- super.createPageContents(parent);
-
- // adds the label preferences checkboxes
- createLabelPreferencesButtons(parent);
-
- refreshButtons();
- }
-
- /**
- * Load the default preferences of the fields contained in this page
- */
- protected void loadDefaultPreferences() {
- displayValue = getPreferenceStore().getInt(LABEL_DISPLAY_PREFERENCE);
- refreshButtons();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void performDefaults() {
- loadDefaultPreferences();
- super.performDefaults();
- }
-
-
- @Override
- public boolean performOk() {
- storePreferences();
- return super.performOk();
- }
-
-
- protected void refreshButtons() {
- showRepName.setSelection(isCheck(displayValue , SHOW_REPRESENT_NAME));
- showRepType.setSelection(isCheck(displayValue , SHOW_REPRESENT_TYPE) );
- showUndefined.setSelection(isCheck(displayValue , SHOW_UNDEFINED_TYPE) );
- showName.setSelection(isCheck(displayValue , SHOW_LIFELINE_NAME));
- }
-
- private static boolean isCheck(int value, int mask){
- return (value & mask) != 0;
- }
-
- /**
- * Stores the values of the fields contained in this page into the preference store.
- */
- protected void storePreferences() {
- super.storePreferences();
- IPreferenceStore store = getPreferenceStore();
- // checks the stored value and the actual one, so does not refresh diagram if it is not
- // needed
- if(displayValue != store.getInt(LABEL_DISPLAY_PREFERENCE)) {
- store.setValue(LABEL_DISPLAY_PREFERENCE, displayValue);
- }
- }
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessageOccurrenceSpecificationPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessageOccurrenceSpecificationPreferencePage.java
deleted file mode 100644
index 8e3c8e56902..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessageOccurrenceSpecificationPreferencePage.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class MessageOccurrenceSpecificationPreferencePage extends AbstractPapyrusLinkPreferencePage {
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.getInstance().ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessagePreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessagePreferencePage.java
deleted file mode 100644
index c0b8203642f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/MessagePreferencePage.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-
-/**
- * @generated
- */
-public class MessagePreferencePage extends AbstractPapyrusLinkPreferencePage {
-
- /**
- * @generated
- */
- public MessagePreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_Message");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
- // default for label display
- store.setDefault(LABEL_DISPLAY_PREFERENCE, DEFAULT_LABEL_DISPLAY);
- }
-
- public static final String LABEL_DISPLAY_PREFERENCE = PackageEditPart.MODEL_ID + "_Message.label.display";
-
- public static final int DEFAULT_LABEL_DISPLAY = ICustomAppearence.DISP_NAME | ICustomAppearence.DISP_PARAMETER_NAME | ICustomAppearence.DISP_PARAMETER_TYPE | ICustomAppearence.DISP_RT_TYPE;
-
- /** current operation display style */
- private int displayValue = getPreferenceStore().getInt(LABEL_DISPLAY_PREFERENCE);
-
- /** buttons to select the display kind for the label of */
- private Button dispParamDir ,dispParamMod, dispParamName, dispVis, dispParamType, dispReturnType, dispParamMul, dispParamDef , dispName, dispMod,dispParamVal;
-
- /**
- * Creates the group and check boxes to choose the kind of display
- *
- * @param parent
- * the parent composite that holds the group
- */
- protected void createLabelPreferencesButtons(Composite parent) {
- // create group that host the buttons
- Group group = new Group(parent, SWT.SHADOW_NONE);
- group.setText("Label Display");
- group.setLayout(new GridLayout(2, true));
-
- dispParamDir = createCheckButton(group, "Parameters Direction", ICustomAppearence.DISP_PARAMETER_DIRECTION);
- dispParamMod = createCheckButton(group, "Parameters Modifiers", ICustomAppearence.DISP_PARAMETER_MODIFIERS);
- dispParamName = createCheckButton(group, "Parameters Name", ICustomAppearence.DISP_PARAMETER_NAME);
- dispVis = createCheckButton(group, "Visibility", ICustomAppearence.DISP_VISIBILITY);
- dispParamType = createCheckButton(group, "Parameters Type", ICustomAppearence.DISP_PARAMETER_TYPE);
- dispReturnType = createCheckButton(group, "Return Type", ICustomAppearence.DISP_RT_TYPE);
- dispParamMul = createCheckButton(group, "Parameters Multiplicity", ICustomAppearence.DISP_PARAMETER_MULTIPLICITY);
- dispParamDef = createCheckButton(group, "Parameters Default Value", ICustomAppearence.DISP_PARAMETER_DEFAULT);
- dispParamVal = createCheckButton(group, "Parameters Value", ICustomAppearence.DISP_DERIVE);
- dispName = createCheckButton(group, "Name", ICustomAppearence.DISP_NAME);
- dispMod = createCheckButton(group, "Modifiers", ICustomAppearence.DISP_MOFIFIERS);
- }
-
- protected void refreshButtons(SelectionEvent e) {
- dispParamDir.setSelection(isCheck(displayValue , ICustomAppearence.DISP_PARAMETER_DIRECTION));
- dispParamMod.setSelection(isCheck(displayValue , ICustomAppearence.DISP_PARAMETER_MODIFIERS));
- dispParamName.setSelection(isCheck(displayValue , ICustomAppearence.DISP_PARAMETER_NAME));
- dispVis.setSelection(isCheck(displayValue , ICustomAppearence.DISP_VISIBILITY));
- dispParamType.setSelection(isCheck(displayValue , ICustomAppearence.DISP_PARAMETER_TYPE));
- dispReturnType.setSelection(isCheck(displayValue , ICustomAppearence.DISP_RT_TYPE));
- dispParamMul.setSelection(isCheck(displayValue , ICustomAppearence.DISP_PARAMETER_MULTIPLICITY));
- dispParamDef.setSelection(isCheck(displayValue , ICustomAppearence.DISP_PARAMETER_DEFAULT));
- dispParamVal.setSelection(isCheck(displayValue , ICustomAppearence.DISP_DERIVE));
- dispName.setSelection(isCheck(displayValue , ICustomAppearence.DISP_NAME));
- dispMod.setSelection(isCheck(displayValue , ICustomAppearence.DISP_MOFIFIERS));
- if(e != null && dispParamDef.getSelection() && dispParamVal.getSelection()){
- // parameter default and value can only select one of them
- if(e.widget == dispParamDef){
- dispParamVal.setSelection(false);
- displayValue = displayValue ^ ICustomAppearence.DISP_DERIVE;
- }else if(e.widget == dispParamVal){
- dispParamDef.setSelection(false);
- displayValue = displayValue ^ ICustomAppearence.DISP_PARAMETER_DEFAULT;
- }
- }
- }
-
- protected void createPageContents(Composite parent) {
- super.createPageContents(parent);
-
- // adds the label preferences checkboxes
- createLabelPreferencesButtons(parent);
-
- refreshButtons(null);
- }
-
- /**
- * Load the default preferences of the fields contained in this page
- */
- @Override
- protected void performDefaults() {
- displayValue = getPreferenceStore().getInt(LABEL_DISPLAY_PREFERENCE);
- refreshButtons(null);
- super.performDefaults();
- }
-
-
- @Override
- public boolean performOk() {
- storePreferences();
- return super.performOk();
- }
-
- private static boolean isCheck(int value, int mask){
- return (value & mask) != 0;
- }
-
- /**
- * Stores the values of the fields contained in this page into the preference store.
- */
- protected void storePreferences() {
- super.storePreferences();
- IPreferenceStore store = getPreferenceStore();
- // checks the stored value and the actual one, so does not refresh diagram if it is not
- // needed
- if(displayValue != store.getInt(LABEL_DISPLAY_PREFERENCE)) {
- store.setValue(LABEL_DISPLAY_PREFERENCE, displayValue);
- }
- }
-
-
- /**
- * Creates a button with the {@link SWT#CHECK} style.
- *
- * @param parent
- * the parent of the button
- * @param label
- * the label of the button
- * @param mask
- * the value controlled by the button
- * @return the button created
- */
- protected Button createCheckButton(Composite parent, String label, int mask) {
- Button button = new Button(parent, SWT.CHECK);
- button.setText(label);
- button.addSelectionListener(new AppearenceSelectionListener(mask));
- return button;
- }
-
- /**
- * Listeners for the check buttons that select the display of the label
- */
- private class AppearenceSelectionListener implements SelectionListener {
-
- /** the constant which refers the element to display or not */
- final private int style;
-
- /**
- * Default Constructor.
- *
- * @param style
- */
- public AppearenceSelectionListener(int style) {
- this.style = style;
- }
-
- /**
- * {@inheritDoc}
- */
- public void widgetDefaultSelected(SelectionEvent e) {
-
- }
-
- /**
- * {@inheritDoc}
- */
- public void widgetSelected(SelectionEvent e) {
- // add or remove the flag to the display Operation value (invert the current value)
- displayValue = displayValue ^ style;
-
- // refresh buttons at the end
- refreshButtons(e);
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/StateInvariantPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/StateInvariantPreferencePage.java
deleted file mode 100644
index 743ccbd53cf..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/StateInvariantPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class StateInvariantPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public StateInvariantPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_StateInvariant");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_StateInvariant";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeConstraintPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeConstraintPreferencePage.java
deleted file mode 100644
index fec6b589931..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeConstraintPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class TimeConstraintPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public TimeConstraintPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_TimeConstraint");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_TimeConstraint";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeObservationPreferencePage.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeObservationPreferencePage.java
deleted file mode 100644
index 7e32e020e43..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/preferences/TimeObservationPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class TimeObservationPreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /**
- * @generated
- */
- public TimeObservationPreferencePage() {
- super();
- setPreferenceKey(PackageEditPart.MODEL_ID + "_TimeObservation");
- }
-
- /**
- * @generated
- */
- @Override
- protected String getBundleId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- public static void initDefaults(IPreferenceStore store) {
-
- String key = PackageEditPart.MODEL_ID + "_TimeObservation";
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.WIDTH), 40);
- store.setDefault(PreferenceConstantHelper.getElementConstant(key, PreferenceConstantHelper.HEIGHT), 40);
-
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- //org.eclipse.jface.preference.PreferenceConverter.setDefault(store, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.GRADIENT_POLICY),false);
- //org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter gradientPreferenceConverter = new org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter(
- // new org.eclipse.swt.graphics.RGB(255, 255, 255),
- // new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- //store.setDefault(org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.getElementConstant(elementName, org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/ElementInitializers.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/ElementInitializers.java
deleted file mode 100644
index 1f9a6da242d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/ElementInitializers.java
+++ /dev/null
@@ -1,613 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.papyrus.uml.diagram.sequence.expressions.UMLOCLFactory;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.ConsiderIgnoreFragment;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Continuation;
-import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
-import org.eclipse.uml2.uml.Duration;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.DurationInterval;
-import org.eclipse.uml2.uml.DurationObservation;
-import org.eclipse.uml2.uml.GeneralOrdering;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionUse;
-import org.eclipse.uml2.uml.Lifeline;
-import org.eclipse.uml2.uml.LiteralString;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.StateInvariant;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.TimeExpression;
-import org.eclipse.uml2.uml.TimeInterval;
-import org.eclipse.uml2.uml.TimeObservation;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ElementInitializers {
-
- protected ElementInitializers() {
- // use #getInstance to access cached instance
- }
-
- /**
- * @generated
- */
- public void init_Interaction_2001(Interaction instance) {
- try {
- Object value_0 = name_Interaction_2001(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_ConsiderIgnoreFragment_3007(ConsiderIgnoreFragment instance) {
- try {
- Object value_0 = name_ConsiderIgnoreFragment_3007(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_CombinedFragment_3004(CombinedFragment instance) {
- try {
- Object value_0 = name_CombinedFragment_3004(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_InteractionUse_3002(InteractionUse instance) {
- try {
- Object value_0 = name_InteractionUse_3002(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Continuation_3016(Continuation instance) {
- try {
- Object value_0 = name_Continuation_3016(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Lifeline_3001(Lifeline instance) {
- try {
- Object value_0 = name_Lifeline_3001(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_StateInvariant_3017(StateInvariant instance) {
- try {
- Object value_0 = name_StateInvariant_3017(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_CombinedFragment_3018(CombinedFragment instance) {
- try {
- Object value_0 = name_CombinedFragment_3018(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated NOT init Time Interval
- */
- public void init_TimeConstraint_3019(TimeConstraint instance) {
- try {
- TimeInterval newInstance_0_0 = UMLFactory.eINSTANCE.createTimeInterval();
- instance.setSpecification(newInstance_0_0);
- Object value_0_0_0 = name_specification_TimeConstraint_3019(newInstance_0_0);
- newInstance_0_0.setName((String)value_0_0_0);
-
- // init Time Interval
- init_TimeInterval(newInstance_0_0);
-
- Object value_1 = name_TimeConstraint_3019(instance);
- instance.setName((String)value_1);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_TimeObservation_3020(TimeObservation instance) {
- try {
- Object value_0 = name_TimeObservation_3020(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated NOT init Duration Interval
- */
- public void init_DurationConstraint_3021(DurationConstraint instance) {
- try {
- DurationInterval newInstance_0_0 = UMLFactory.eINSTANCE.createDurationInterval();
- instance.setSpecification(newInstance_0_0);
- Object value_0_0_0 = name_specification_DurationConstraint_3021(newInstance_0_0);
- newInstance_0_0.setName((String)value_0_0_0);
-
- // init Duration Interval
- init_DurationInterval(newInstance_0_0);
-
- Object value_1 = name_DurationConstraint_3021(instance);
- instance.setName((String)value_1);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_DestructionOccurrenceSpecification_3022(DestructionOccurrenceSpecification instance) {
- try {
- Object value_0 = name_DestructionOccurrenceSpecification_3022(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * Initialize a time interval
- *
- * @param instance
- * instance to initialize
- */
- private void init_TimeInterval(TimeInterval instance) {
- // time interval
- TimeInterval timeInterval = instance;
-
- // create, add and set the min and max duration of the duration interval
- org.eclipse.uml2.uml.Package package_ = timeInterval.getNearestPackage();
-
- TimeExpression minTimeExpression = UMLFactory.eINSTANCE.createTimeExpression();
- TimeExpression maxTimeExpression = UMLFactory.eINSTANCE.createTimeExpression();
-
- package_.getPackagedElements().add(minTimeExpression);
- package_.getPackagedElements().add(maxTimeExpression);
-
- ElementInitializers.init_NamedElement(minTimeExpression, "", timeInterval.eClass().getName(), "Min");
- ElementInitializers.init_NamedElement(maxTimeExpression, "", timeInterval.eClass().getName(), "Max");
-
- timeInterval.setMin(minTimeExpression);
- timeInterval.setMax(maxTimeExpression);
-
- minTimeExpression.setExpr(UMLFactory.eINSTANCE.createLiteralInteger());
- maxTimeExpression.setExpr(UMLFactory.eINSTANCE.createLiteralInteger());
- }
-
- /**
- * Initialize a duration interval
- *
- * @param instance
- * instance to initialize
- */
- private void init_DurationInterval(DurationInterval instance) {
- // duration interval
- DurationInterval durationInterval = instance;
-
- // create, add and set the min and max duration of the duration interval
- org.eclipse.uml2.uml.Package package_ = durationInterval.getNearestPackage();
-
- Duration minDuration = UMLFactory.eINSTANCE.createDuration();
- Duration maxDuration = UMLFactory.eINSTANCE.createDuration();
-
- package_.getPackagedElements().add(minDuration);
- package_.getPackagedElements().add(maxDuration);
-
- ElementInitializers.init_NamedElement(minDuration, "", durationInterval.eClass().getName(), "Min");
- ElementInitializers.init_NamedElement(maxDuration, "", durationInterval.eClass().getName(), "Max");
-
- durationInterval.setMin(minDuration);
- durationInterval.setMax(maxDuration);
-
- minDuration.setExpr(UMLFactory.eINSTANCE.createLiteralInteger());
- maxDuration.setExpr(UMLFactory.eINSTANCE.createLiteralInteger());
- }
-
- /**
- * @generated
- */
- public void init_Constraint_3008(Constraint instance) {
- try {
- LiteralString newInstance_0_0 = UMLFactory.eINSTANCE.createLiteralString();
- instance.setSpecification(newInstance_0_0);
- Object value_0_0_0 = value_specification_Constraint_3008(newInstance_0_0);
- newInstance_0_0.setValue((String)value_0_0_0);
-
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Comment_3009(Comment instance) {
- try {
- Object value_0 = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getComment(), null).evaluate(instance);
- instance.setBody((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated NOT init Duration Interval
- */
- public void init_DurationConstraint_3023(DurationConstraint instance) {
- try {
- DurationInterval newInstance_0_0 = UMLFactory.eINSTANCE.createDurationInterval();
- instance.setSpecification(newInstance_0_0);
- Object value_0_0_0 = name_specification_DurationConstraint_3023(newInstance_0_0);
- newInstance_0_0.setName((String)value_0_0_0);
-
- // init Duration Interval
- init_DurationInterval(newInstance_0_0);
-
- Object value_1 = name_DurationConstraint_3023(instance);
- instance.setName((String)value_1);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_DurationObservation_3024(DurationObservation instance) {
- try {
- Object value_0 = name_DurationObservation_3024(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_GeneralOrdering_4012(GeneralOrdering instance) {
- try {
- Object value_0 = name_GeneralOrdering_4012(instance);
- instance.setName((String)value_0);
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String name_Interaction_2001(Interaction self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_ConsiderIgnoreFragment_3007(ConsiderIgnoreFragment self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_CombinedFragment_3004(CombinedFragment self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_InteractionUse_3002(InteractionUse self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_Continuation_3016(Continuation self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_Lifeline_3001(Lifeline self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_StateInvariant_3017(StateInvariant self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_CombinedFragment_3018(CombinedFragment self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_TimeConstraint_3019(TimeConstraint self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_specification_TimeConstraint_3019(TimeInterval self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_TimeObservation_3020(TimeObservation self) {
- return getNamedElement(self, "", "t", "");
- }
-
- /**
- * @generated
- */
- private String name_DurationConstraint_3021(DurationConstraint self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_specification_DurationConstraint_3021(DurationInterval self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_DestructionOccurrenceSpecification_3022(DestructionOccurrenceSpecification self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String value_specification_Constraint_3008(LiteralString self) {
- return "";
- }
-
- /**
- * @generated
- */
- private String name_DurationConstraint_3023(DurationConstraint self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_specification_DurationConstraint_3023(DurationInterval self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- private String name_DurationObservation_3024(DurationObservation self) {
- return getNamedElement(self, "", "d", "");
- }
-
- /**
- * @generated
- */
- private String name_GeneralOrdering_4012(GeneralOrdering self) {
- return getNamedElement(self, "", self.eClass().getName(), "");
- }
-
- /**
- * @generated
- */
- public static ElementInitializers getInstance() {
- ElementInitializers cached = UMLDiagramEditorPlugin.getInstance().getElementInitializers();
- if(cached == null) {
- UMLDiagramEditorPlugin.getInstance().setElementInitializers(cached = new ElementInitializers());
- }
- return cached;
- }
-
- /**
- * @generated NOT
- * Initialize the name of a namedElement
- *
- * @param namedElement
- * the namedElement
- */
- public static void init_NamedElement(NamedElement namedElement) {
- init_NamedElement(namedElement, ""); //$NON-NLS-1$
- }
-
- /**
- * @generated NOT
- * Initialize the name of a namedElement with a given prefix
- *
- * @param namedElement
- * the namedElement
- * @param prefix
- * a prefix for the name
- */
- public static void init_NamedElement(NamedElement namedElement, String prefix) {
- init_NamedElement(namedElement, prefix, namedElement.eClass().getName(), "");
- }
-
- /**
- * @generated NOT
- * Initialize the name of a namedElement with a given suffix
- *
- * @param namedElement
- * the namedElement
- * @param prefix
- * the prefix for the name
- * @param suffix
- * a suffix for the name
- */
- public static void init_NamedElement(NamedElement namedElement, String prefix, String suffix) {
- init_NamedElement(namedElement, prefix, namedElement.eClass().getName(), suffix);
- }
-
- /**
- * @generated NOT
- * Initialize the name of a namedElement with a given suffix
- *
- * @param namedElement
- * the namedElement
- * @param prefix
- * the prefix for the name
- * @param body
- * the body used for the name
- * @param suffix
- * a suffix for the name
- */
- public static void init_NamedElement(NamedElement namedElement, String prefix, String body, String suffix) {
- try {
- namedElement.setName(getNamedElement(namedElement, prefix, body, suffix));
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated NOT
- *
- */
- private static String getNamedElement(NamedElement namedElement, String prefix, String body, String suffix) {
- String base = prefix + body + suffix;
-
- Namespace namespace = namedElement.getNamespace();
- if(namespace != null) {
- Set<NamedElement> members = new HashSet<NamedElement>();
- members.addAll(namespace.getMembers());
- // add general orderings which are not in initial selection
- if(namespace instanceof Interaction) {
- members.addAll(((Interaction)namespace).getGeneralOrderings());
- }
- return getNextNumberedName(members, base);
- }
-
- return base;
- }
-
- @SuppressWarnings("rawtypes")
- public static String getNextNumberedName(Collection currentElements, String base) {
- int nextNumber = -1;
- Set<String> elementNames = new HashSet<String>();
- for(Object o : currentElements) {
- if(o instanceof NamedElement) {
- String name = ((NamedElement)o).getName();
- if(name != null && name.startsWith(base)) {
- elementNames.add(name);
- String end = name.substring(base.length());
- int nextNumberTmp = -1;
-
- if(end.trim().equals("")) {
- nextNumberTmp = 0;
- } else {
- try {
- nextNumberTmp = Integer.parseInt(end) + 1;
- } catch (NumberFormatException ex) {
- nextNumberTmp = -1;
- }
- }
-
- if(nextNumberTmp > nextNumber) {
- nextNumber = nextNumberTmp;
- }
- }
- }
- }
-
- if(nextNumber == -1) {
- return generateUniqueName(base, elementNames, base, nextNumber);
- } else {
- return generateUniqueName(base + nextNumber, elementNames,base, nextNumber);
- }
- }
-
- private static String generateUniqueName(String name, Set<String> elementNames, String base, int nextNumber) {
- while(elementNames.contains(name)){
- nextNumber ++;
- name = base + nextNumber;
- }
- return name;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLEditPartProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLEditPartProvider.java
deleted file mode 100644
index d15753a4607..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLEditPartProvider.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import java.lang.ref.WeakReference;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartFactory;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.UMLEditPartFactory;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.ObservationLinkPolicy.ObservationLink;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-
-/**
- * @generated
- */
-public class UMLEditPartProvider extends AbstractEditPartProvider {
-
- /**
- * @generated
- */
- private EditPartFactory factory;
-
- /**
- * @generated
- */
- private boolean allowCaching;
-
- /**
- * @generated
- */
- private WeakReference cachedPart;
-
- /**
- * @generated
- */
- private WeakReference cachedView;
-
- /**
- * @generated
- */
- public UMLEditPartProvider() {
- setFactory(new UMLEditPartFactory());
- setAllowCaching(true);
- }
-
- /**
- * @generated
- */
- public final EditPartFactory getFactory() {
- return factory;
- }
-
- /**
- * @generated
- */
- protected void setFactory(EditPartFactory factory) {
- this.factory = factory;
- }
-
- /**
- * @generated
- */
- public final boolean isAllowCaching() {
- return allowCaching;
- }
-
- /**
- * @generated
- */
- protected synchronized void setAllowCaching(boolean allowCaching) {
- this.allowCaching = allowCaching;
- if(!allowCaching) {
- cachedPart = null;
- cachedView = null;
- }
- }
-
- /**
- * @generated
- */
- protected IGraphicalEditPart createEditPart(View view) {
- EditPart part = factory.createEditPart(null, view);
- if(part instanceof IGraphicalEditPart) {
- return (IGraphicalEditPart)part;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected IGraphicalEditPart getCachedPart(View view) {
- if(cachedView != null && cachedView.get() == view) {
- return (IGraphicalEditPart)cachedPart.get();
- }
- return null;
- }
-
- /**
- * @generated
- */
- public synchronized IGraphicalEditPart createGraphicEditPart(View view) {
- if(isAllowCaching()) {
- IGraphicalEditPart part = getCachedPart(view);
- cachedPart = null;
- cachedView = null;
- if(part != null) {
- return part;
- }
- }
- return createEditPart(view);
- }
-
- /**
- * @generated NOT
- */
- public synchronized boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
- if(view instanceof ObservationLink){
- return true;
- }
- if(!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view))) {
- return false;
- }
- if(isAllowCaching() && getCachedPart(view) != null) {
- return true;
- }
- IGraphicalEditPart part = createEditPart(view);
- if(part != null) {
- if(isAllowCaching()) {
- cachedPart = new WeakReference(part);
- cachedView = new WeakReference(view);
- }
- return true;
- }
- }
- return false;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java
deleted file mode 100644
index 57a2a899229..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLElementTypes.java
+++ /dev/null
@@ -1,525 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import java.util.HashSet;
-import java.util.IdentityHashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart;
-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.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class UMLElementTypes {
-
- /**
- * @generated
- */
- private UMLElementTypes() {
- }
-
- /**
- * @generated
- */
- private static Map<IElementType, ENamedElement> elements;
-
- /**
- * @generated
- */
- private static ImageRegistry imageRegistry;
-
- /**
- * @generated
- */
- private static Set<IElementType> KNOWN_ELEMENT_TYPES;
-
- /**
- * @generated
- */
- public static final IElementType Package_1000 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Package_1000"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Interaction_2001 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Interaction_2001"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Lifeline_3001 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Lifeline_3001"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType BehaviorExecutionSpecification_3003 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.BehaviorExecutionSpecification_3003"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType StateInvariant_3017 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.StateInvariant_3017"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType CombinedFragment_3018 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_3018"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType TimeConstraint_3019 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.TimeConstraint_3019"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType TimeObservation_3020 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.TimeObservation_3020"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType DurationConstraint_3021 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_3021"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType DestructionOccurrenceSpecification_3022 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.DestructionOccurrenceSpecification_3022"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType ActionExecutionSpecification_3006 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.ActionExecutionSpecification_3006"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType InteractionUse_3002 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.InteractionUse_3002"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType CombinedFragment_3004 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.CombinedFragment_3004"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType InteractionOperand_3005 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.InteractionOperand_3005"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Continuation_3016 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Continuation_3016"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Constraint_3008 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Constraint_3008"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Comment_3009 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Comment_3009"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType DurationConstraint_3023 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.DurationConstraint_3023"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType DurationObservation_3024 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.DurationObservation_3024"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType ConsiderIgnoreFragment_3007 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.ConsiderIgnoreFragment_3007"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Message_4003 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Message_4003"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Message_4004 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Message_4004"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Message_4005 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Message_4005"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Message_4006 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Message_4006"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Message_4007 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Message_4007"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Message_4008 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Message_4008"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType Message_4009 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.Message_4009"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType CommentAnnotatedElement_4010 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.CommentAnnotatedElement_4010"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType ConstraintConstrainedElement_4011 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.ConstraintConstrainedElement_4011"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final IElementType GeneralOrdering_4012 = getElementType("org.eclipse.papyrus.uml.diagram.sequence.GeneralOrdering_4012"); //$NON-NLS-1$
-
- /**
- * @generated
- */
- private static ImageRegistry getImageRegistry() {
- if(imageRegistry == null) {
- imageRegistry = new ImageRegistry();
- }
- return imageRegistry;
- }
-
- /**
- * @generated
- */
- private static String getImageRegistryKey(ENamedElement element) {
- return element.getName();
- }
-
- /**
- * @generated
- */
- private static ImageDescriptor getProvidedImageDescriptor(ENamedElement element) {
- if(element instanceof EStructuralFeature) {
- EStructuralFeature feature = ((EStructuralFeature)element);
- EClass eContainingClass = feature.getEContainingClass();
- EClassifier eType = feature.getEType();
- if(eContainingClass != null && !eContainingClass.isAbstract()) {
- element = eContainingClass;
- } else if(eType instanceof EClass && !((EClass)eType).isAbstract()) {
- element = eType;
- }
- }
- if(element instanceof EClass) {
- EClass eClass = (EClass)element;
- if(!eClass.isAbstract()) {
- return UMLDiagramEditorPlugin.getInstance().getItemImageDescriptor(eClass.getEPackage().getEFactoryInstance().create(eClass));
- }
- }
- // TODO : support structural features
- return null;
- }
-
- /**
- * @generated
- */
- public static ImageDescriptor getImageDescriptor(ENamedElement element) {
- String key = getImageRegistryKey(element);
- ImageDescriptor imageDescriptor = getImageRegistry().getDescriptor(key);
- if(imageDescriptor == null) {
- imageDescriptor = getProvidedImageDescriptor(element);
- if(imageDescriptor == null) {
- imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
- }
- getImageRegistry().put(key, imageDescriptor);
- }
- return imageDescriptor;
- }
-
- /**
- * @generated
- */
- public static Image getImage(ENamedElement element) {
- String key = getImageRegistryKey(element);
- Image image = getImageRegistry().get(key);
- if(image == null) {
- ImageDescriptor imageDescriptor = getProvidedImageDescriptor(element);
- if(imageDescriptor == null) {
- imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
- }
- getImageRegistry().put(key, imageDescriptor);
- image = getImageRegistry().get(key);
- }
- return image;
- }
-
- /**
- * @generated
- */
- public static ImageDescriptor getImageDescriptor(IAdaptable hint) {
- ENamedElement element = getElement(hint);
- if(element == null) {
- return null;
- }
- return getImageDescriptor(element);
- }
-
- /**
- * @generated
- */
- public static Image getImage(IAdaptable hint) {
- ENamedElement element = getElement(hint);
- if(element == null) {
- return null;
- }
- return getImage(element);
- }
-
- /**
- * Returns 'type' of the ecore object associated with the hint.
- *
- * @generated
- */
- public static ENamedElement getElement(IAdaptable hint) {
- Object type = hint.getAdapter(IElementType.class);
- if(elements == null) {
- elements = new IdentityHashMap<IElementType, ENamedElement>();
-
- elements.put(Package_1000, UMLPackage.eINSTANCE.getPackage());
-
- elements.put(Interaction_2001, UMLPackage.eINSTANCE.getInteraction());
-
- elements.put(ConsiderIgnoreFragment_3007, UMLPackage.eINSTANCE.getConsiderIgnoreFragment());
-
- elements.put(CombinedFragment_3004, UMLPackage.eINSTANCE.getCombinedFragment());
-
- elements.put(InteractionOperand_3005, UMLPackage.eINSTANCE.getInteractionOperand());
-
- elements.put(InteractionUse_3002, UMLPackage.eINSTANCE.getInteractionUse());
-
- elements.put(Continuation_3016, UMLPackage.eINSTANCE.getContinuation());
-
- elements.put(Lifeline_3001, UMLPackage.eINSTANCE.getLifeline());
-
- elements.put(ActionExecutionSpecification_3006, UMLPackage.eINSTANCE.getActionExecutionSpecification());
-
- elements.put(BehaviorExecutionSpecification_3003, UMLPackage.eINSTANCE.getBehaviorExecutionSpecification());
-
- elements.put(StateInvariant_3017, UMLPackage.eINSTANCE.getStateInvariant());
-
- elements.put(CombinedFragment_3018, UMLPackage.eINSTANCE.getCombinedFragment());
-
- elements.put(TimeConstraint_3019, UMLPackage.eINSTANCE.getTimeConstraint());
-
- elements.put(TimeObservation_3020, UMLPackage.eINSTANCE.getTimeObservation());
-
- elements.put(DurationConstraint_3021, UMLPackage.eINSTANCE.getDurationConstraint());
-
- elements.put(DestructionOccurrenceSpecification_3022, UMLPackage.eINSTANCE.getDestructionOccurrenceSpecification());
-
- elements.put(Constraint_3008, UMLPackage.eINSTANCE.getConstraint());
-
- elements.put(Comment_3009, UMLPackage.eINSTANCE.getComment());
-
- elements.put(DurationConstraint_3023, UMLPackage.eINSTANCE.getDurationConstraint());
-
- elements.put(DurationObservation_3024, UMLPackage.eINSTANCE.getDurationObservation());
-
- elements.put(Message_4003, UMLPackage.eINSTANCE.getMessage());
-
- elements.put(Message_4004, UMLPackage.eINSTANCE.getMessage());
-
- elements.put(Message_4005, UMLPackage.eINSTANCE.getMessage());
-
- elements.put(Message_4006, UMLPackage.eINSTANCE.getMessage());
-
- elements.put(Message_4007, UMLPackage.eINSTANCE.getMessage());
-
- elements.put(Message_4008, UMLPackage.eINSTANCE.getMessage());
-
- elements.put(Message_4009, UMLPackage.eINSTANCE.getMessage());
-
- elements.put(CommentAnnotatedElement_4010, UMLPackage.eINSTANCE.getComment_AnnotatedElement());
-
- elements.put(ConstraintConstrainedElement_4011, UMLPackage.eINSTANCE.getConstraint_ConstrainedElement());
-
- elements.put(GeneralOrdering_4012, UMLPackage.eINSTANCE.getGeneralOrdering());
- }
- return (ENamedElement)elements.get(type);
- }
-
- /**
- * @generated
- */
- private static IElementType getElementType(String id) {
- return ElementTypeRegistry.getInstance().getType(id);
- }
-
- /**
- * @generated
- */
- public static boolean isKnownElementType(IElementType elementType) {
- if(KNOWN_ELEMENT_TYPES == null) {
- KNOWN_ELEMENT_TYPES = new HashSet<IElementType>();
- KNOWN_ELEMENT_TYPES.add(Package_1000);
- KNOWN_ELEMENT_TYPES.add(Interaction_2001);
- KNOWN_ELEMENT_TYPES.add(ConsiderIgnoreFragment_3007);
- KNOWN_ELEMENT_TYPES.add(CombinedFragment_3004);
- KNOWN_ELEMENT_TYPES.add(InteractionOperand_3005);
- KNOWN_ELEMENT_TYPES.add(InteractionUse_3002);
- KNOWN_ELEMENT_TYPES.add(Continuation_3016);
- KNOWN_ELEMENT_TYPES.add(Lifeline_3001);
- KNOWN_ELEMENT_TYPES.add(ActionExecutionSpecification_3006);
- KNOWN_ELEMENT_TYPES.add(BehaviorExecutionSpecification_3003);
- KNOWN_ELEMENT_TYPES.add(StateInvariant_3017);
- KNOWN_ELEMENT_TYPES.add(CombinedFragment_3018);
- KNOWN_ELEMENT_TYPES.add(TimeConstraint_3019);
- KNOWN_ELEMENT_TYPES.add(TimeObservation_3020);
- KNOWN_ELEMENT_TYPES.add(DurationConstraint_3021);
- KNOWN_ELEMENT_TYPES.add(DestructionOccurrenceSpecification_3022);
- KNOWN_ELEMENT_TYPES.add(Constraint_3008);
- KNOWN_ELEMENT_TYPES.add(Comment_3009);
- KNOWN_ELEMENT_TYPES.add(DurationConstraint_3023);
- KNOWN_ELEMENT_TYPES.add(DurationObservation_3024);
- KNOWN_ELEMENT_TYPES.add(Message_4003);
- KNOWN_ELEMENT_TYPES.add(Message_4004);
- KNOWN_ELEMENT_TYPES.add(Message_4005);
- KNOWN_ELEMENT_TYPES.add(Message_4006);
- KNOWN_ELEMENT_TYPES.add(Message_4007);
- KNOWN_ELEMENT_TYPES.add(Message_4008);
- KNOWN_ELEMENT_TYPES.add(Message_4009);
- KNOWN_ELEMENT_TYPES.add(CommentAnnotatedElement_4010);
- KNOWN_ELEMENT_TYPES.add(ConstraintConstrainedElement_4011);
- KNOWN_ELEMENT_TYPES.add(GeneralOrdering_4012);
- }
- return KNOWN_ELEMENT_TYPES.contains(elementType);
- }
-
- /**
- * @generated
- */
- public static IElementType getElementType(int visualID) {
- switch(visualID) {
- case PackageEditPart.VISUAL_ID:
- return Package_1000;
- case InteractionEditPart.VISUAL_ID:
- return Interaction_2001;
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- return ConsiderIgnoreFragment_3007;
- case CombinedFragmentEditPart.VISUAL_ID:
- return CombinedFragment_3004;
- case InteractionOperandEditPart.VISUAL_ID:
- return InteractionOperand_3005;
- case InteractionUseEditPart.VISUAL_ID:
- return InteractionUse_3002;
- case ContinuationEditPart.VISUAL_ID:
- return Continuation_3016;
- case LifelineEditPart.VISUAL_ID:
- return Lifeline_3001;
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- return ActionExecutionSpecification_3006;
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- return BehaviorExecutionSpecification_3003;
- case StateInvariantEditPart.VISUAL_ID:
- return StateInvariant_3017;
- case CombinedFragment2EditPart.VISUAL_ID:
- return CombinedFragment_3018;
- case TimeConstraintEditPart.VISUAL_ID:
- return TimeConstraint_3019;
- case TimeObservationEditPart.VISUAL_ID:
- return TimeObservation_3020;
- case DurationConstraintEditPart.VISUAL_ID:
- return DurationConstraint_3021;
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return DestructionOccurrenceSpecification_3022;
- case ConstraintEditPart.VISUAL_ID:
- return Constraint_3008;
- case CommentEditPart.VISUAL_ID:
- return Comment_3009;
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return DurationConstraint_3023;
- case DurationObservationEditPart.VISUAL_ID:
- return DurationObservation_3024;
- case MessageEditPart.VISUAL_ID:
- return Message_4003;
- case Message2EditPart.VISUAL_ID:
- return Message_4004;
- case Message3EditPart.VISUAL_ID:
- return Message_4005;
- case Message4EditPart.VISUAL_ID:
- return Message_4006;
- case Message5EditPart.VISUAL_ID:
- return Message_4007;
- case Message6EditPart.VISUAL_ID:
- return Message_4008;
- case Message7EditPart.VISUAL_ID:
- return Message_4009;
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return CommentAnnotatedElement_4010;
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return ConstraintConstrainedElement_4011;
- case GeneralOrderingEditPart.VISUAL_ID:
- return GeneralOrdering_4012;
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLIconProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLIconProvider.java
deleted file mode 100644
index 8b6a7d393e5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLIconProvider.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.common.ui.services.icon.GetIconOperation;
-import org.eclipse.gmf.runtime.common.ui.services.icon.IIconProvider;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @generated
- */
-public class UMLIconProvider extends AbstractProvider implements IIconProvider {
-
- /**
- * @generated
- */
- public Image getIcon(IAdaptable hint, int flags) {
- return UMLElementTypes.getImage(hint);
- }
-
- /**
- * @generated
- */
- public boolean provides(IOperation operation) {
- if(operation instanceof GetIconOperation) {
- return ((GetIconOperation)operation).execute(this) != null;
- }
- return false;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLMarkerNavigationProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLMarkerNavigationProvider.java
deleted file mode 100644
index 9cd15e5ff17..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLMarkerNavigationProvider.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import java.util.Arrays;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
-import org.eclipse.gmf.runtime.emf.ui.providers.marker.AbstractModelMarkerNavigationProvider;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorUtil;
-
-/**
- * @generated
- */
-public class UMLMarkerNavigationProvider extends AbstractModelMarkerNavigationProvider {
-
- /**
- * @generated
- */
- public static final String MARKER_TYPE = UMLDiagramEditorPlugin.ID + ".diagnostic"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- protected void doGotoMarker(IMarker marker) {
- String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
- if(elementId == null || !(getEditor() instanceof DiagramEditor)) {
- return;
- }
- DiagramEditor editor = (DiagramEditor)getEditor();
- Map editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
- EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
- if(targetView == null) {
- return;
- }
- EditPart targetEditPart = (EditPart)editPartRegistry.get(targetView);
- if(targetEditPart != null) {
- UMLDiagramEditorUtil.selectElementsInDiagram(editor, Arrays.asList(new EditPart[]{ targetEditPart }));
- }
- }
-
- /**
- * @generated
- */
- public static void deleteMarkers(IResource resource) {
- try {
- resource.deleteMarkers(MARKER_TYPE, true, IResource.DEPTH_ZERO);
- } catch (CoreException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Failed to delete validation markers", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public static IMarker addMarker(IFile file, String elementId, String location, String message, int statusSeverity) {
- IMarker marker = null;
- try {
- marker = file.createMarker(MARKER_TYPE);
- marker.setAttribute(IMarker.MESSAGE, message);
- marker.setAttribute(IMarker.LOCATION, location);
- marker.setAttribute(org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID, elementId);
- int markerSeverity = IMarker.SEVERITY_INFO;
- if(statusSeverity == IStatus.WARNING) {
- markerSeverity = IMarker.SEVERITY_WARNING;
- } else if(statusSeverity == IStatus.ERROR || statusSeverity == IStatus.CANCEL) {
- markerSeverity = IMarker.SEVERITY_ERROR;
- }
- marker.setAttribute(IMarker.SEVERITY, markerSeverity);
- } catch (CoreException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Failed to create validation marker", e); //$NON-NLS-1$
- }
- return marker;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLModelingAssistantProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLModelingAssistantProvider.java
deleted file mode 100644
index 8d6fd70e454..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLModelingAssistantProvider.java
+++ /dev/null
@@ -1,527 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.ui.services.modelingassistant.ModelingAssistantProvider;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.uml.diagram.sequence.ObservationLinkMetamodelType;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart;
-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.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.Messages;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-
-/**
- * @generated
- */
-public class UMLModelingAssistantProvider extends ModelingAssistantProvider {
-
- /**
- * @generated
- */
- public List getTypesForPopupBar(IAdaptable host) {
- IGraphicalEditPart editPart = (IGraphicalEditPart)host.getAdapter(IGraphicalEditPart.class);
- if(editPart instanceof PackageEditPart) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Interaction_2001);
- return types;
- }
- if(editPart instanceof InteractionEditPart) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.DurationConstraint_3023);
- types.add(UMLElementTypes.DurationObservation_3024);
- return types;
- }
- if(editPart instanceof CombinedFragmentEditPart) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.InteractionOperand_3005);
- return types;
- }
- if(editPart instanceof InteractionOperandEditPart) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.Continuation_3016);
- return types;
- }
- if(editPart instanceof LifelineEditPart) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
- types.add(UMLElementTypes.ActionExecutionSpecification_3006);
- types.add(UMLElementTypes.BehaviorExecutionSpecification_3003);
- types.add(UMLElementTypes.StateInvariant_3017);
- types.add(UMLElementTypes.CombinedFragment_3018);
- types.add(UMLElementTypes.TimeConstraint_3019);
- types.add(UMLElementTypes.TimeObservation_3020);
- types.add(UMLElementTypes.DurationConstraint_3021);
- types.add(UMLElementTypes.DestructionOccurrenceSpecification_3022);
- return types;
- }
- if(editPart instanceof InteractionInteractionCompartmentEditPart) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(6);
- types.add(UMLElementTypes.ConsiderIgnoreFragment_3007);
- types.add(UMLElementTypes.CombinedFragment_3004);
- types.add(UMLElementTypes.Lifeline_3001);
- types.add(UMLElementTypes.InteractionUse_3002);
- types.add(UMLElementTypes.Constraint_3008);
- types.add(UMLElementTypes.Comment_3009);
- return types;
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated NOT
- */
- public List getRelTypesOnSource(IAdaptable source) {
- IGraphicalEditPart sourceEditPart = (IGraphicalEditPart)source.getAdapter(IGraphicalEditPart.class);
- if(sourceEditPart instanceof InteractionEditPart) {
- return ((InteractionEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- return ((ConsiderIgnoreFragmentEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof CombinedFragmentEditPart) {
- return ((CombinedFragmentEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof InteractionOperandEditPart) {
- return ((InteractionOperandEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof InteractionUseEditPart) {
- return ((InteractionUseEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof ContinuationEditPart) {
- return ((ContinuationEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof LifelineEditPart) {
- return ((LifelineEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof ActionExecutionSpecificationEditPart) {
- return ((ActionExecutionSpecificationEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- return ((BehaviorExecutionSpecificationEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof StateInvariantEditPart) {
- return ((StateInvariantEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof CombinedFragment2EditPart) {
- return ((CombinedFragment2EditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof TimeConstraintEditPart) {
- return ((TimeConstraintEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof TimeObservationEditPart) {
- return ((TimeObservationEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof DurationConstraintEditPart) {
- return ((DurationConstraintEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- return ((DestructionOccurrenceSpecificationEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof ConstraintEditPart) {
- return ((ConstraintEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof CommentEditPart) {
- return ((CommentEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof DurationConstraintInMessageEditPart) {
- return ((DurationConstraintInMessageEditPart)sourceEditPart).getMARelTypesOnSource();
- }
- if(sourceEditPart instanceof DurationObservationEditPart) {
- //return ((DurationObservationEditPart)sourceEditPart).getMARelTypesOnSource();
- ArrayList<IElementType> types = new ArrayList<IElementType>(1);
- types.add(ObservationLinkMetamodelType.getInstance());
- return types;
- }
- if(sourceEditPart instanceof TimeObservationLabelEditPart) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(1);
- types.add(ObservationLinkMetamodelType.getInstance());
- return types;
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public List getRelTypesOnTarget(IAdaptable target) {
- IGraphicalEditPart targetEditPart = (IGraphicalEditPart)target.getAdapter(IGraphicalEditPart.class);
- if(targetEditPart instanceof InteractionEditPart) {
- return ((InteractionEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- return ((ConsiderIgnoreFragmentEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- return ((CombinedFragmentEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- return ((InteractionOperandEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- return ((InteractionUseEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- return ((ContinuationEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof LifelineEditPart) {
- return ((LifelineEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- return ((ActionExecutionSpecificationEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- return ((BehaviorExecutionSpecificationEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- return ((StateInvariantEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- return ((CombinedFragment2EditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- return ((TimeConstraintEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- return ((TimeObservationEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- return ((DurationConstraintEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- return ((DestructionOccurrenceSpecificationEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- return ((ConstraintEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof CommentEditPart) {
- return ((CommentEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- return ((DurationConstraintInMessageEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- return ((DurationObservationEditPart)targetEditPart).getMARelTypesOnTarget();
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated NOT
- */
- public List getRelTypesOnSourceAndTarget(IAdaptable source, IAdaptable target) {
- IGraphicalEditPart sourceEditPart = (IGraphicalEditPart)source.getAdapter(IGraphicalEditPart.class);
- IGraphicalEditPart targetEditPart = (IGraphicalEditPart)target.getAdapter(IGraphicalEditPart.class);
- if(sourceEditPart instanceof InteractionEditPart) {
- return ((InteractionEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- return ((ConsiderIgnoreFragmentEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof CombinedFragmentEditPart) {
- return ((CombinedFragmentEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof InteractionOperandEditPart) {
- return ((InteractionOperandEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof InteractionUseEditPart) {
- return ((InteractionUseEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof ContinuationEditPart) {
- return ((ContinuationEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof LifelineEditPart) {
- return ((LifelineEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof ActionExecutionSpecificationEditPart) {
- return ((ActionExecutionSpecificationEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- return ((BehaviorExecutionSpecificationEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof StateInvariantEditPart) {
- return ((StateInvariantEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof CombinedFragment2EditPart) {
- return ((CombinedFragment2EditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof TimeConstraintEditPart) {
- return ((TimeConstraintEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof TimeObservationEditPart) {
- return ((TimeObservationEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof DurationConstraintEditPart) {
- return ((DurationConstraintEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- return ((DestructionOccurrenceSpecificationEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof ConstraintEditPart) {
- return ((ConstraintEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof CommentEditPart) {
- return ((CommentEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof DurationConstraintInMessageEditPart) {
- return ((DurationConstraintInMessageEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- if(sourceEditPart instanceof DurationObservationEditPart) {
- //return ((DurationObservationEditPart)sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- ArrayList<IElementType> types = new ArrayList<IElementType>(1);
- types.add(ObservationLinkMetamodelType.getInstance());
- return types;
- }
- if(sourceEditPart instanceof TimeObservationLabelEditPart) {
- ArrayList<IElementType> types = new ArrayList<IElementType>(1);
- types.add(ObservationLinkMetamodelType.getInstance());
- return types;
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public List getTypesForSource(IAdaptable target, IElementType relationshipType) {
- IGraphicalEditPart targetEditPart = (IGraphicalEditPart)target.getAdapter(IGraphicalEditPart.class);
- if(targetEditPart instanceof InteractionEditPart) {
- return ((InteractionEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- return ((ConsiderIgnoreFragmentEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof CombinedFragmentEditPart) {
- return ((CombinedFragmentEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof InteractionOperandEditPart) {
- return ((InteractionOperandEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof InteractionUseEditPart) {
- return ((InteractionUseEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof ContinuationEditPart) {
- return ((ContinuationEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof LifelineEditPart) {
- return ((LifelineEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof ActionExecutionSpecificationEditPart) {
- return ((ActionExecutionSpecificationEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- return ((BehaviorExecutionSpecificationEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof StateInvariantEditPart) {
- return ((StateInvariantEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof CombinedFragment2EditPart) {
- return ((CombinedFragment2EditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof TimeConstraintEditPart) {
- return ((TimeConstraintEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof TimeObservationEditPart) {
- return ((TimeObservationEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof DurationConstraintEditPart) {
- return ((DurationConstraintEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- return ((DestructionOccurrenceSpecificationEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof ConstraintEditPart) {
- return ((ConstraintEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof CommentEditPart) {
- return ((CommentEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof DurationConstraintInMessageEditPart) {
- return ((DurationConstraintInMessageEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- if(targetEditPart instanceof DurationObservationEditPart) {
- return ((DurationObservationEditPart)targetEditPart).getMATypesForSource(relationshipType);
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public List getTypesForTarget(IAdaptable source, IElementType relationshipType) {
- IGraphicalEditPart sourceEditPart = (IGraphicalEditPart)source.getAdapter(IGraphicalEditPart.class);
- if(sourceEditPart instanceof InteractionEditPart) {
- return ((InteractionEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof ConsiderIgnoreFragmentEditPart) {
- return ((ConsiderIgnoreFragmentEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof CombinedFragmentEditPart) {
- return ((CombinedFragmentEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof InteractionOperandEditPart) {
- return ((InteractionOperandEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof InteractionUseEditPart) {
- return ((InteractionUseEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof ContinuationEditPart) {
- return ((ContinuationEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof LifelineEditPart) {
- return ((LifelineEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof ActionExecutionSpecificationEditPart) {
- return ((ActionExecutionSpecificationEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof BehaviorExecutionSpecificationEditPart) {
- return ((BehaviorExecutionSpecificationEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof StateInvariantEditPart) {
- return ((StateInvariantEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof CombinedFragment2EditPart) {
- return ((CombinedFragment2EditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof TimeConstraintEditPart) {
- return ((TimeConstraintEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof TimeObservationEditPart) {
- return ((TimeObservationEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof DurationConstraintEditPart) {
- return ((DurationConstraintEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof DestructionOccurrenceSpecificationEditPart) {
- return ((DestructionOccurrenceSpecificationEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof ConstraintEditPart) {
- return ((ConstraintEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof CommentEditPart) {
- return ((CommentEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof DurationConstraintInMessageEditPart) {
- return ((DurationConstraintInMessageEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- if(sourceEditPart instanceof DurationObservationEditPart) {
- return ((DurationObservationEditPart)sourceEditPart).getMATypesForTarget(relationshipType);
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- public EObject selectExistingElementForSource(IAdaptable target, IElementType relationshipType) {
- return selectExistingElement(target, getTypesForSource(target, relationshipType));
- }
-
- /**
- * @generated
- */
- public EObject selectExistingElementForTarget(IAdaptable source, IElementType relationshipType) {
- return selectExistingElement(source, getTypesForTarget(source, relationshipType));
- }
-
- /**
- * @generated
- */
- protected EObject selectExistingElement(IAdaptable host, Collection types) {
- if(types.isEmpty()) {
- return null;
- }
- IGraphicalEditPart editPart = (IGraphicalEditPart)host.getAdapter(IGraphicalEditPart.class);
- if(editPart == null) {
- return null;
- }
- Diagram diagram = (Diagram)editPart.getRoot().getContents().getModel();
- HashSet<EObject> elements = new HashSet<EObject>();
- for(Iterator<EObject> it = diagram.getElement().eAllContents(); it.hasNext();) {
- EObject element = it.next();
- if(isApplicableElement(element, types)) {
- elements.add(element);
- }
- }
- if(elements.isEmpty()) {
- return null;
- }
- return selectElement((EObject[])elements.toArray(new EObject[elements.size()]));
- }
-
- /**
- * @generated
- */
- protected boolean isApplicableElement(EObject element, Collection types) {
- IElementType type = ElementTypeRegistry.getInstance().getElementType(element);
- return types.contains(type);
- }
-
- /**
- * @generated
- */
- protected EObject selectElement(EObject[] elements) {
- Shell shell = Display.getCurrent().getActiveShell();
- ILabelProvider labelProvider = new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider);
- dialog.setMessage(Messages.UMLModelingAssistantProviderMessage);
- dialog.setTitle(Messages.UMLModelingAssistantProviderTitle);
- dialog.setMultipleSelection(false);
- dialog.setElements(elements);
- EObject selected = null;
- if(dialog.open() == Window.OK) {
- selected = (EObject)dialog.getFirstResult();
- }
- return selected;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLParserProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLParserProvider.java
deleted file mode 100644
index 007bc1d93a3..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLParserProvider.java
+++ /dev/null
@@ -1,751 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.parser.CommentParser;
-import org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser;
-import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Constraint2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConstraintNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseName2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.DurationObservationParser;
-import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.InteractionUseCustomParsers;
-import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.LifelineCustomParsers;
-import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.MessageCustomParser;
-import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.TimeConstraintParser;
-import org.eclipse.papyrus.uml.diagram.sequence.parser.custom.TimeObservationParser;
-import org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class UMLParserProvider extends AbstractProvider implements IParserProvider {
-
- /**
- * @generated
- */
- private IParser interactionName_5001Parser;
-
- /**
- * @generated
- */
- private IParser getInteractionName_5001Parser() {
- if(interactionName_5001Parser == null) {
- EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- parser.setViewPattern("sd: {0}"); //$NON-NLS-1$
- parser.setEditorPattern("{0}"); //$NON-NLS-1$
- parser.setEditPattern("{0}"); //$NON-NLS-1$
- interactionName_5001Parser = parser;
- }
- return interactionName_5001Parser;
- }
-
- /**
- * @generated
- */
- private LifelineCustomParsers lifelineName_5002Parser;
-
- /**
- * @generated
- */
- private IParser getLifelineName_5002Parser() {
- if(lifelineName_5002Parser == null) {
- lifelineName_5002Parser = new LifelineCustomParsers();
- }
- return lifelineName_5002Parser;
- }
-
- /**
- * @generated
- */
- private IParser stateInvariantName_5008Parser;
-
- /**
- * @generated
- */
- private IParser getStateInvariantName_5008Parser() {
- if(stateInvariantName_5008Parser == null) {
- EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- stateInvariantName_5008Parser = parser;
- }
- return stateInvariantName_5008Parser;
- }
-
- /**
- * @generated
- */
- private TimeConstraintParser timeConstraintLabel_5009Parser;
-
- /**
- * @generated
- */
- private IParser getTimeConstraintLabel_5009Parser() {
- if(timeConstraintLabel_5009Parser == null) {
- timeConstraintLabel_5009Parser = new TimeConstraintParser();
- }
- return timeConstraintLabel_5009Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser timeConstraintLabel_5013Parser;
-
- /**
- * @generated
- */
- private IParser getTimeConstraintLabel_5013Parser() {
- if(timeConstraintLabel_5013Parser == null) {
- timeConstraintLabel_5013Parser = new AppliedStereotypeParser();
- }
- return timeConstraintLabel_5013Parser;
- }
-
- /**
- * @generated
- */
- private TimeObservationParser timeObservationLabel_5010Parser;
-
- /**
- * @generated
- */
- private IParser getTimeObservationLabel_5010Parser() {
- if(timeObservationLabel_5010Parser == null) {
- timeObservationLabel_5010Parser = new TimeObservationParser();
- }
- return timeObservationLabel_5010Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser timeObservationLabel_5014Parser;
-
- /**
- * @generated
- */
- private IParser getTimeObservationLabel_5014Parser() {
- if(timeObservationLabel_5014Parser == null) {
- timeObservationLabel_5014Parser = new AppliedStereotypeParser();
- }
- return timeObservationLabel_5014Parser;
- }
-
- /**
- * @generated
- */
- private TimeConstraintParser durationConstraintLabel_5011Parser;
-
- /**
- * @generated
- */
- private IParser getDurationConstraintLabel_5011Parser() {
- if(durationConstraintLabel_5011Parser == null) {
- durationConstraintLabel_5011Parser = new TimeConstraintParser();
- }
- return durationConstraintLabel_5011Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser durationConstraintLabel_5015Parser;
-
- /**
- * @generated
- */
- private IParser getDurationConstraintLabel_5015Parser() {
- if(durationConstraintLabel_5015Parser == null) {
- durationConstraintLabel_5015Parser = new AppliedStereotypeParser();
- }
- return durationConstraintLabel_5015Parser;
- }
-
- /**
- * @generated
- */
- private IParser interactionUseName_5003Parser;
-
- /**
- * @generated
- */
- private IParser getInteractionUseName_5003Parser() {
- if(interactionUseName_5003Parser == null) {
- EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- parser.setViewPattern("Ref"); //$NON-NLS-1$
- parser.setEditorPattern("Ref"); //$NON-NLS-1$
- parser.setEditPattern("Ref"); //$NON-NLS-1$
- interactionUseName_5003Parser = parser;
- }
- return interactionUseName_5003Parser;
- }
-
- /**
- * @generated
- */
- private InteractionUseCustomParsers interactionUseName_5004Parser;
-
- /**
- * @generated
- */
- private IParser getInteractionUseName_5004Parser() {
- if(interactionUseName_5004Parser == null) {
- interactionUseName_5004Parser = new InteractionUseCustomParsers();
- }
- return interactionUseName_5004Parser;
- }
-
- /**
- * @generated
- */
- private IParser continuationName_5007Parser;
-
- /**
- * @generated
- */
- private IParser getContinuationName_5007Parser() {
- if(continuationName_5007Parser == null) {
- EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- continuationName_5007Parser = parser;
- }
- return continuationName_5007Parser;
- }
-
- /**
- * @generated
- */
- private IParser constraintName_5005Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintName_5005Parser() {
- if(constraintName_5005Parser == null) {
- EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- constraintName_5005Parser = parser;
- }
- return constraintName_5005Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser constraintLabel_5012Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintLabel_5012Parser() {
- if(constraintLabel_5012Parser == null) {
- constraintLabel_5012Parser = new ConstraintParser();
- }
- return constraintLabel_5012Parser;
- }
-
- /**
- * @generated
- */
- private CommentParser commentBody_5006Parser;
-
- /**
- * @generated
- */
- private IParser getCommentBody_5006Parser() {
- if(commentBody_5006Parser == null) {
- commentBody_5006Parser = new CommentParser();
- }
- return commentBody_5006Parser;
- }
-
- /**
- * @generated
- */
- private TimeConstraintParser durationConstraintLabel_5018Parser;
-
- /**
- * @generated
- */
- private IParser getDurationConstraintLabel_5018Parser() {
- if(durationConstraintLabel_5018Parser == null) {
- durationConstraintLabel_5018Parser = new TimeConstraintParser();
- }
- return durationConstraintLabel_5018Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser durationConstraintLabel_5019Parser;
-
- /**
- * @generated
- */
- private IParser getDurationConstraintLabel_5019Parser() {
- if(durationConstraintLabel_5019Parser == null) {
- durationConstraintLabel_5019Parser = new AppliedStereotypeParser();
- }
- return durationConstraintLabel_5019Parser;
- }
-
- /**
- * @generated
- */
- private DurationObservationParser durationObservationLabel_5016Parser;
-
- /**
- * @generated
- */
- private IParser getDurationObservationLabel_5016Parser() {
- if(durationObservationLabel_5016Parser == null) {
- durationObservationLabel_5016Parser = new DurationObservationParser();
- }
- return durationObservationLabel_5016Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser durationObservationLabel_5017Parser;
-
- /**
- * @generated
- */
- private IParser getDurationObservationLabel_5017Parser() {
- if(durationObservationLabel_5017Parser == null) {
- durationObservationLabel_5017Parser = new AppliedStereotypeParser();
- }
- return durationObservationLabel_5017Parser;
- }
-
- /**
- * @generated
- */
- private MessageCustomParser messageName_6001Parser;
-
- /**
- * @generated
- */
- private IParser getMessageName_6001Parser() {
- if(messageName_6001Parser == null) {
- messageName_6001Parser = new MessageCustomParser();
- }
- return messageName_6001Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser messageLabel_6008Parser;
-
- /**
- * @generated
- */
- private IParser getMessageLabel_6008Parser() {
- if(messageLabel_6008Parser == null) {
- messageLabel_6008Parser = new AppliedStereotypeParser();
- }
- return messageLabel_6008Parser;
- }
-
- /**
- * @generated
- */
- private MessageCustomParser messageName_6002Parser;
-
- /**
- * @generated
- */
- private IParser getMessageName_6002Parser() {
- if(messageName_6002Parser == null) {
- messageName_6002Parser = new MessageCustomParser();
- }
- return messageName_6002Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser messageLabel_6009Parser;
-
- /**
- * @generated
- */
- private IParser getMessageLabel_6009Parser() {
- if(messageLabel_6009Parser == null) {
- messageLabel_6009Parser = new AppliedStereotypeParser();
- }
- return messageLabel_6009Parser;
- }
-
- /**
- * @generated
- */
- private MessageCustomParser messageName_6003Parser;
-
- /**
- * @generated
- */
- private IParser getMessageName_6003Parser() {
- if(messageName_6003Parser == null) {
- messageName_6003Parser = new MessageCustomParser();
- }
- return messageName_6003Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser messageLabel_6010Parser;
-
- /**
- * @generated
- */
- private IParser getMessageLabel_6010Parser() {
- if(messageLabel_6010Parser == null) {
- messageLabel_6010Parser = new AppliedStereotypeParser();
- }
- return messageLabel_6010Parser;
- }
-
- /**
- * @generated
- */
- private MessageCustomParser messageName_6004Parser;
-
- /**
- * @generated
- */
- private IParser getMessageName_6004Parser() {
- if(messageName_6004Parser == null) {
- messageName_6004Parser = new MessageCustomParser();
- }
- return messageName_6004Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser messageLabel_6011Parser;
-
- /**
- * @generated
- */
- private IParser getMessageLabel_6011Parser() {
- if(messageLabel_6011Parser == null) {
- messageLabel_6011Parser = new AppliedStereotypeParser();
- }
- return messageLabel_6011Parser;
- }
-
- /**
- * @generated
- */
- private MessageCustomParser messageName_6005Parser;
-
- /**
- * @generated
- */
- private IParser getMessageName_6005Parser() {
- if(messageName_6005Parser == null) {
- messageName_6005Parser = new MessageCustomParser();
- }
- return messageName_6005Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser messageLabel_6012Parser;
-
- /**
- * @generated
- */
- private IParser getMessageLabel_6012Parser() {
- if(messageLabel_6012Parser == null) {
- messageLabel_6012Parser = new AppliedStereotypeParser();
- }
- return messageLabel_6012Parser;
- }
-
- /**
- * @generated
- */
- private MessageCustomParser messageName_6006Parser;
-
- /**
- * @generated
- */
- private IParser getMessageName_6006Parser() {
- if(messageName_6006Parser == null) {
- messageName_6006Parser = new MessageCustomParser();
- }
- return messageName_6006Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser messageLabel_6013Parser;
-
- /**
- * @generated
- */
- private IParser getMessageLabel_6013Parser() {
- if(messageLabel_6013Parser == null) {
- messageLabel_6013Parser = new AppliedStereotypeParser();
- }
- return messageLabel_6013Parser;
- }
-
- /**
- * @generated
- */
- private MessageCustomParser messageName_6007Parser;
-
- /**
- * @generated
- */
- private IParser getMessageName_6007Parser() {
- if(messageName_6007Parser == null) {
- messageName_6007Parser = new MessageCustomParser();
- }
- return messageName_6007Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser messageLabel_6014Parser;
-
- /**
- * @generated
- */
- private IParser getMessageLabel_6014Parser() {
- if(messageLabel_6014Parser == null) {
- messageLabel_6014Parser = new AppliedStereotypeParser();
- }
- return messageLabel_6014Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser generalOrderingLabel_6015Parser;
-
- /**
- * @generated
- */
- private IParser getGeneralOrderingLabel_6015Parser() {
- if(generalOrderingLabel_6015Parser == null) {
- generalOrderingLabel_6015Parser = new AppliedStereotypeParser();
- }
- return generalOrderingLabel_6015Parser;
- }
-
- /**
- * @generated
- */
- protected IParser getParser(int visualID) {
- switch(visualID) {
- case InteractionNameEditPart.VISUAL_ID:
- return getInteractionName_5001Parser();
- case InteractionUseNameEditPart.VISUAL_ID:
- return getInteractionUseName_5003Parser();
- case InteractionUseName2EditPart.VISUAL_ID:
- return getInteractionUseName_5004Parser();
- case ContinuationNameEditPart.VISUAL_ID:
- return getContinuationName_5007Parser();
- case LifelineNameEditPart.VISUAL_ID:
- return getLifelineName_5002Parser();
- case StateInvariantNameEditPart.VISUAL_ID:
- return getStateInvariantName_5008Parser();
- case TimeConstraintLabelEditPart.VISUAL_ID:
- return getTimeConstraintLabel_5009Parser();
- case TimeConstraintAppliedStereotypeEditPart.VISUAL_ID:
- return getTimeConstraintLabel_5013Parser();
- case TimeObservationLabelEditPart.VISUAL_ID:
- return getTimeObservationLabel_5010Parser();
- case TimeObservationAppliedStereotypeEditPart.VISUAL_ID:
- return getTimeObservationLabel_5014Parser();
- case DurationConstraintLabelEditPart.VISUAL_ID:
- return getDurationConstraintLabel_5011Parser();
- case DurationConstraintAppliedStereotypeEditPart.VISUAL_ID:
- return getDurationConstraintLabel_5015Parser();
- case ConstraintNameEditPart.VISUAL_ID:
- return getConstraintName_5005Parser();
- case Constraint2EditPart.VISUAL_ID:
- return getConstraintLabel_5012Parser();
- case CommentBodyEditPart.VISUAL_ID:
- return getCommentBody_5006Parser();
- case DurationConstraintInMessageLabelEditPart.VISUAL_ID:
- return getDurationConstraintLabel_5018Parser();
- case DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID:
- return getDurationConstraintLabel_5019Parser();
- case DurationObservationLabelEditPart.VISUAL_ID:
- return getDurationObservationLabel_5016Parser();
- case DurationObservationAppliedStereotypeEditPart.VISUAL_ID:
- return getDurationObservationLabel_5017Parser();
- case MessageNameEditPart.VISUAL_ID:
- return getMessageName_6001Parser();
- case MessageSyncAppliedStereotypeEditPart.VISUAL_ID:
- return getMessageLabel_6008Parser();
- case MessageName2EditPart.VISUAL_ID:
- return getMessageName_6002Parser();
- case MessageAsyncAppliedStereotypeEditPart.VISUAL_ID:
- return getMessageLabel_6009Parser();
- case MessageName3EditPart.VISUAL_ID:
- return getMessageName_6003Parser();
- case MessageReplyAppliedStereotypeEditPart.VISUAL_ID:
- return getMessageLabel_6010Parser();
- case MessageName4EditPart.VISUAL_ID:
- return getMessageName_6004Parser();
- case MessageCreateAppliedStereotypeEditPart.VISUAL_ID:
- return getMessageLabel_6011Parser();
- case MessageName5EditPart.VISUAL_ID:
- return getMessageName_6005Parser();
- case MessageDeleteAppliedStereotypeEditPart.VISUAL_ID:
- return getMessageLabel_6012Parser();
- case MessageName6EditPart.VISUAL_ID:
- return getMessageName_6006Parser();
- case MessageLostAppliedStereotypeEditPart.VISUAL_ID:
- return getMessageLabel_6013Parser();
- case MessageName7EditPart.VISUAL_ID:
- return getMessageName_6007Parser();
- case MessageFoundAppliedStereotypeEditPart.VISUAL_ID:
- return getMessageLabel_6014Parser();
- case GeneralOrderingAppliedStereotypeEditPart.VISUAL_ID:
- return getGeneralOrderingLabel_6015Parser();
- }
- return null;
- }
-
- /**
- * Utility method that consults ParserService
- *
- * @generated
- */
- public static IParser getParser(IElementType type, EObject object, String parserHint) {
- return ParserService.getInstance().getParser(new HintAdapter(type, object, parserHint));
- }
-
- /**
- * @generated
- */
- public IParser getParser(IAdaptable hint) {
- String vid = (String)hint.getAdapter(String.class);
- if(vid != null) {
- return getParser(UMLVisualIDRegistry.getVisualID(vid));
- }
- View view = (View)hint.getAdapter(View.class);
- if(view != null) {
- return getParser(UMLVisualIDRegistry.getVisualID(view));
- }
- return null;
- }
-
- /**
- * @generated
- */
- public boolean provides(IOperation operation) {
- if(operation instanceof GetParserOperation) {
- IAdaptable hint = ((GetParserOperation)operation).getHint();
- if(UMLElementTypes.getElement(hint) == null) {
- return false;
- }
- return getParser(hint) != null;
- }
- return false;
- }
-
- /**
- * @generated
- */
- private static class HintAdapter extends ParserHintAdapter {
-
- /**
- * @generated
- */
- private final IElementType elementType;
-
- /**
- * @generated
- */
- public HintAdapter(IElementType type, EObject object, String parserHint) {
- super(object, parserHint);
- assert type != null;
- elementType = type;
- }
-
- /**
- * @generated
- */
- public Object getAdapter(Class adapter) {
- if(IElementType.class.equals(adapter)) {
- return elementType;
- }
- return super.getAdapter(adapter);
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationDecoratorProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationDecoratorProvider.java
deleted file mode 100644
index 39b951f8af0..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationDecoratorProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import org.eclipse.gef.EditDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.editparts.AbstractConnectionEditPart;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-
-/**
- * @generated
- */
-public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider implements IDecoratorProvider {
-
- /**
- * @generated
- */
- public void createDecorators(IDecoratorTarget decoratorTarget) {
- EditPart editPart = (EditPart)decoratorTarget.getAdapter(EditPart.class);
- if(editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
- Object model = editPart.getModel();
- if((model instanceof View)) {
- View view = (View)model;
- if(!(view instanceof Edge) && !view.isSetElement()) {
- return;
- }
- }
- EditDomain ed = editPart.getViewer().getEditDomain();
- if(!(ed instanceof DiagramEditDomain)) {
- return;
- }
- if(((DiagramEditDomain)ed).getEditorPart() instanceof UMLDiagramEditor) {
- decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
- }
- }
- }
-
- /**
- * @generated
- */
- public boolean provides(IOperation operation) {
- if(!(operation instanceof CreateDecoratorsOperation)) {
- return false;
- }
- IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation)operation).getDecoratorTarget();
- View view = (View)decoratorTarget.getAdapter(View.class);
- return view != null && PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationProvider.java
deleted file mode 100644
index d70674583e5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLValidationProvider.java
+++ /dev/null
@@ -1,322 +0,0 @@
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.validation.AbstractModelConstraint;
-import org.eclipse.emf.validation.IValidationContext;
-import org.eclipse.emf.validation.model.IClientSelector;
-import org.eclipse.emf.validation.service.IBatchValidator;
-import org.eclipse.emf.validation.service.ITraversalStrategy;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ActionExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.BehaviorExecutionSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragment2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.validation.UMLValidationHelper;
-import org.eclipse.uml2.uml.Interaction;
-import org.eclipse.uml2.uml.InteractionOperand;
-
-/**
- * @generated
- */
-public class UMLValidationProvider {
-
- /**
- * @generated
- */
- private static boolean constraintsActive = false;
-
- /**
- * @generated
- */
- public static boolean shouldConstraintsBePrivate() {
- return false;
- }
-
- /**
- * @generated
- */
- public static void runWithConstraints(TransactionalEditingDomain editingDomain, Runnable operation) {
- final Runnable op = operation;
- Runnable task = new Runnable() {
-
- public void run() {
- try {
- constraintsActive = true;
- op.run();
- } finally {
- constraintsActive = false;
- }
- }
- };
- if(editingDomain != null) {
- try {
- editingDomain.runExclusive(task);
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Validation failed", e); //$NON-NLS-1$
- }
- } else {
- task.run();
- }
- }
-
- /**
- * @generated
- */
- static boolean isInDefaultEditorContext(Object object) {
- if(shouldConstraintsBePrivate() && !constraintsActive) {
- return false;
- }
- if(object instanceof View) {
- return constraintsActive && PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID((View)object));
- }
- return true;
- }
-
- /**
- * @generated
- */
- public static class DefaultCtx implements IClientSelector {
-
- /**
- * @generated
- */
- public boolean selects(Object object) {
- return isInDefaultEditorContext(object);
- }
- }
-
- /**
- * @generated
- */
- public static class Ctx_3001 implements IClientSelector {
-
- /**
- * @generated NOT select all moved edit parts which are linked to an occurrence specification
- */
- public boolean selects(Object object) {
- if(object instanceof Bounds) {
- // validate on resize or move
- object = ((Bounds)object).eContainer();
- }
- if(object instanceof View && PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID((View)object))) {
- final int id = UMLVisualIDRegistry.getVisualID((View)object);
- boolean result = false;
- // Lifeline
- result = result || id == LifelineEditPart.VISUAL_ID;
- // ES
- result = result || id == ActionExecutionSpecificationEditPart.VISUAL_ID;
- result = result || id == BehaviorExecutionSpecificationEditPart.VISUAL_ID;
- // CF and Interaction operands
- result = result || id == CombinedFragmentEditPart.VISUAL_ID;
- result = result || id == CombinedFragment2EditPart.VISUAL_ID;
- result = result || id == InteractionOperandEditPart.VISUAL_ID;
- // Time related : do nothing, the real event support will be also moved
- //result = result || id == TimeConstraintEditPart.VISUAL_ID;
- //result = result || id == TimeObservationEditPart.VISUAL_ID;
- //result = result || id == DurationConstraintEditPart.VISUAL_ID;
- //result = result || id == DurationObservationEditPart.VISUAL_ID;
- // Messages
- result = result || id == MessageEditPart.VISUAL_ID;
- result = result || id == Message2EditPart.VISUAL_ID;
- result = result || id == Message3EditPart.VISUAL_ID;
- result = result || id == Message4EditPart.VISUAL_ID;
- result = result || id == Message5EditPart.VISUAL_ID;
- result = result || id == Message6EditPart.VISUAL_ID;
- result = result || id == Message7EditPart.VISUAL_ID;
- // General Ordering : do nothing, the real event support will be also moved
- //result = result || id == GeneralOrderingEditPart.VISUAL_ID;
- return result;
- }
- return false;
- }
- }
-
- /**
- * @generated
- */
- public static ITraversalStrategy getNotationTraversalStrategy(IBatchValidator validator) {
- return new CtxSwitchStrategy(validator);
- }
-
- /**
- * @generated
- */
- private static class CtxSwitchStrategy implements ITraversalStrategy {
-
- /**
- * @generated
- */
- private ITraversalStrategy defaultStrategy;
-
- /**
- * @generated
- */
- private int currentSemanticCtxId = -1;
-
- /**
- * @generated
- */
- private boolean ctxChanged = true;
-
- /**
- * @generated
- */
- private EObject currentTarget;
-
- /**
- * @generated
- */
- private EObject preFetchedNextTarget;
-
- /**
- * @generated
- */
- private final int[] contextSwitchingIdentifiers;
-
- /**
- * @generated
- */
- CtxSwitchStrategy(IBatchValidator validator) {
- this.defaultStrategy = validator.getDefaultTraversalStrategy();
- this.contextSwitchingIdentifiers = new int[]{ LifelineEditPart.VISUAL_ID };
- Arrays.sort(this.contextSwitchingIdentifiers);
- }
-
- /**
- * @generated
- */
- public void elementValidated(EObject element, IStatus status) {
- defaultStrategy.elementValidated(element, status);
- }
-
- /**
- * @generated
- */
- public boolean hasNext() {
- return defaultStrategy.hasNext();
- }
-
- /**
- * @generated
- */
- public boolean isClientContextChanged() {
- if(preFetchedNextTarget == null) {
- preFetchedNextTarget = next();
- prepareNextClientContext(preFetchedNextTarget);
- }
- return ctxChanged;
- }
-
- /**
- * @generated
- */
- public EObject next() {
- EObject nextTarget = preFetchedNextTarget;
- if(nextTarget == null) {
- nextTarget = defaultStrategy.next();
- }
- this.preFetchedNextTarget = null;
- return this.currentTarget = nextTarget;
- }
-
- /**
- * @generated
- */
- public void startTraversal(Collection traversalRoots, IProgressMonitor monitor) {
- defaultStrategy.startTraversal(traversalRoots, monitor);
- }
-
- /**
- * @generated
- */
- private void prepareNextClientContext(EObject nextTarget) {
- if(nextTarget != null && currentTarget != null) {
- if(nextTarget instanceof View) {
- final int id = UMLVisualIDRegistry.getVisualID((View)nextTarget);
- int nextSemanticId = (id != -1 && Arrays.binarySearch(contextSwitchingIdentifiers, id) >= 0) ? id : -1;
- if((currentSemanticCtxId != -1 && currentSemanticCtxId != nextSemanticId) || (nextSemanticId != -1 && nextSemanticId != currentSemanticCtxId)) {
- this.ctxChanged = true;
- }
- currentSemanticCtxId = nextSemanticId;
- } else {
- // context of domain model
- this.ctxChanged = currentSemanticCtxId != -1;
- currentSemanticCtxId = -1;
- }
- } else {
- this.ctxChanged = false;
- }
- }
- }
-
- /**
- * @generated
- */
- public static class Adapter1 extends AbstractModelConstraint {
-
- /**
- * @generated
- */
- public IStatus validate(IValidationContext ctx) {
- Interaction context = (Interaction)ctx.getTarget();
- return UMLValidationHelper.validateFragmentsOrder(context, ctx);
- }
- }
-
- /**
- * @generated
- */
- public static class Adapter2 extends AbstractModelConstraint {
-
- /**
- * @generated
- */
- public IStatus validate(IValidationContext ctx) {
- InteractionOperand context = (InteractionOperand)ctx.getTarget();
- return UMLValidationHelper.validateFragmentsOrder(context, ctx);
- }
- }
-
- /**
- * @generated
- */
- public static class Adapter3 extends AbstractModelConstraint {
-
- /**
- * @generated NOT do not presume on target type
- */
- public IStatus validate(IValidationContext ctx) {
- // do not presume on target type
- EObject target = ctx.getTarget();
- return UMLValidationHelper.validateFragmentsOrder(target, ctx);
- }
- }
-
- /**
- * @generated
- */
- static String formatElement(EObject object) {
- return EMFCoreUtil.getQualifiedName(object, true);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java
deleted file mode 100644
index b8acb9c0832..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/providers/UMLViewProvider.java
+++ /dev/null
@@ -1,1435 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- * Vincent Lorenzo - vincent.lorenzo@cea.fr - CEA - LIST
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.providers;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.notation.Connector;
-import org.eclipse.gmf.runtime.notation.DecorationNode;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.FillStyle;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.MeasurementUnit;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.RelativeBendpoints;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.TitleStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-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;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ConsiderIgnoreFragmentEditPart;
-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.ConstraintNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.ContinuationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DestructionOccurrenceSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintInMessageLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationConstraintLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.DurationObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.GeneralOrderingEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionInteractionCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionOperandEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseName2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.InteractionUseNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.Message7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageAsyncAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageCreateAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageDeleteAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageFoundAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageLostAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName2EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName3EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName4EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName5EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName6EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageName7EditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageReplyAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.MessageSyncAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.StateInvariantNameEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeConstraintLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.TimeObservationLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.uml2.uml.CombinedFragment;
-import org.eclipse.uml2.uml.InteractionOperand;
-
-/**
- * @generated
- */
-public class UMLViewProvider extends AbstractProvider implements IViewProvider {
-
- /**
- * @generated
- */
- public final boolean provides(IOperation operation) {
- if(operation instanceof CreateViewForKindOperation) {
- return provides((CreateViewForKindOperation)operation);
- }
- assert operation instanceof CreateViewOperation;
- if(operation instanceof CreateDiagramViewOperation) {
- return provides((CreateDiagramViewOperation)operation);
- } else if(operation instanceof CreateEdgeViewOperation) {
- return provides((CreateEdgeViewOperation)operation);
- } else if(operation instanceof CreateNodeViewOperation) {
- return provides((CreateNodeViewOperation)operation);
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateViewForKindOperation op) {
- /*
- * if (op.getViewKind() == Node.class)
- * return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- * if (op.getViewKind() == Edge.class)
- * return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- */
-
- // check Diagram Type should be the class diagram
- String modelID = UMLVisualIDRegistry.getModelID(op.getContainerView());
- if(!getDiagramProvidedId().equals(modelID)) {
- return false;
- }
-
- int visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint());
- if(Node.class.isAssignableFrom(op.getViewKind())) {
- return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID);
- }
-
- return true;
- }
-
- /**
- * Indicates for which diagram this provider works for.
- * <p>
- * This method can be overloaded when diagram editor inherits from another one
- * </p>
- *
- * @return the unique identifier of the diagram for which views are provided.
- */
- protected String getDiagramProvidedId() {
- return PackageEditPart.MODEL_ID;
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateDiagramViewOperation op) {
- return PackageEditPart.MODEL_ID.equals(op.getSemanticHint()) && UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())) != -1;
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateNodeViewOperation op) {
- if(op.getContainerView() == null) {
- return false;
- }
- IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- EObject domainElement = getSemanticElement(op.getSemanticAdapter());
- int visualID;
- if(op.getSemanticHint() == null) {
- // Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
- // In this situation there should be NO elementType, visualID will be determined
- // by VisualIDRegistry.getNodeVisualID() for domainElement.
- if(elementType != null || domainElement == null) {
- return false;
- }
- visualID = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement);
- } else {
- visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint());
- if(elementType != null) {
- if(!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
- return false; // foreign element type
- }
- String elementTypeHint = ((IHintedType)elementType).getSemanticHint();
- if(!op.getSemanticHint().equals(elementTypeHint)) {
- return false; // if semantic hint is specified it should be the same as in element type
- }
- if(domainElement != null && visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
- return false; // visual id for node EClass should match visual id from element type
- }
- } else {
- if(!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) {
- return false; // foreign diagram
- }
- switch(visualID) {
- case InteractionEditPart.VISUAL_ID:
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- case CombinedFragmentEditPart.VISUAL_ID:
- case InteractionOperandEditPart.VISUAL_ID:
- case InteractionUseEditPart.VISUAL_ID:
- case ContinuationEditPart.VISUAL_ID:
- case LifelineEditPart.VISUAL_ID:
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- case StateInvariantEditPart.VISUAL_ID:
- case TimeConstraintEditPart.VISUAL_ID:
- case TimeObservationEditPart.VISUAL_ID:
- case DurationConstraintEditPart.VISUAL_ID:
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- case ConstraintEditPart.VISUAL_ID:
- case CommentEditPart.VISUAL_ID:
- case DurationObservationEditPart.VISUAL_ID:
- case CombinedFragment2EditPart.VISUAL_ID:
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- if(domainElement == null || visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
- return false; // visual id in semantic hint should match visual id for domain element
- }
- break;
- default:
- return false;
- }
- }
- }
- return InteractionEditPart.VISUAL_ID == visualID || ConsiderIgnoreFragmentEditPart.VISUAL_ID == visualID || CombinedFragmentEditPart.VISUAL_ID == visualID || InteractionOperandEditPart.VISUAL_ID == visualID || InteractionUseEditPart.VISUAL_ID == visualID || ContinuationEditPart.VISUAL_ID == visualID || LifelineEditPart.VISUAL_ID == visualID || ActionExecutionSpecificationEditPart.VISUAL_ID == visualID || BehaviorExecutionSpecificationEditPart.VISUAL_ID == visualID || StateInvariantEditPart.VISUAL_ID == visualID || CombinedFragment2EditPart.VISUAL_ID == visualID || TimeConstraintEditPart.VISUAL_ID == visualID || TimeObservationEditPart.VISUAL_ID == visualID || DurationConstraintEditPart.VISUAL_ID == visualID || DestructionOccurrenceSpecificationEditPart.VISUAL_ID == visualID || ConstraintEditPart.VISUAL_ID == visualID || CommentEditPart.VISUAL_ID == visualID || DurationConstraintInMessageEditPart.VISUAL_ID == visualID || DurationObservationEditPart.VISUAL_ID == visualID;
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateEdgeViewOperation op) {
- IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- if(!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
- return false; // foreign element type
- }
- String elementTypeHint = ((IHintedType)elementType).getSemanticHint();
- if(elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
- return false; // our hint is visual id and must be specified, and it should be the same as in element type
- }
- int visualID = UMLVisualIDRegistry.getVisualID(elementTypeHint);
- EObject domainElement = getSemanticElement(op.getSemanticAdapter());
- if(domainElement != null && visualID != UMLVisualIDRegistry.getLinkWithClassVisualID(domainElement)) {
- return false; // visual id for link EClass should match visual id from element type
- }
- return true;
- }
-
- /**
- * @generated
- */
- public Diagram createDiagram(IAdaptable semanticAdapter, String diagramKind, PreferencesHint preferencesHint) {
- Diagram diagram = NotationFactory.eINSTANCE.createDiagram();
- diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle());
- diagram.setType(PackageEditPart.MODEL_ID);
- diagram.setElement(getSemanticElement(semanticAdapter));
- diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL);
- return diagram;
- }
-
- /**
- * @generated
- */
- public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- final EObject domainElement = getSemanticElement(semanticAdapter);
- final int visualID;
- if(semanticHint == null) {
- visualID = UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
- } else {
- visualID = UMLVisualIDRegistry.getVisualID(semanticHint);
- }
- switch(visualID) {
- case InteractionEditPart.VISUAL_ID:
- return createInteraction_2001(domainElement, containerView, index, persisted, preferencesHint);
- case ConsiderIgnoreFragmentEditPart.VISUAL_ID:
- return createConsiderIgnoreFragment_3007(domainElement, containerView, index, persisted, preferencesHint);
- case CombinedFragmentEditPart.VISUAL_ID:
- return createCombinedFragment_3004(domainElement, containerView, index, persisted, preferencesHint);
- case InteractionOperandEditPart.VISUAL_ID:
- return createInteractionOperand_3005(domainElement, containerView, index, persisted, preferencesHint);
- case InteractionUseEditPart.VISUAL_ID:
- return createInteractionUse_3002(domainElement, containerView, index, persisted, preferencesHint);
- case ContinuationEditPart.VISUAL_ID:
- return createContinuation_3016(domainElement, containerView, index, persisted, preferencesHint);
- case LifelineEditPart.VISUAL_ID:
- return createLifeline_3001(domainElement, containerView, index, persisted, preferencesHint);
- case ActionExecutionSpecificationEditPart.VISUAL_ID:
- return createActionExecutionSpecification_3006(domainElement, containerView, index, persisted, preferencesHint);
- case BehaviorExecutionSpecificationEditPart.VISUAL_ID:
- return createBehaviorExecutionSpecification_3003(domainElement, containerView, index, persisted, preferencesHint);
- case StateInvariantEditPart.VISUAL_ID:
- return createStateInvariant_3017(domainElement, containerView, index, persisted, preferencesHint);
- case CombinedFragment2EditPart.VISUAL_ID:
- return createCombinedFragment_3018(domainElement, containerView, index, persisted, preferencesHint);
- case TimeConstraintEditPart.VISUAL_ID:
- return createTimeConstraint_3019(domainElement, containerView, index, persisted, preferencesHint);
- case TimeObservationEditPart.VISUAL_ID:
- return createTimeObservation_3020(domainElement, containerView, index, persisted, preferencesHint);
- case DurationConstraintEditPart.VISUAL_ID:
- return createDurationConstraint_3021(domainElement, containerView, index, persisted, preferencesHint);
- case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
- return createDestructionOccurrenceSpecification_3022(domainElement, containerView, index, persisted, preferencesHint);
- case ConstraintEditPart.VISUAL_ID:
- return createConstraint_3008(domainElement, containerView, index, persisted, preferencesHint);
- case CommentEditPart.VISUAL_ID:
- return createComment_3009(domainElement, containerView, index, persisted, preferencesHint);
- case DurationConstraintInMessageEditPart.VISUAL_ID:
- return createDurationConstraint_3023(domainElement, containerView, index, persisted, preferencesHint);
- case DurationObservationEditPart.VISUAL_ID:
- return createDurationObservation_3024(domainElement, containerView, index, persisted, preferencesHint);
- }
- // can't happen, provided #provides(CreateNodeViewOperation) is correct
- return null;
- }
-
- /**
- * @generated
- */
- public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- IElementType elementType = getSemanticElementType(semanticAdapter);
- String elementTypeHint = ((IHintedType)elementType).getSemanticHint();
- switch(UMLVisualIDRegistry.getVisualID(elementTypeHint)) {
- case MessageEditPart.VISUAL_ID:
- return createMessage_4003(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case Message2EditPart.VISUAL_ID:
- return createMessage_4004(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case Message3EditPart.VISUAL_ID:
- return createMessage_4005(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case Message4EditPart.VISUAL_ID:
- return createMessage_4006(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case Message5EditPart.VISUAL_ID:
- return createMessage_4007(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case Message6EditPart.VISUAL_ID:
- return createMessage_4008(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case Message7EditPart.VISUAL_ID:
- return createMessage_4009(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return createCommentAnnotatedElement_4010(containerView, index, persisted, preferencesHint);
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return createConstraintConstrainedElement_4011(containerView, index, persisted, preferencesHint);
- case GeneralOrderingEditPart.VISUAL_ID:
- return createGeneralOrdering_4012(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- }
- // can never happen, provided #provides(CreateEdgeViewOperation) is correct
- return null;
- }
-
- /**
- * @generated
- */
- public Node createInteraction_2001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InteractionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Interaction");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interaction");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Interaction");
-
- Node label5001 = createLabel(node, UMLVisualIDRegistry.getType(InteractionNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(InteractionInteractionCompartmentEditPart.VISUAL_ID), false, false, false, false);
-
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Interaction");
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createLifeline_3001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(LifelineEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Lifeline");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Lifeline");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Lifeline");
-
- Node label5002 = createLabel(node, UMLVisualIDRegistry.getType(LifelineNameEditPart.VISUAL_ID));
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createBehaviorExecutionSpecification_3003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(BehaviorExecutionSpecificationEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "BehaviorExecutionSpecification");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "BehaviorExecutionSpecification");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "BehaviorExecutionSpecification");
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createStateInvariant_3017(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(StateInvariantEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "StateInvariant");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "StateInvariant");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "StateInvariant");
-
- Node label5008 = createLabel(node, UMLVisualIDRegistry.getType(StateInvariantNameEditPart.VISUAL_ID));
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createCombinedFragment_3018(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(CombinedFragment2EditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CombinedFragment");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CombinedFragment");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CombinedFragment");
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createTimeConstraint_3019(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(TimeConstraintEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "TimeConstraint");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "TimeConstraint");
-
- Node label5009 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintLabelEditPart.VISUAL_ID));
- label5009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
-
- Location location5009 = (Location)label5009.getLayoutConstraint();
- location5009.setX(22);
- location5009.setY(-7);
- Node label5013 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAppliedStereotypeEditPart.VISUAL_ID));
- label5013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
-
- Location location5013 = (Location)label5013.getLayoutConstraint();
- location5013.setX(0);
- location5013.setY(-22);
-
- return node;
- }
-
- /**
- * @generated NOT
- */
- public Node createTimeObservation_3020(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(TimeObservationEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "TimeObservation");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeObservation");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "TimeObservation");
-
- Node label5010 = createLabel(node, UMLVisualIDRegistry.getType(TimeObservationLabelEditPart.VISUAL_ID),true);
- label5010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
-
- Location location5010 = (Location)label5010.getLayoutConstraint();
- location5010.setX(0);
- location5010.setY(0);
- Node label5014 = createLabel(node, UMLVisualIDRegistry.getType(TimeObservationAppliedStereotypeEditPart.VISUAL_ID),true);
- label5014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
-
- Location location5014 = (Location)label5014.getLayoutConstraint();
- location5014.setX(0);
- location5014.setY(0);
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createDurationConstraint_3021(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DurationConstraintEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DurationConstraint");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DurationConstraint");
-
- Node label5011 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintLabelEditPart.VISUAL_ID));
- label5011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
-
- Location location5011 = (Location)label5011.getLayoutConstraint();
- location5011.setX(25);
- location5011.setY(45);
- Node label5015 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAppliedStereotypeEditPart.VISUAL_ID));
- label5015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
-
- Location location5015 = (Location)label5015.getLayoutConstraint();
- location5015.setX(0);
- location5015.setY(-22);
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createDestructionOccurrenceSpecification_3022(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DestructionOccurrenceSpecificationEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DestructionOccurrenceSpecification");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DestructionOccurrenceSpecification");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DestructionOccurrenceSpecification");
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActionExecutionSpecification_3006(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActionExecutionSpecificationEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionExecutionSpecification");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionExecutionSpecification");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionExecutionSpecification");
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInteractionUse_3002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InteractionUseEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InteractionUse");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InteractionUse");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InteractionUse");
-
- Node label5003 = createLabel(node, UMLVisualIDRegistry.getType(InteractionUseNameEditPart.VISUAL_ID));
- Node label5004 = createLabel(node, UMLVisualIDRegistry.getType(InteractionUseName2EditPart.VISUAL_ID));
-
- return node;
- }
-
- /**
- * Generated not for always have an InteractionOperand on a CombinedFragment
- *
- * @generated NOT
- */
- public Node createCombinedFragment_3004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(CombinedFragmentEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CombinedFragment");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CombinedFragment");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CombinedFragment");
-
- Node compartment = createCompartment(node, UMLVisualIDRegistry.getType(CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID), false, false, true, true);
-
- // Add by default InteractionOperand
- for(InteractionOperand interactionOperand : ((CombinedFragment)domainElement).getOperands()) {
- createInteractionOperand_3005(interactionOperand, compartment, -1, true, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- }
- //initialization for the compartment visibility
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "CombinedFragment");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInteractionOperand_3005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InteractionOperandEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InteractionOperand");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InteractionOperand");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InteractionOperand");
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createContinuation_3016(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ContinuationEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Continuation");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Continuation");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Continuation");
-
- Node label5007 = createLabel(node, UMLVisualIDRegistry.getType(ContinuationNameEditPart.VISUAL_ID));
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createConstraint_3008(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint");
-
- Node label5005 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
- Node label5012 = createLabel(node, UMLVisualIDRegistry.getType(Constraint2EditPart.VISUAL_ID));
-
- return node;
- }
-
- /**
- * @generated
- */
- public Node createComment_3009(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Comment");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Comment");
-
- Node label5006 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
-
- return node;
- }
-
- /**
- * @generated NOT custom layout for location
- */
- public Node createDurationConstraint_3023(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
- node.getStyles().add(NotationFactory.eINSTANCE.createFillStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DurationConstraintInMessageEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // custom layout for location
- Location location3023 = (Location)node.getLayoutConstraint();
- location3023.setX(0);
- location3023.setY(20);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DurationConstraint");
-
- Node label5018 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintInMessageLabelEditPart.VISUAL_ID));
- Node label5019 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintInMessageAppliedStereotypeEditPart.VISUAL_ID));
- label5019.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
-
- Location location5019 = (Location)label5019.getLayoutConstraint();
- location5019.setX(0);
- location5019.setY(-22);
- return node;
- }
-
- /**
- * @generated NOT custom layout for location
- */
- public Node createDurationObservation_3024(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
- node.getStyles().add(NotationFactory.eINSTANCE.createFillStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DurationObservationEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // custom layout for location
- Location location3024 = (Location)node.getLayoutConstraint();
- location3024.setX(0);
- location3024.setY(0);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DurationObservation");
-
- Node label5016 = createLabel(node, UMLVisualIDRegistry.getType(DurationObservationLabelEditPart.VISUAL_ID));
- Node label5017 = createLabel(node, UMLVisualIDRegistry.getType(DurationObservationAppliedStereotypeEditPart.VISUAL_ID));
- label5017.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
-
- Location location5017 = (Location)label5017.getLayoutConstraint();
- location5017.setX(0);
- location5017.setY(0);
- return node;
- }
-
- /**
- * @generated NOT
- */
- public Node createConsiderIgnoreFragment_3007(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ConsiderIgnoreFragmentEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ConsiderIgnoreFragment");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ConsiderIgnoreFragment");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ConsiderIgnoreFragment");
-
- Node compartment = createCompartment(node, UMLVisualIDRegistry.getType(CombinedFragmentCombinedFragmentCompartmentEditPart.VISUAL_ID), false, false, true, true);
-
- // Add by default InteractionOperand
- for(InteractionOperand interactionOperand : ((CombinedFragment)domainElement).getOperands()) {
- createInteractionOperand_3005(interactionOperand, compartment, -1, true, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- }
-
- //initialization for the compartment visibility
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ConsiderIgnoreFragment");
- return node;
- }
-
- /**
- * @generated
- */
- public Edge createMessage_4003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Edge edge = NotationFactory.eINSTANCE.createEdge();
- edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(MessageEditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Message");
-
- //org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
- //if (routing != null) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
-
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Message");
-
- Node label6001 = createLabel(edge, UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID));
- label6001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6001 = (Location)label6001.getLayoutConstraint();
- location6001.setX(1);
- location6001.setY(-13);
- Node label6008 = createLabel(edge, UMLVisualIDRegistry.getType(MessageSyncAppliedStereotypeEditPart.VISUAL_ID));
- label6008.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6008 = (Location)label6008.getLayoutConstraint();
- location6008.setX(1);
- location6008.setY(-33);
-
- edge.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Message");
-
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createMessage_4004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Edge edge = NotationFactory.eINSTANCE.createEdge();
- edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(Message2EditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Message");
-
- //org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
- //if (routing != null) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
-
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Message");
-
- Node label6002 = createLabel(edge, UMLVisualIDRegistry.getType(MessageName2EditPart.VISUAL_ID));
- label6002.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6002 = (Location)label6002.getLayoutConstraint();
- location6002.setX(1);
- location6002.setY(-13);
- Node label6009 = createLabel(edge, UMLVisualIDRegistry.getType(MessageAsyncAppliedStereotypeEditPart.VISUAL_ID));
- label6009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6009 = (Location)label6009.getLayoutConstraint();
- location6009.setX(1);
- location6009.setY(-33);
-
- edge.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Message");
-
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createMessage_4005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Edge edge = NotationFactory.eINSTANCE.createEdge();
- edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(Message3EditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Message");
-
- //org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
- //if (routing != null) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
-
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Message");
-
- Node label6003 = createLabel(edge, UMLVisualIDRegistry.getType(MessageName3EditPart.VISUAL_ID));
- label6003.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6003 = (Location)label6003.getLayoutConstraint();
- location6003.setX(1);
- location6003.setY(-13);
- Node label6010 = createLabel(edge, UMLVisualIDRegistry.getType(MessageReplyAppliedStereotypeEditPart.VISUAL_ID));
- label6010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6010 = (Location)label6010.getLayoutConstraint();
- location6010.setX(1);
- location6010.setY(-33);
-
- edge.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Message");
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createMessage_4006(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Edge edge = NotationFactory.eINSTANCE.createEdge();
- edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(Message4EditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Message");
-
- //org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
- //if (routing != null) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
-
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Message");
-
- Node label6004 = createLabel(edge, UMLVisualIDRegistry.getType(MessageName4EditPart.VISUAL_ID));
- label6004.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6004 = (Location)label6004.getLayoutConstraint();
- location6004.setX(1);
- location6004.setY(-13);
- Node label6011 = createLabel(edge, UMLVisualIDRegistry.getType(MessageCreateAppliedStereotypeEditPart.VISUAL_ID));
- label6011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6011 = (Location)label6011.getLayoutConstraint();
- location6011.setX(1);
- location6011.setY(-33);
-
- edge.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Message");
-
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createMessage_4007(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Edge edge = NotationFactory.eINSTANCE.createEdge();
- edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(Message5EditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Message");
-
- //org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
- //if (routing != null) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
-
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Message");
-
- Node label6005 = createLabel(edge, UMLVisualIDRegistry.getType(MessageName5EditPart.VISUAL_ID));
- label6005.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6005 = (Location)label6005.getLayoutConstraint();
- location6005.setX(1);
- location6005.setY(-13);
- Node label6012 = createLabel(edge, UMLVisualIDRegistry.getType(MessageDeleteAppliedStereotypeEditPart.VISUAL_ID));
- label6012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6012 = (Location)label6012.getLayoutConstraint();
- location6012.setX(1);
- location6012.setY(-33);
-
- edge.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Message");
-
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createMessage_4008(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Edge edge = NotationFactory.eINSTANCE.createEdge();
- edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(Message6EditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Message");
-
- //org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
- //if (routing != null) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
-
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Message");
-
- Node label6006 = createLabel(edge, UMLVisualIDRegistry.getType(MessageName6EditPart.VISUAL_ID));
- label6006.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6006 = (Location)label6006.getLayoutConstraint();
- location6006.setX(1);
- location6006.setY(-13);
- Node label6013 = createLabel(edge, UMLVisualIDRegistry.getType(MessageLostAppliedStereotypeEditPart.VISUAL_ID));
- label6013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6013 = (Location)label6013.getLayoutConstraint();
- location6013.setX(1);
- location6013.setY(-33);
-
- edge.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Message");
-
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createMessage_4009(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Edge edge = NotationFactory.eINSTANCE.createEdge();
- edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(Message7EditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Message");
-
- //org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
- //if (routing != null) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
-
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Message");
-
- Node label6007 = createLabel(edge, UMLVisualIDRegistry.getType(MessageName7EditPart.VISUAL_ID));
- label6007.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6007 = (Location)label6007.getLayoutConstraint();
- location6007.setX(1);
- location6007.setY(-13);
- Node label6014 = createLabel(edge, UMLVisualIDRegistry.getType(MessageFoundAppliedStereotypeEditPart.VISUAL_ID));
- label6014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6014 = (Location)label6014.getLayoutConstraint();
- location6014.setX(1);
- location6014.setY(-33);
-
- edge.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Message");
-
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createCommentAnnotatedElement_4010(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- edge.setElement(null);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Undefined");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined");
-
- //org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
- //if (routing != null) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
-
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined");
-
- edge.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Message");
-
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createConstraintConstrainedElement_4011(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- edge.setElement(null);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Undefined");
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined");
-
- //org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
- //if (routing != null) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
-
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined");
-
- edge.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Message");
-
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createGeneralOrdering_4012(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Edge edge = NotationFactory.eINSTANCE.createEdge();
- edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(GeneralOrderingEditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "GeneralOrdering");
-
- //org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
- //if (routing != null) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
-
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "GeneralOrdering");
-
- Node label6015 = createLabel(edge, UMLVisualIDRegistry.getType(GeneralOrderingAppliedStereotypeEditPart.VISUAL_ID));
- label6015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6015 = (Location)label6015.getLayoutConstraint();
- location6015.setX(1);
- location6015.setY(-33);
-
- edge.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "GeneralOrdering");
- return edge;
- }
-
- /**
- * @generated
- */
- protected void stampShortcut(View containerView, Node target) {
- if(!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
- EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
- shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
- shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$
- target.getEAnnotations().add(shortcutAnnotation);
- }
- }
-
- /**
- * @generated
- */
- protected Node createLabel(View owner, String hint) {
- DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
- rv.setType(hint);
- ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
- return rv;
- }
-
- protected Node createLabel(View owner, String hint, boolean isTimeObservationLable) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(hint);
- ViewUtil.insertChildView(owner, node, ViewUtil.APPEND, true);
- return node;
- }
-
- /**
- * @generated
- */
- protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
- //SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
- //rv.setShowTitle(showTitle);
- //rv.setCollapsed(isCollapsed);
- Node rv;
- if(canCollapse) {
- rv = NotationFactory.eINSTANCE.createBasicCompartment();
- } else {
- rv = NotationFactory.eINSTANCE.createDecorationNode();
- }
- rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
-
- if(hasTitle) {
- TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
- ts.setShowTitle(true);
- rv.getStyles().add(ts);
- }
- if(canSort) {
- rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle());
- }
- if(canFilter) {
- rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle());
- }
- rv.setType(hint);
- ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
- return rv;
- }
-
- /**
- * @generated
- */
- protected EObject getSemanticElement(IAdaptable semanticAdapter) {
- if(semanticAdapter == null) {
- return null;
- }
- EObject eObject = (EObject)semanticAdapter.getAdapter(EObject.class);
- if(eObject != null) {
- return EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(eObject), eObject);
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected IElementType getSemanticElementType(IAdaptable semanticAdapter) {
- if(semanticAdapter == null) {
- return null;
- }
- return (IElementType)semanticAdapter.getAdapter(IElementType.class);
- }
-
- /**
- * @generated
- */
- private void initFontStyleFromPrefs(View view, final IPreferenceStore store, String elementName) {
- String fontConstant = PreferenceConstantHelper.getElementConstant(elementName, PreferenceConstantHelper.FONT);
- String fontColorConstant = PreferenceConstantHelper.getElementConstant(elementName, PreferenceConstantHelper.COLOR_FONT);
-
- FontStyle viewFontStyle = (FontStyle)view.getStyle(NotationPackage.Literals.FONT_STYLE);
- if(viewFontStyle != null) {
- FontData fontData = PreferenceConverter.getFontData(store, fontConstant);
- viewFontStyle.setFontName(fontData.getName());
- viewFontStyle.setFontHeight(fontData.getHeight());
- viewFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
- viewFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
-
- org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(store, fontColorConstant);
- viewFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
- }
- }
-
- /**
- * @generated
- */
- private void initForegroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
- String lineColorConstant = PreferenceConstantHelper.getElementConstant(elementName, PreferenceConstantHelper.COLOR_LINE);
- org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(store, lineColorConstant);
- ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB));
- }
-
- /**
- * @generated
- */
- private void initBackgroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
- String fillColorConstant = PreferenceConstantHelper.getElementConstant(elementName, PreferenceConstantHelper.COLOR_FILL);
- String gradientColorConstant = PreferenceConstantHelper.getElementConstant(elementName, PreferenceConstantHelper.COLOR_GRADIENT);
- String gradientPolicyConstant = PreferenceConstantHelper.getElementConstant(elementName, PreferenceConstantHelper.GRADIENT_POLICY);
-
- org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(store, fillColorConstant);
- ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB));
-
- FillStyle fillStyle = (FillStyle)view.getStyle(NotationPackage.Literals.FILL_STYLE);
- fillStyle.setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue());
-
- ;
- if(store.getBoolean(gradientPolicyConstant)) {
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(store.getString(gradientColorConstant));
- fillStyle.setGradient(gradientPreferenceConverter.getGradientData());
- fillStyle.setTransparency(gradientPreferenceConverter.getTransparency());
- }
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/sheet/UMLPropertySection.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/sheet/UMLPropertySection.java
deleted file mode 100644
index db3ef9af0be..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/sheet/UMLPropertySection.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.sheet;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.ui.provider.PropertySource;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.properties.sections.AdvancedPropertySection;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.IPropertySourceProvider;
-
-/**
- * @generated
- */
-public class UMLPropertySection extends AdvancedPropertySection implements IPropertySourceProvider {
-
- /**
- * @generated
- */
- public IPropertySource getPropertySource(Object object) {
- if(object instanceof IPropertySource) {
- return (IPropertySource)object;
- }
- AdapterFactory af = getAdapterFactory(object);
- if(af != null) {
- IItemPropertySource ips = (IItemPropertySource)af.adapt(object, IItemPropertySource.class);
- if(ips != null) {
- return new PropertySource(object, ips);
- }
- }
- if(object instanceof IAdaptable) {
- return (IPropertySource)((IAdaptable)object).getAdapter(IPropertySource.class);
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected IPropertySourceProvider getPropertySourceProvider() {
- return this;
- }
-
- /**
- * Modify/unwrap selection.
- *
- * @generated
- */
- protected Object transformSelection(Object selected) {
-
- if(selected instanceof EditPart) {
- Object model = ((EditPart)selected).getModel();
- return model instanceof View ? ((View)model).getElement() : null;
- }
- if(selected instanceof View) {
- return ((View)selected).getElement();
- }
- if(selected instanceof IAdaptable) {
- View view = (View)((IAdaptable)selected).getAdapter(View.class);
- if(view != null) {
- return view.getElement();
- }
- }
- return selected;
- }
-
- /**
- * @generated
- */
- public void setInput(IWorkbenchPart part, ISelection selection) {
- if(selection.isEmpty() || false == selection instanceof StructuredSelection) {
- super.setInput(part, selection);
- return;
- }
- final StructuredSelection structuredSelection = ((StructuredSelection)selection);
- ArrayList transformedSelection = new ArrayList(structuredSelection.size());
- for(Iterator it = structuredSelection.iterator(); it.hasNext();) {
- Object r = transformSelection(it.next());
- if(r != null) {
- transformedSelection.add(r);
- }
- }
- super.setInput(part, new StructuredSelection(transformedSelection));
- }
-
- /**
- * @generated
- */
- protected AdapterFactory getAdapterFactory(Object object) {
- if(getEditingDomain() instanceof AdapterFactoryEditingDomain) {
- return ((AdapterFactoryEditingDomain)getEditingDomain()).getAdapterFactory();
- }
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(object);
- if(editingDomain != null) {
- return ((AdapterFactoryEditingDomain)editingDomain).getAdapterFactory();
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/sheet/UMLSheetLabelProvider.java b/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/sheet/UMLSheetLabelProvider.java
deleted file mode 100644
index 96a9cb484b5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.diagram.sequence_initial-kepler/src/org/eclipse/papyrus/uml/diagram/sequence/sheet/UMLSheetLabelProvider.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence.sheet;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.BaseLabelProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.diagram.sequence.navigator.UMLNavigatorGroup;
-import org.eclipse.papyrus.uml.diagram.sequence.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @generated
- */
-public class UMLSheetLabelProvider extends BaseLabelProvider implements ILabelProvider {
-
- /**
- * @generated
- */
- public String getText(Object element) {
- element = unwrap(element);
- if(element instanceof UMLNavigatorGroup) {
- return ((UMLNavigatorGroup)element).getGroupName();
- }
- IElementType etype = getElementType(getView(element));
- return etype == null ? "" : etype.getDisplayName();
- }
-
- /**
- * @generated
- */
- public Image getImage(Object element) {
- IElementType etype = getElementType(getView(unwrap(element)));
- return etype == null ? null : UMLElementTypes.getImage(etype);
- }
-
- /**
- * @generated
- */
- private Object unwrap(Object element) {
- if(element instanceof IStructuredSelection) {
- return ((IStructuredSelection)element).getFirstElement();
- }
- return element;
- }
-
- /**
- * @generated
- */
- private View getView(Object element) {
- if(element instanceof View) {
- return (View)element;
- }
- if(element instanceof IAdaptable) {
- return (View)((IAdaptable)element).getAdapter(View.class);
- }
- return null;
- }
-
- /**
- * @generated
- */
- private IElementType getElementType(View view) {
- // For intermediate views climb up the containment hierarchy to find the one associated with an element type.
- while(view != null) {
- int vid = UMLVisualIDRegistry.getVisualID(view);
- IElementType etype = UMLElementTypes.getElementType(vid);
- if(etype != null) {
- return etype;
- }
- view = view.eContainer() instanceof View ? (View)view.eContainer() : null;
- }
- return null;
- }
-
-}

Back to the top